You are viewing an older revision! See the latest version
From Device to Cloud
Putting it all Together: From Device to Cloud¶
This tutorial will explain how to take your connected device and connected to the cloud.
- Gather the following hardware:
- STM32F411 Nucleo Board
- Multitech Systems or ACKme WiFi Module
- Grove Shield board
- Grove Temperature Sensor
- Grove LED
- Connect the WiFi module to the STM32 Nucleo Ardiuno connector
- Connect the Grove shield board to the WiFi module's Ardiuno connector
- Connect the Grove temperature sensor to port A0 and the Grove LED to port D7 of the Grove Shield board
- Plug the STM32F411 Nucleo board to your PC with a USB cable
- Import the “STM32_MTS_Wifi_Connect_M2X” mbed project into your mbed compiler
This example includes methods for reading five of the Grove sensors (accel sensor, light sensor, water sensor, gas sensor, and temp sensor). To import, go to http://mbed.org/teams/ATT-CTIA-Hackathon-2014/code/STM32_Read_Sensors_Example/ and click the “Import program” button.
- Click “Import” button on the pop up window shown below
- Open the main.cpp file and make the following modifications:
- Enter your M2X API key, Feed ID, Stream, and Name in the corresponding fields as shown below This information is obtained from your M2X Blueprint you should have created by now, you can refer to see “Getting Started with M2X Tutorial”.
- Enter the SSID and password of your local WiFi hotspot, see screenshot below for an example of this. (Note: make sure your WiFi router is setup for 802.11g since this module is 802.11g compliant).
- Compile and load the image onto the F411 Nucleo
Note
You can refer to Tutorial #2 for compiling and loading the Nucleo board.
- Open your serial terminal emulation program. Set the baudrate to 9600
Note
Refer to tutuorial x for instructions on how to configure a terminal emulation program **
After you have loaded your Nucleo (or perform a reset by unplugging/plunging your USBb cable, or pushing the Black reset button on the STM32 Nucleo board). Through the terminal emulator you can see the board connecting to the WiFi network. After it has successfully joined the network, the application will perform a device location update before it starts readings the temperature sensor. It will then report temperature readings to your M2X “temperature” stream every 5 seconds.
- Login to M2X and select the blueprint created previously from Getting Started with ATT M2X You should now see a chart plot of your device’s temperature sensor data from your M2X stream as shown below.
You should also be able to see your device’s location on the “Location” tab on a map but for some reason my browser isn’t displaying this image :(