In this example we will connect the Grove Light Sensor to your Arduino to measure environmental lighting and display the result in AllThingsTalk Maker.
This example is part of the arduino-sdk and can be found in the examples folder. If you already ran the basic example on the previous page, you have everything installed to get started right away!
In your Arduino IDE under File > Examples > ATT_IOT open the
light-sensor example sketch
Simply hit the upload icon in the Arduino IDE. This will save the sketch, compile it and upload it to your Arduino.
If all went well, a Light asset is created under your device in AllThingsTalk Maker and values start rolling in.
Alternatively, you can also open the Tools > Serial monitor of the Arduino IDE. This can be very useful when debugging your own sketches.
- Make sure you select the correct COM port to listen (under Tools > Port )
- When the monitor is open, make sure the Baud rate is set to 9600
Upon running the example, all needed assets are created. We can now use those to create a pinboard to visualise them.
If you chose a (historical) chart, make sure you have Data Storage turned on!