File info
Albums
View Video
Main Video info
| Title: |
Arduino & xbee tutorial - transmit from seperate arduino wirelessly to pc or mac
|
| Album: |
|
| Description: |
Something i found difficult to begin with, as there were not that many tutorials. This is a quick example including code to get an arduino with xbee shield, talking to a separate arduino - atmel board, connected to usb. I use a potentiometer as a way of verifying the code is working and that it is correctly transmitting. sorry about the audio - i took this with my g2 this is the code without the extra bits not needed in the tutorial (shortened) int ledpin = 0; // select the pin for the analog port 0 int val = 0; // variable to store value coming from sensor void setup() { Serial.begin(2400); } void loop() { val = analogread(ledpin); // read value from sensor sendvalue (val); delay(100); // stop the program for some time } void sendvalue (int val){ //new function Serial.print(val); //print value to xbee (serial port) Serial.print(" "); //print a space so we can see }
|
| Category: |
|
| Tags: |
|
| URL: |
|
| Embed: |
|
Comments
Order by:
Per page:
- There are no comments yet





