RFID, token does not work.
hello. have:
-atmega8 microboard m8
msx.cal24.pl/allegro/mb_m8/7.jpg
-usbasp programmer
msx.cal24.pl/elementy/usbasp_bialy/usbasp_przod.jpg
-rfid reader
nettigo.pl/products/48
-rs232<>usb converter
with converter read these id tokens:
my code is:
id 05007e09196b= token blue.
but when read blue token rfid reader program, program executes instructions 'else'. dont know wrong.
-atmega8 microboard m8
msx.cal24.pl/allegro/mb_m8/7.jpg
-usbasp programmer
msx.cal24.pl/elementy/usbasp_bialy/usbasp_przod.jpg
-rfid reader
nettigo.pl/products/48
-rs232<>usb converter
with converter read these id tokens:
code: [select]
05007e09196b blue token
0700437e506a yellow token
05003e2bfaea red token
my code is:
code: [select]
char c;
string msg;
int led = 4;
void setup() {
serial.begin(9600);
pinmode(led, output);
}
void loop() {
while(serial.available()>0){
c=serial.read();
msg += c;
}
if (msg.length() > 10) {
msg = msg.substring(1,13);
if (msg == "05007e09196b") {
digitalwrite(led, high);
} else {
digitalwrite(led, high);
delay(1000);
digitalwrite(led, low);
}
msg = "";
}
delay(300);
}
id 05007e09196b= token blue.
but when read blue token rfid reader program, program executes instructions 'else'. dont know wrong.
someone can me?
Arduino Forum > Using Arduino > Programming Questions > RFID, token does not work.
arduino
Comments
Post a Comment