Objectif: The main goal of this lab is to be able to develop a sample application around a home automation sensor such as PIR Motion sensor.
Step 1: Required Hardware
NucleoF401RE board with X-Nucleo-IDW01M1V2 wifi Sheild.
PIR motion sensor :
This motion sensor consists of a fresnel lens, an infrared detector, and supporting detection circuitry. The lens on the sensor focuses any infrared radiation present around it toward the infrared detector. Our bodies generate infrared heat, and as a result, this heat is picked up by the motion sensor. The sensor outputs a 5V signal for a configurable period.
The sensor output state as streamed on IBM Quick-start.
Step 2: Developing with Ecosystem
You should connect o the Arm® Mbed™ IoT Device Platform, the applications for this lab can be developed using the mbed online IDE, a free online code editor and compiler. sign in to the compiler :
Create new project , configure it with your hardware : NucleoF401RE board .
You must include the required libraries such as :
Create new file (main.cpp) into the project. you can use ST online project as template, the project allows to Connect through Wifi to IBM MQTT cloud https://quickstart.internetofthings.ibmcloud.com
ST code :
Otherwise, you find attached a project to complete.
Use pin D13 as sensor digital output.
compile your project , upload it to the nucleo. You need to get the wifi sheild MAC adress, as it is used as Object identifier with IBM quick-start platform. Install and run a serial terminal interface (e.g.Teraterm) to visualize log messages and to get parameters such as Wi-Fi MAC adress.
When connection to access point is established, you can take note of the MAC address of your Wi-Fi expansion board :
Step 3: Visualize data on IBM Quickstart web-page