- Tue Mar 24, 2015 7:27 am
#7087
1 Pre-Setting
Could be found on the wiki .
Tips:
how to avoid to Run as Administrator every time
Use the setting below to both APC220
2 Upload sketch to each board
My test was on Uno & Leonardo( Serial1)
Uno as receiver:
For Leonardo as sender:
3 Plug into two arduino boards
4 Result
After all above, you could see the Uno LED blink in different way according different data send by another Apc220 on Leonardo.
And I take it downstairs to test its transmission distance:
1. I was in 4 floor, another one( Romeo ) was put on my table on the 6 floor. I could still received the signal.
2 I went out from the building to the lakeside, it's still flashing, the distance might be 100-200m. And there's a lot of buildings around.
Another similar one on both Uno.
1 Pre-Setting
Could be found on the wiki .

how to avoid to Run as Administrator every time

2 Upload sketch to each board
My test was on Uno & Leonardo( Serial1)

Uno as receiver:
Code: Select all
//uno as receiver
void setup(){
Serial.begin(9600);
pinMode(13,OUTPUT);
}
void loop(){
char Data = '2';
if(Serial.available()>0){
Data = Serial.read();
Serial.flush();
}
switch ( Data ) {
case '0':
blink0();
break;
case '1':
blink1();
break;
default :
break;
}
}
void blink0(){
int i=0;
while(i<3){
i++;
digitalWrite(13,HIGH);
delay(500);
digitalWrite(13,LOW);
delay(500);
}
}
void blink1(){
int i=0;
while(i<2){
i++;
digitalWrite(13,HIGH);
delay(100);
digitalWrite(13,LOW);
delay(1000);
}
}
For Leonardo as sender:
Code: Select all
//leonardo as sender
boolean flo = 0;
void setup(){
Serial1.begin(9600);
}
void loop(){
Serial1.println(flo);
Serial1.flush();
delay(3000);
flo=!flo;
}
3 Plug into two arduino boards
4 Result
After all above, you could see the Uno LED blink in different way according different data send by another Apc220 on Leonardo.

And I take it downstairs to test its transmission distance:
1. I was in 4 floor, another one( Romeo ) was put on my table on the 6 floor. I could still received the signal.
2 I went out from the building to the lakeside, it's still flashing, the distance might be 100-200m. And there's a lot of buildings around.
Another similar one on both Uno.
Last edited by Leff on Mon Jun 01, 2015 9:33 am, edited 3 times in total.