In this example we will connect the Grove Light Sensor to your Raspberry Pi to measure environmental lighting and display the result in AllThingsTalk Maker.
If you are new to using a Raspberry Pi, we suggest you try the basic example on the previous page first.
No need to install the sdk and Grove Pi if you are using the AllThingsTalk Raspberry Pi kit. The SD card comes pre-installed.
If you are using your own Raspberry Pi, you can clone the AllThingsTalk SDK to it using
git clone git://github.com/allthingstalk/python-sdk.git.
Next install the sdk by browsing to the folder
cd python-sdkand the
pip3 install .command.
To install Grove Pi support, please follow these instructions.
An alternative to using a SSH client is hooking up a screen and keyboard to your Raspberry Pi.
Run the application with the command
If all went well, a lightsensor asset is created under your device in AllThingsTalk Maker. Push the button and see if the value changes.
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!