Menu

ArduinoSample

Jim

Arduino Hardware Device

This is a sample project that runs on an Arduino open source hardware device, For more information or Arduino please look at http://www.arduino.cc

  • get an Arduino Uno board from the Arduino store or another distributor. Choose either a board with an integrated Ethernet connector or add an Ethernet shield
  • download the Arduino software from http://arduino.cc/en/Main/Software and follow the installation inctructions
  • download the sample code from http://sourceforge.net/projects/m2mlabs/files/samples/samples.zip/download
  • load samples/arduino/SimpleDevice/SimpleDevice.ino into the Arduino IDE
    Arduino Sample
  • edit the MAC Address so that is equal to the MAC address of your board. You will find the mac address on a sticker on the back of the ethernet shield
  • enter server specific configuration data in the sketch (apikey, m2mlabs server ip address, m2mlabs server port)
  • edit the device name, sensor name and attribute name as you have defined in the m2mlabs admin GUI. How to create device models, sensor models and devices is described in the Tutorial
  • the sample program reads values on analog input 0 of the board
  • download to the board and press the reset button on the board
  • the serial monitor on the Arduino IDE allows you check if the connection is open and data is sent
  • check if data was received on the m2mlabs admin GUI at http://localhost/cs-ws:8080 or run the monitor at http://localhost/cs-ws:8080/monitor.html. The usage of the monitor is described in the Monitor Tutorial

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.