Part of the The Realtime® Framework, Realtime Cloud Messaging (aka ORTC) is a secure, fast and highly scalable cloud-hosted Pub/Sub real-time message broker for web and mobile apps.
When you need to communicate in real-time with your Tessel devices Realtime Cloud Messaging is the reliable, easy, unbelievably fast, “works everywhere” solution.
Before running this sample install the Realtime Cloud Messaging SDK for Tessel using the following commands:
cd sample
npm install realtime-tessel
To execute the blink sample in your Tessel run the following commands:
tessel run blink.js
This sample will subscribe the Realtime channel tessel
and when any message is received your Tessel leds will toggle.
You might want to use this sample in conjunction with the JavaScript sample (or http://console.realtime.co) and send messages to the channel tessel
. You should see the Tessel leds toggle when messages are received.
NOTE: For simplicity these samples assume you're using a Realtime® Framework developers' application key with the authentication service disabled (every connection will have permission to publish and subscribe to any channel). For security guidelines please refer to the Security Guide.
Don't forget to replace
YOUR_APPLICATION_KEY
andYOUR_APPLICATION_PRIVATE_KEY
with your own application key. If you don't already own a free Realtime® Framework application key, get one now.
The Tessel SDK API reference documentation can be found here.
The complete Realtime® Messaging reference documentation is available here