-
Notifications
You must be signed in to change notification settings - Fork 1
How to: Deploy an Arduino Node
This How-to will guide you through the process of deploying a SmartCampus sensor platform running the SmartCampusOS.
- Having the Arduino IDE installed (v. 1.0.6 and above)
The Arduino platforms use shields to extends their capacity. Without powering the Arduino, plug a sensor shield. The picture bellow shows a Grove base shield plugged on the top of an Arduino Uno.
git clone https://github.com/SmartCampus/ArduinoSensorServer.git
If you don't know where is your local Arduino libraries:
- Open the Arduino IDE
- Go in Preferences
- The libraries folder is located in /libraries
Go where you have previously cloned (step 1) the SmartCampusOS and open the sensorRepository/sensorRepository.ino file.
All boards in a same sensor network must have an unique name. Choose an unique name (e.g. ARD_1_443) and type it in the BOARD_ID definition
SmartCampusOS provides support for wired (USB) and wireless (Xbee) communications.
You have to specify, on the top of the sensorRespository.ino file, a USE_SERIAL definition
#define USE_SERIAL
- You have to specify, on the top of the sensorRespository.ino file, a USE_XBEE definition
#define USE_XBEE
- Configure the XBEE chip (upcoming how-to)
- Connect the Arduino board to your computer using the USB cable (the green power LED should go on).
- (A dialog box might telling you that a new network interface has been detected. Just click OK)
- In the Arduino IDE, choose the right serial port in Tools>Serial Port (usually /dev/tty.usbmodemxxx on MacOS, COMx on Windows, /dev/ttyACMx on Linux)
- Click the "Upload" button in the Arduino IDE. The compilation and uploading process might might take up to several seconds (depending on your computer configuration). The process is finished when "Done uploading" appears in the status bar.
If you are using a wired communication, your Arduino running SmartCampusOS is now ready to be deployed :) Otherwise, one more step is needed to achieve the deployment.
POWER OFF THE ARDUINO
Some sensor shields already integrates a XBee socket (e.g. The DFRobot I/O Expansion Shield). In this case, just plug the chip in its socket.
If your sensor shield doesn't provide a XBee socket, you have to use a XBee shield (e.g. Arduino Wireless Proto Shield). This shield will be plugged on the sensor shield.
Then power on the Arduino and it is ready to be used in wireless environment