Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

These examples run on the Arduino Due platform.

To run these examples, you need the following hardware:

  • an Arduino Due board.
  • the appropriate SmartMesh device for the sample application you want to run.
  • 6 jumper cables to connect the serial port of the SmartMesh device to that of the Arduino Due.
  • A micro-USB cable.

You need to download the following software:

  • the 

    SmartMesh C Library

     source code.
  • the Arduino IDE.

At the time of writing the default version of the Arduino IDE does not support the Arduino Due. Download the Arduino 1.5.8 BETA (or higher).

When you launch it, make sure you have the Arduino Due (Programming Port) in the Tools > Board menu.

Setup

You first need to connect the serial port of your SmartMesh device to the serial port of the Arduino Due. Although we are assuming you are using a DC9003 board, the process is equivalent for any SmartMesh device.

To avoid erroneous connections, we recommend you power off the SmartMesh device and Arduino Due boards.

Furthermore, remove the battery from the SmartMesh device. It will be powered by the Arduino Due board.

Arduino Due pinDC9003 pin
GNDGND
3.3VVBAT
TX1RX
RX1TX
GNDTX CTSn
3.3VRX RTSn

Connect a micro-USB cable between your computer and the Arduino Due's USB port labeled PROGRAMMING.

Next, Open the Arduino IDE and specify the following directory as the Sketchbook Location

sm_clib-X.X.X.X\examples\arduino\

Use the Sketch > Import Libraries... > Add Library... to add the following libraries to your Arduino installation:

  • sm_clib-X.X.X.X\sm_clib\
  • sm_clib-X.X.X.X\examples\arduino\Libraries\IpMgWrapper
  • sm_clib-X.X.X.X\examples\arduino\Libraries\IpMtWrapper
  • sm_clib-X.X.X.X\examples\arduino\Libraries\TriangleGenerator

These four libraries (sm_clibIpMgWrapperIpMtWrapperTriangleGenerator) now appear in the Sketch > Import Library... list.


You can now close the Arduino IDE, and double-click on one of the following sample applications to reopen the Arduino IDE with the right sample application:

  • sm_clib-X.X.X.X\examples\arduino\Triangle2manager\Triangle2manager.ino
  • sm_clib-X.X.X.X\examples\arduino\MoteBlink\MoteBlink.ino

MoteBlink Sample Application

The MoteBlink sample application interacts with a SmartMesh IP manager. It retrieves the list of SmartMesh IP motes in the network, and sends them commands to turn their blue LED on and off. When loaded onto the Arduino Due, you will see the LEDs on the motes in the network blink in a round-robin fashion.

  • To run the MoteBlink application, make sure your Arduino Due is connected to a SmartMesh IP manager.
  • To see the LEDs blink, you need to configure the SmartMesh motes in "master" mode.
  • To see the LEDs blink, you need to close the LED EN jumper on the DC9003 board.

Triangle2manager Sample Application


  • No labels