Here’s the example I shared in class for using OSC with the Photons.

It’s also available as a Gist on Github.