Ship IoT with Kinoma Create and PubNub
This demonstrates reading a Texas Instruments LM35 precision temperature sensor with a Kinoma Create, and sending the data to an exchange on PubNub.
Setup instructions: IMPORTANT! You must set the pins before every time you start the app! If the app crashes, you should check the pins again before re-launching it!
Connect the temperature probe
- Connect the LM35 to the left-most pins on the front
- The flat face of the TO-92 case should face you and the screen
Set the pins
- From the Kinoma launcher, select the Front Pins app
- Make sure the switch for the left block of pins is set to 3.3v
- Tap on the left block of pins to open it up
- Tap on pin 51, and select Power
- Tap on pin 52, and select Analog
- Tap on pin 53, and select Ground
- Tap on the back arrow, in the upper-left of the screen
- Tap the Apply button, and then the Apply button again
- The temperature probe should now be powered; check with a meter
Load the app to the Kinoma
- Open Kinoma Studio
- File -> Import... -> General -> Existing Projects into Workspace; then hit Next
- Select shipiot-kinoma-create-pubnub as root directory, click Finish
- Edit the src -> main.xml file and put in your PubNub keys
- In Project Explorer, open shipiot-kinoma-create -> src -> application.xml
- Make sure your hardware Kinoma device appears (must be on the network and running)
- Click the little gear for the hardware Kinoma
- Check the box "Install on Launch"
- Click Apply, and then Run
- The app should be uploaded to the Kinoma
- Click Stop in Kinoma Studio to stop the local debug session
- The trouble with the LM35 directly in the Kinoma pin header is that the Kinoma dissipates enough heat to keep the sensor at about body temperature. This makes it hard to demo the temperature changing much by touching or breathing on the sensor.
- Use a short cable if you have it handy. A long cable may cause instability or oscillation; be careful.
Copyright (c) 2015 wot.io, Inc. All Rights Reserved.
by Aaron Kondziela
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
The wot.io logo and name are trademarks of wot.io, Inc.
The pubnub.js library is Copyright 2011-2014 Marvell Semiconductor, Inc.