Skip to content

XinaBoxSamples/iot-hub-xinabox-cw02-client-app

Repository files navigation

services platforms author
iot-hub
arduino
bb

IoT Hub XinaBox CW02 Client application

This repo contains the source code to help you get familiar with Azure IoT using the XK11 Iot starter kit.

This repo contains an Arduino IDE application that runs on board XinaBox CW02 with a xChip SL06(APDS-9960) advanced Gesture detection, Proximity detection, Digital Ambient Light Sense (ALS) and Color Sense (RGBC), and then sends these data to your IoT hub. At the same time, this application receives Cloud-to-Device message from your IoT hub, and takes actions according to the C2D command.

Create your Azure IoT hub

Follow this page to prepare your Azure IoT hub and register your device.

Connect your sensor with your board

Connect with a physical SL06(APDS-9960)

You can follow the image to connect your SL06(APDS-9960) with your XinaBox CW02.

cw02_sl06_ip01.png

Don't have a real SL06(APDS-9960) sensor?

The sample application can simulate ambient light in case you don't have a real SL06(APDS-9960) sensor. To set up the sample application to use simulated data, follow these steps:

  1. Open the app.ino file in the app folder.

  2. Locate the below line of code and change the value from False to True:

    SIMULATED_DATA = False

    simulate_sl06.png

  3. Save the file with Control-S.

Send Cloud-to-Device command

You can send a C2D message to your device. You can see the device prints out the message and blinks once receiving the message.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages