Free up to 1MM monthly messages. No credit card required.
UPDATE: Get excited, because PubNub and Tessel are hosting a Hack Day on October 25.
It’s easy to program your Tessel to communicate over the internet, but you can make Tessel even more powerful using PubNub’s global Data Stream network. Using PubNub, Tessels can instantly publish data that they’re collecting on a global scale — for example:
Here’s a super-simple PubNub/Tessel integration:
In this super-simple example, an LED on your Tessel will toggle on or off whenever a message is received on the channel “tessel-light“. To test this, you can send a message by using the PubNub Developer Console. Simply change the channel name in the Developer Console from my_channel to tessel_light, and click Send (the red button in the message box.)
Tessel has an amazingly simple code deployment system, which they have documented in their quick-start tutorial. Briefly, plug your tessel into your computer’s USB port and issue these commands:
brew install node
npm install -g tessel
tessel wifi -n [network name] -p [password]
tessel run pubnub-tessel.js
At this point, your Tessel should be up and running and connected to your WiFi network. To confirm, you can execute the Tessel blinking lights demo or the PubNub blinking lights demo above.
In the above example, we’ve seen how Tessel can consume a PubNub data stream and react to it by blinking an LED. We can also get our Tessel to publish information about its environment, which can be aggregated and acted upon by other devices (including other Tessels!)
Let’s look at an example which detects loud sounds in its vicinity using the ambient module, and notifies the world about them:
If you snap your fingers within a few feet of the Tessel’s ambient module, you’ll be able to see a message sent out over the tessel-light channel notifying you that a sound event has occurred. We could use another channel name for these events, but we chose tessel-light because it works well with our prior LED demo. In fact, if you run this example on one Tessel and the prior LED example on another Tessel, you’ll see the LEDs on the later tessel blink whenever the first Tessel senses an audio event!
This is the power of PubNub with Tessel: you can easily build a large number of smart, connected devices and have them communicate seamlessly with each other, whether it is two devices communicating together, or hundreds of millions of devices. PubNub allows your Tessels to communicate with each other and the Internet of Things at scale, without having to worry about resource bottlenecks.
Update: We also have a PubNub-Tessel examples GitHub repo.
Take a look at the top trends that are the most effective in attracting customers and reducing churn, and how you can incorporate...
Comparing the major game engines: Unity vs Unreal Engine vs Corona SDK vs GameMaker Studio, including the benefits and cons of...
Sockets (aka socket programming) enable programs to send and receive data, bi-directionally, at any given moment. This tutorial...