Example SmartApp for existing device controlled via Arduino message

There are several examples of SmartApps sending messages to the Arduino Things shield and in response Arduino performs some action like opening a garage door or turning on a coffee pot.

How do you accomplish the reverse?

A device connected to the Arduino triggers an Arduino input. Arduino responds by sending a message to the cloud. A SmartApps receives and processes the message. Up to this point I am fairly clear.

This next step is where I need example SmartApp code.
In response to received message SmartApp sends command to SmartThings controlled device.

Sounds probable. Flagging for @urman.

I believe It is the same code SmartThings uses to talk to a device assuming it is SmartApps driven.
P.S.I enjoy your developers videos.