Post temperature data to sensor-cloud.com with App Inventor
sensor-cloud.com allows you to write your sensor data to the cloud and access the data from browsers anywhere in the world by you or your Facebook friends. Sensors are social too!
- Goto sensor-cloud.com. Join sensor-cloud.com using your Facebook login
- Goto My Configuration to generate the API Secret. Note your API Key and API Secret.
- (Optional) Goto Geocoder to get the Geolocation of your address. Update your configuration with the lat, lng of your address to be the default geolocation used for your data.
- Download the sensor_cloud_ai.zip to your computer and then upload to your App Inventor account.
- In the Block Editor, modify the following block by replacing api_key with your API Key and api_secret with your API Secret that you noted from your sensor-cloud.com configuration (see step 2).
- Run the program. Press the Log button. A notification will display the status of the post. Each time you press the button, the Temperature value will be written to sensor-cloud.com. Change the temperature value and press the Log button again. Repeat a few more times with a few seconds delay betweeen.
- Your data is now available to you and your friends on www.sensor-cloud.com. Goto My Sensor List and select Temperature to view a graph of values logged. Select show table to view the data in a table and select show map to view the location of the data.
The following components are used
- Other stuff->Web (This is a non visible component, that is it will not appear on the screen)
- Other stuff->Notifier (This is a non visible component, that is it will not appear on the screen)
Some of the new blocks used
- My Blocks->Web1->Web1.RequestHeaders
- My Blocks->Web1->Web1.Url
- My Blocks->Web1->Web1.PostText
- My Blocks->Web1->Web1.BuildPostData
- My Blocks->Web1->Web1.GotText
- My Blocks->Notifier1->Notifier1.ShowAlert
- Built-In->Lists->make a list
The web parameters are defined by the sensor-cloud.com api. When the sensor-cloud.com api returns the result, a Web1.GotText event is activated. What is returned is also defined by the sensor-cloud.com api. In this example, a Notifier1.ShowAlert is used to display the result.