SlideShare una empresa de Scribd logo
1 de 11
Descargar para leer sin conexión
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 http://faludi.com
*/
// used for communication via xbee api
import processing.serial.*;
// xbee api libraries available at http://code.google.com/p/xbee-api/
// 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 log4j.properties 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("")+"log4j.properties");
// Print a list in case the selected one doesn't work out
println("Available serial ports:");

154 | Chapter 5: API and a Sensor Network

Más contenido relacionado

Similar a Simple sensor-network

20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Jorisimec.archive
 
E yantra robot abstractions
E yantra robot abstractionsE yantra robot abstractions
E yantra robot abstractionsAkshar Desai
 
WIFI ESP01 interfacing with Arduino UNO with Sensor DHT11
WIFI ESP01 interfacing with Arduino UNO with Sensor DHT11WIFI ESP01 interfacing with Arduino UNO with Sensor DHT11
WIFI ESP01 interfacing with Arduino UNO with Sensor DHT11hussain0075468
 
Network Automation Tools
Network Automation ToolsNetwork Automation Tools
Network Automation ToolsEdwin Beekman
 
How to Connect SystemVerilog with Octave
How to Connect SystemVerilog with OctaveHow to Connect SystemVerilog with Octave
How to Connect SystemVerilog with OctaveAmiq Consulting
 
Starting with Arduino
Starting with Arduino Starting with Arduino
Starting with Arduino MajdyShamasneh
 
Lviv MD Day 2015 Олексій Озун "Introduction to the new Apple TV and TVos"
Lviv MD Day 2015 Олексій Озун "Introduction to the new Apple TV and TVos"Lviv MD Day 2015 Олексій Озун "Introduction to the new Apple TV and TVos"
Lviv MD Day 2015 Олексій Озун "Introduction to the new Apple TV and TVos"Lviv Startup Club
 
Report for weather pi
Report for weather piReport for weather pi
Report for weather piAsutosh Hota
 
Tutorial Penggunaan CodeVision AVR dengan Bahasa C
Tutorial Penggunaan CodeVision AVR dengan Bahasa CTutorial Penggunaan CodeVision AVR dengan Bahasa C
Tutorial Penggunaan CodeVision AVR dengan Bahasa CMuhammad Kennedy Ginting
 
EC6612 VLSI Design Lab Manual
EC6612 VLSI Design Lab ManualEC6612 VLSI Design Lab Manual
EC6612 VLSI Design Lab Manualtamil arasan
 
Cvavr getting started with atmel studio
Cvavr getting started with atmel studioCvavr getting started with atmel studio
Cvavr getting started with atmel studioBayu Agung
 
Embedded system (Chapter 2) part 2
Embedded system (Chapter 2) part 2Embedded system (Chapter 2) part 2
Embedded system (Chapter 2) part 2Ikhwan_Fakrudin
 
Practical file
Practical filePractical file
Practical filerajeevkr35
 
Bare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and ChefBare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and ChefMatt Ray
 
Raising the Bar on Robotics Code Quality
Raising the Bar on Robotics Code QualityRaising the Bar on Robotics Code Quality
Raising the Bar on Robotics Code QualityThomas Moulard
 
IoT with OpenPicus Flyport
IoT with OpenPicus FlyportIoT with OpenPicus Flyport
IoT with OpenPicus FlyportIonela
 

Similar a Simple sensor-network (20)

20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris
 
Picmico
PicmicoPicmico
Picmico
 
Added value of SimWare
Added value of SimWareAdded value of SimWare
Added value of SimWare
 
embedded system and AVR
embedded system and AVRembedded system and AVR
embedded system and AVR
 
E yantra robot abstractions
E yantra robot abstractionsE yantra robot abstractions
E yantra robot abstractions
 
WIFI ESP01 interfacing with Arduino UNO with Sensor DHT11
WIFI ESP01 interfacing with Arduino UNO with Sensor DHT11WIFI ESP01 interfacing with Arduino UNO with Sensor DHT11
WIFI ESP01 interfacing with Arduino UNO with Sensor DHT11
 
Network Automation Tools
Network Automation ToolsNetwork Automation Tools
Network Automation Tools
 
How to Connect SystemVerilog with Octave
How to Connect SystemVerilog with OctaveHow to Connect SystemVerilog with Octave
How to Connect SystemVerilog with Octave
 
Starting with Arduino
Starting with Arduino Starting with Arduino
Starting with Arduino
 
Lviv MD Day 2015 Олексій Озун "Introduction to the new Apple TV and TVos"
Lviv MD Day 2015 Олексій Озун "Introduction to the new Apple TV and TVos"Lviv MD Day 2015 Олексій Озун "Introduction to the new Apple TV and TVos"
Lviv MD Day 2015 Олексій Озун "Introduction to the new Apple TV and TVos"
 
Report for weather pi
Report for weather piReport for weather pi
Report for weather pi
 
Tutorial Penggunaan CodeVision AVR dengan Bahasa C
Tutorial Penggunaan CodeVision AVR dengan Bahasa CTutorial Penggunaan CodeVision AVR dengan Bahasa C
Tutorial Penggunaan CodeVision AVR dengan Bahasa C
 
EC6612 VLSI Design Lab Manual
EC6612 VLSI Design Lab ManualEC6612 VLSI Design Lab Manual
EC6612 VLSI Design Lab Manual
 
IoT on Raspberry Pi
IoT on Raspberry PiIoT on Raspberry Pi
IoT on Raspberry Pi
 
Cvavr getting started with atmel studio
Cvavr getting started with atmel studioCvavr getting started with atmel studio
Cvavr getting started with atmel studio
 
Embedded system (Chapter 2) part 2
Embedded system (Chapter 2) part 2Embedded system (Chapter 2) part 2
Embedded system (Chapter 2) part 2
 
Practical file
Practical filePractical file
Practical file
 
Bare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and ChefBare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and Chef
 
Raising the Bar on Robotics Code Quality
Raising the Bar on Robotics Code QualityRaising the Bar on Robotics Code Quality
Raising the Bar on Robotics Code Quality
 
IoT with OpenPicus Flyport
IoT with OpenPicus FlyportIoT with OpenPicus Flyport
IoT with OpenPicus Flyport
 

Último

2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)Delhi Call girls
 
Pokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy TheoryPokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy Theorydrae5
 
2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)Delhi Call girls
 
WOMEN EMPOWERMENT women empowerment.pptx
WOMEN EMPOWERMENT women empowerment.pptxWOMEN EMPOWERMENT women empowerment.pptx
WOMEN EMPOWERMENT women empowerment.pptxpadhand000
 
the Husband rolesBrown Aesthetic Cute Group Project Presentation
the Husband rolesBrown Aesthetic Cute Group Project Presentationthe Husband rolesBrown Aesthetic Cute Group Project Presentation
the Husband rolesBrown Aesthetic Cute Group Project Presentationbrynpueblos04
 
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)Delhi Call girls
 
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Morcall Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Morvikas rana
 
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka
call Now 9811711561 Cash Payment乂 Call Girls in Dwarkacall Now 9811711561 Cash Payment乂 Call Girls in Dwarka
call Now 9811711561 Cash Payment乂 Call Girls in Dwarkavikas rana
 
KLINIK BATA Jual obat penggugur kandungan 087776558899 ABORSI JANIN KEHAMILAN...
KLINIK BATA Jual obat penggugur kandungan 087776558899 ABORSI JANIN KEHAMILAN...KLINIK BATA Jual obat penggugur kandungan 087776558899 ABORSI JANIN KEHAMILAN...
KLINIK BATA Jual obat penggugur kandungan 087776558899 ABORSI JANIN KEHAMILAN...Cara Menggugurkan Kandungan 087776558899
 
LC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdfLC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdfpastor83
 
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)Delhi Call girls
 
Call Girls In Mumbai Just Genuine Call ☎ 7738596112✅ Call Girl Andheri East G...
Call Girls In Mumbai Just Genuine Call ☎ 7738596112✅ Call Girl Andheri East G...Call Girls In Mumbai Just Genuine Call ☎ 7738596112✅ Call Girl Andheri East G...
Call Girls In Mumbai Just Genuine Call ☎ 7738596112✅ Call Girl Andheri East G...mitaliverma221
 

Último (14)

2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
 
Pokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy TheoryPokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy Theory
 
2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)
 
WOMEN EMPOWERMENT women empowerment.pptx
WOMEN EMPOWERMENT women empowerment.pptxWOMEN EMPOWERMENT women empowerment.pptx
WOMEN EMPOWERMENT women empowerment.pptx
 
the Husband rolesBrown Aesthetic Cute Group Project Presentation
the Husband rolesBrown Aesthetic Cute Group Project Presentationthe Husband rolesBrown Aesthetic Cute Group Project Presentation
the Husband rolesBrown Aesthetic Cute Group Project Presentation
 
(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7
(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7
(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7
 
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
 
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Morcall Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
 
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka
call Now 9811711561 Cash Payment乂 Call Girls in Dwarkacall Now 9811711561 Cash Payment乂 Call Girls in Dwarka
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka
 
KLINIK BATA Jual obat penggugur kandungan 087776558899 ABORSI JANIN KEHAMILAN...
KLINIK BATA Jual obat penggugur kandungan 087776558899 ABORSI JANIN KEHAMILAN...KLINIK BATA Jual obat penggugur kandungan 087776558899 ABORSI JANIN KEHAMILAN...
KLINIK BATA Jual obat penggugur kandungan 087776558899 ABORSI JANIN KEHAMILAN...
 
(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...
(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...
(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...
 
LC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdfLC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdf
 
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
 
Call Girls In Mumbai Just Genuine Call ☎ 7738596112✅ Call Girl Andheri East G...
Call Girls In Mumbai Just Genuine Call ☎ 7738596112✅ Call Girl Andheri East G...Call Girls In Mumbai Just Genuine Call ☎ 7738596112✅ Call Girl Andheri East G...
Call Girls In Mumbai Just Genuine Call ☎ 7738596112✅ Call Girl Andheri East G...
 

Simple sensor-network

  • 1. Simple Sensor Network Parts 142 | Chapter 5: API and a Sensor Network
  • 2. μ μ Prepare Your Coordinator Radio Simple Sensor Network | 143
  • 3. Pan ID: _____________________________ Prepare Your Router Radios Prepare the Sensor Boards 144 | Chapter 5: API and a Sensor Network
  • 4. +++ ATID ATDH 0 ATDL ATDL 0 ATJV1 ATD02 ATIR3E8 ATWR ATDL Connect voltage regulator circuit and power jack to breadboard Simple Sensor Network | 145
  • 5. μ μ μ 146 | Chapter 5: API and a Sensor Network
  • 6. Router XBee connection to power Simple Sensor Network | 147
  • 7. Temperature input Second sensor board Prepare the Base Station Connect to computer 148 | Chapter 5: API and a Sensor Network
  • 9. Program the Base Station 152 | Chapter 5: API and a Sensor Network
  • 11. Simple Sensor Network display code in Processing /* * Draws a set of thermometers for incoming XBee Sensor data * by Rob Faludi http://faludi.com */ // used for communication via xbee api import processing.serial.*; // xbee api libraries available at http://code.google.com/p/xbee-api/ // 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 log4j.properties 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("")+"log4j.properties"); // Print a list in case the selected one doesn't work out println("Available serial ports:"); 154 | Chapter 5: API and a Sensor Network