Software apps and online services
As the title says, this is an app that let you communicate with your devices using pubnub API's.
I have explained the Android development on Pluralsight. Here I want to explain a sample use with a Linkit ONE board.
Download the app from Google Play Store here.
The first time you use the app it will ask you to chose an username, and for your pubnub keys.
Now press on the "+" button and add a new private channel.
We will use this channel to interact with our board's pins. Here are the functions we will implement:
- DRPIN read a digital pin
- ARPIN read an analog pin
- DWPIN VAL write on a digital pin
- AWPIN VAL write on a analog (PWM) pin
In the sketch for Linkit ONE, remember to set your WiFi, and PubNub credentials.
char channel must be equal to the channel name you created in the app.
#define WIFI_AP "" // your WiFi_AP name #define WIFI_PASSWORD "" //your WiFi password #define WIFI_AUTH LWIFI_OPEN // char pubkey = ""; //Pubnub publish key char subkey = ""; //pubnub subscribe key char channel = "LinkitONE"; //a channel for this device
In the main loop we subscribe to the device's channel, and when we get a message, we decode it and do the corresponding action.
So this was just a little example of how this app can be used, but there are many other things that you can do with it. You can also use it as a simple chat app for Android devices.
This is the first release, but I will update it and add other features.
If you have any suggestions about features to add, or there is something that doesn't work, just let me know.