We are going to setup the Arduino development environment and configure the device:

Download and install Arduino IDE.

Download Lithouse Arduino library.

Go to the Arduino IDE’s home folder. Then go inside the libraries folder. Now, unzip Lithouse client library here and rename it to Lithouse.

Launch the Arduino IDE. Open LithousePIR (File > Examples > Lithouse > LithousePIR).

You may have noticed that the device key is missing in the LithousePIR sketch:

char deviceKey [] = "YOUR_DEVICE_KEY";

We need to update this with an actual key.





Go back to Devices tab and expand the group you just created by clicking the '+' on the left of group name.

Then click the 'copy' icon beside the device key to copy it into the clipboard.

Paste the device key in your sketch.



The program is now ready. Please upload it to Arduino.

You can test by moving a hand in front of the PIR sensor. The LED should turn on.



For more information regarding setup and debugging, please visit our tutorial.