Arduino
Connect an Arduino UNO board to the WSO2 IoT Server and visualize the sensor data. The following subsections explain how you can work with the Arduino device type:
Prerequisites
- An Arduino UNO Board.
- An Adafruit WiFi Shield for Arduino.
- An LED bulb connected to Pin 13. If you do not have the pin use a pin available on the board.
- A Resister (example: 330 ohms)
Starting the Arduino
Sign in to the Device Management console.
- Click Enroll New Device.
- Click Arduino to enroll a device of the type Arduino.
- Mount the WiFi shield onto the Arduino-UNO board.
- Connect the LED bulb to the Arduino as shown below.
- Download the Arduino agent:
- Click Download Sketch.
- Enter a preferred name on the download agent form.
- Click DOWNLOAD NOW.
- Create a folder by the name
ArduinoBoardSketch
and move the downloaded agent and the source files to it. - Configure the following fields in the
ArduinoBoardSketch.h
file, which is in the Arduino agent file you downloaded.WLAN_SSID
- Provide the SSID of your Wi-Fi network.The
WLAN_SSID
cannot be longer than 32 characters.WLAN_PASS
- Provide the password of your Wi-Fi network.
SERVICE_PORT
- Provide thehttp
port of the WSO2 IoT Server
.
Example: 9763server
- Provide the IP address of the WSO2 IoT Server.deviceIP
- Provide the static IP address of Arduino.
Burn the sketch onto your Arduino board and run the program.
- Download the Arduino software.
- Open the Arduino agent file using the Arduino software.
- Add the
Adafruit_CC3000_Library-master
library. For more information, see Adafruit_CC3000_Library. - Click the upload button to run the program.
When the Arduino starts it will publish the internal temperature to the WSO2 IoT Server.
Try it out
Once you start your Arduino you can try out the following actions:
Action | Description |
---|---|
View device details | Navigate to the Device Details page to view the device details, carry out operations and monitor real-time data. |
Control the bulb |
|
Monitor real-time data | Click View Device Analytics to monitor real-time data via the Device Details page. Example: |
What's next
Follow the options given below to see what you can do next:
Navigate to the Device Management page to view all the devices created by you.
- Select a device from your device dashboard to check the available operations and monitor real-time data.