i want to make a WSN with 2 xbees and 1 arduino. i want to take measurements from a wireless spot[ with 2 sensons(1 tmp36 and 1 ultrasonic parallax) and 2 AA batteries] using my arduino that is connected to my pc.check out my equipment.how should i build my circuit? what code do i have to use?
nick8's image
Use examples to see how you need to work with the individual components; both connection-wise and code-wise.
Once you understand it all
1)
decide on the wiring and solve conflicts that arise; e.g. your examples for the sensors might use the same pins or share pins with the xbee.
2)
Take pieces of the code in the examples and place them in your code; do it one step at a time.
Note
You can not run your Uno from 2 AA batteries without modifying it. The Uno runs on 16MHz and that frequency is out of range when you power the Uno with 3V.
i will run only the sensors from the batteries the arduiono will be powered from the pc
how would i transfer the 2 singnals into the arduino? what code do i have to use?i made the circuit i configured the 2 xbees but i dont know how to use my sensors now remotely.
Can you communicate between the two xbees? If so, please share the transmit code? Do you have links to the sensors; the distance sensor looks like a HC-SR04; I have no idea what a tmp16 is (tmp probably stands for temperature).