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!

  1. Goto sensor-cloud.com. Join sensor-cloud.com using your Facebook login
  2. Goto My Configuration to generate the API Secret. Note your API Key and API Secret.
  3. (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.
  4. Download the sensor_cloud_ai.zip to your computer and then upload to your App Inventor account.
  5. 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).
  6. API Key
  7. 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.
  8. 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.

Designer

The following components are used

  1. Basic->Label
  2. Basic->Button
  3. Basic->TextBox
  4. Other stuff->Web (This is a non visible component, that is it will not appear on the screen)
  5. Other stuff->Notifier (This is a non visible component, that is it will not appear on the screen)

Block Editor

Some of the new blocks used

  1. My Blocks->Web1->Web1.RequestHeaders
  2. My Blocks->Web1->Web1.Url
  3. My Blocks->Web1->Web1.PostText
  4. My Blocks->Web1->Web1.BuildPostData
  5. My Blocks->Web1->Web1.GotText
  6. My Blocks->Notifier1->Notifier1.ShowAlert
  7. 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.