xChip CW02 (ESP-WROOM-32) is a Wi-Fi & BLE core module. It is based on the ESP32 which is a single 2.4 GHz Wi-Fi and BLE combo chip designed with TSMC ultra-low-power 40 nm technology and an Xtensa® Dual-core 32-bit LX6 microprocessor.
xChip SW01 (BME280) is equipped with a weather sensor that is capable of measuring the temperature, humidity and atmospheric pressure.
In this tutorial we will show you how to build an IoT Weather Station using XinaBox xChip CW02, SW01 and Microsoft Azure IoT.
Requirements● 1x CW02 - Wi-Fi & BLE Core (ESP-WROOM-32)
● 1x IP01/IP02 - USB Programming Interface (FT232R)
● 1x SW01 - Advanced Weather Sensor (BME280)
● 1x XC10 - 10-Pack xBus Connectors
● Arduino IDE
● Microsoft Azure
● Power BI
1. Hardware Setup
2. Setting up the Arduino IDE
3. Create Azure IoT Hub account
4. Register a new device
5. Upload the code
6. Summary
Connect xChips CW02, IP01/IP02 and SW01 together using the XC10 xBUS connectors. You may connect it as shown in the diagram below. Please see this guide on how to assemble xChips generally.
And then connect your device and PC through the IP01/IP02’s USB.
2. Setting up the Arduino IDE1. Install Arduino IDE 1.8.8
2. Install these cores/libraries into Arduino IDE:
Note: If you are not familiar with how to install cores/libraries, please refer to the links: Installing Arduino libraries and Installing cores
3. With the ESP32 platform installed, select “XinaBox CW02 (ESP32)”. To select the board from the Arduino IDE, select Tools >Board “XinaBox CW02”.
3. Create Azure IoT Hub account1. Login to your Azure IoT account.
2. Create a new IoT Hub resource. See this guide on how to do that.
1. Select IoT devices from the menu.
2. Click on +Add button
3. Enter a new name for your device. Click Save
1. Link Azure IoT with Power BI to visualize real-time data, see this guide on how to do that.
2. Run Azure Stream Analytics job. Wait a few minutes for it to start.
3. Upload the code to CW02.
4. Click on MyWorkspace>dataset>data. You will see a list of variables in the table column.
5. Select Line chart from VISUALIZATIONS. Drag and drop EventEnqueuedUtcTime into Axis, and select weather variables.
You should be able to see weather values on the chart now.
In this tutorial, we have shown you how to make a Weather station using CW02, SW01 and IP01/IP02, connected to Microsoft Azure IoT hub. Thus, enabling remote monitoring and sensing.
Comments