Satoyama Sensor Network node stack. This stack is designed to connect chibis and sabotens to Satoyama API. Created by Future Lab based on Freaklabs open hardware.
(List of provided parts: board, sensors, batteries, etc.)
(NOTE: Add mark on saboten board to connect the FTDI Breakout board in the right direction!!)
- Arduino IDE 1.0.6 (Does not work with Arduino 1.5.8 BETA). Get it here
- git
Follow these steps to set up a Satoyama sensor node!
- Download this repository: $ git clone https://github.com/DgFutureLab/satoyama-node.git
- Go into the new directory: $ cd satoyama-node
- Download all the libraries: $ git pull && git submodule init && git submodule update && git submodule status
Import the required libraries into your Arduino IDE:
- satoyama-libs/SatoyamaChibiLib
- satoyama-libs/SdFat
- satoyama-libs/chibiArduino-master
- satoyama-libs/PCF2127
- satoyama-libs/Humidity_Temperature_Sensor
- satoyama-libs/NewPing
If you use the standard Arduino GUI, go to Sketch → Import Library → Add Library and select each library name folder.
For the Saboten board:
- Copy the folder 'mighty-1284p-freaklabs' inside satoyama-libs to a folder called 'hardware' off your sketches directory, e.g. /Users/maniacbug/Source/Arduino/hardware/mighty-1284p In a Mac environment: Arduino.app/contents/resources/Java/hardware/
- Restart the IDE
- Select Tools > Board > Freaklabs Saboten...
- Attach a sonnar, a temperature sensor and a humidity sensor. The pin numbers are specified in this file (6 for sonar, 0 for temp/humidity)
- Connect the board to the computer
-In case of the Saboten: Check that the FTDI Breakout board switch is on 5V
-
For OSX users, download the FTDI drivers from http://www.ftdichip.com/Drivers/VCP.htm
-
Open test_saboten/test_saboten.ino (for saboten)
-
Open File>Examples>Chibiarduino-master>4.cmdline (for Chibi)
-
Select your board on the dropdown menu Tool>Board>(FreakLabs Saboten for the saboten) or (Arduino Pro or ProMini (3.3V, 8MHz) w/ATmega328)
-
Upload it to the board
-
Open Arduino IDE's Serial Monitor
-
Set the communication to Carriage return and 57600 baud
-
Set the short address of this collector node by hand writing setsaddr <address> in the serial monitor command prompt. The address should be in HEXADECIMAL. (The address is currently (as of Jan, 2015) set via the script in satoyama-konohana)
-
Upload collector/collector.ino into your Saboten board. (Include all the necessary libs from third-party-libs folder)
Before we wrote the sketches using the Arduino GUI, but now we use standard CMake to generate make files.
- Install CMake (e.g. brew install cmake on OSX)
- Change directory into the folder containing the source code that you want to run on the board.
- mkdir build (all the build files will be stored in this directory)
- Navigate to build directory: cd build
- compile source code and upload to the device: cmake .. -Wno-dev && make && make upload (make sure that the build directory is empty, as CMake will complain otherwise)
- Use screen to monitor output from the serial device (e.g. tty.usbserial-A501K9HW): /dev/tty.usbserial-A501K9HW 57600,sc8