Simple sensor-network
Upcoming SlideShare
Loading in...5

Simple sensor-network



How to build a radio network

How to build a radio network



Total Views
Views on SlideShare
Embed Views



1 Embed 2 2



Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

Simple sensor-network Simple sensor-network Document Transcript

  • Simple Sensor Network Parts 142 | Chapter 5: API and a Sensor Network
  • μ μ Prepare Your Coordinator Radio Simple Sensor Network | 143
  • Pan ID: _____________________________ Prepare Your Router Radios Prepare the Sensor Boards 144 | Chapter 5: API and a Sensor Network
  • +++ ATID ATDH 0 ATDL ATDL 0 ATJV1 ATD02 ATIR3E8 ATWR ATDL Connect voltage regulator circuit and power jack to breadboard Simple Sensor Network | 145
  • μ μ μ 146 | Chapter 5: API and a Sensor Network
  • Router XBee connection to power Simple Sensor Network | 147
  • Temperature input Second sensor board Prepare the Base Station Connect to computer 148 | Chapter 5: API and a Sensor Network
  • Simple Sensor Network | 149
  • Program the Base Station 152 | Chapter 5: API and a Sensor Network
  • Simple Sensor Network | 153
  • Simple Sensor Network display code in Processing /* * Draws a set of thermometers for incoming XBee Sensor data * by Rob Faludi */ // used for communication via xbee api import processing.serial.*; // xbee api libraries available at // Download the zip file, extract it, and copy the xbee-api jar file // and the log4j.jar file (located in the lib folder) inside a "code" // folder under this Processing sketch's folder (save this sketch, then // click the Sketch menu and choose Show Sketch Folder). import com.rapplogic.xbee.api.ApiId; import com.rapplogic.xbee.api.PacketListener; import com.rapplogic.xbee.api.XBee; import com.rapplogic.xbee.api.XBeeResponse; import com.rapplogic.xbee.api.zigbee.ZNetRxIoSampleResponse; String version = "1.01"; // *** REPLACE WITH THE SERIAL PORT (COM PORT) FOR YOUR LOCAL XBEE *** String mySerialPort = "/dev/tty.usbserial-A1000iMG"; // create and initialize a new xbee object XBee xbee = new XBee(); // make an array list of thermometer objects for display ArrayList thermometers = new ArrayList(); // create a font for display PFont font; void setup() { size(800, 600); // screen size smooth(); // anti-aliasing for graphic display // You'll need to generate a font before you can run this sketch. // Click the Tools menu and choose Create Font. Click Sans Serif, // choose a size of 10, and click OK. font = loadFont("SansSerif-10.vlw"); textFont(font); // use the font for text // The file is required by the xbee api library, and // needs to be in your data folder. You can find this file in the xbee // api library you downloaded earlier PropertyConfigurator.configure(dataPath("")+""); // Print a list in case the selected one doesn't work out println("Available serial ports:"); 154 | Chapter 5: API and a Sensor Network