Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente Dernière révision Les deux révisions suivantes | ||
id-12la [2016/05/23 15:34] colin |
id-12la [2018/05/25 22:57] colin |
||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | ====== RFID ====== | + | ====== ID12LA ====== |
- | ID-12LA fonctionne jusqu'à environ 2.5 cm de distance | + | ID-12LA fonctionne jusqu'à environ 2.5 cm de distance. |
+ | Le rafraîchissement des données se fait à environ 8Hz. | ||
Liens : | Liens : | ||
Ligne 7: | Ligne 8: | ||
[[http://bildr.org/2011/02/rfid-arduino/|http://bildr.org/2011/02/rfid-arduino/]] | [[http://bildr.org/2011/02/rfid-arduino/|http://bildr.org/2011/02/rfid-arduino/]] | ||
[[https://hcgilje.wordpress.com/resources/rfid_id12_tagreader/|https://hcgilje.wordpress.com/resources/rfid_id12_tagreader/]] | [[https://hcgilje.wordpress.com/resources/rfid_id12_tagreader/|https://hcgilje.wordpress.com/resources/rfid_id12_tagreader/]] | ||
+ | [[https://www.raspberrypi.org/forums/viewtopic.php?t=31552|Raspberry]] | ||
Datasheet : | Datasheet : | ||
Ligne 15: | Ligne 17: | ||
Attention au conflit de port sur l'entrée RX 0. | Attention au conflit de port sur l'entrée RX 0. | ||
Il faut débrancher le port 0 pour téléverser le programme. | Il faut débrancher le port 0 pour téléverser le programme. | ||
- | Pour cette raison, j'ai utilisé la librairie SoftwareSerial. | + | Pour cette raison, j'ai utilisé la librairie SoftwareSerial pour éviter ce problème. |
+ | |||
+ | Si 2 tags sont en même temps cela ne fonctionne pas ! | ||
<code c> | <code c> | ||
+ | /* | ||
+ | * Author : http://bildr.org/2011/02/rfid-arduino/ and Colin Bouvry | ||
+ | */ | ||
+ | |||
#include <SoftwareSerial.h> | #include <SoftwareSerial.h> | ||
Ligne 67: | Ligne 75: | ||
if(strlen(tag) == 0) return; //empty, no need to contunue | if(strlen(tag) == 0) return; //empty, no need to contunue | ||
Serial.println(tag); //read out any unknown tag | Serial.println(tag); //read out any unknown tag | ||
- | } | ||
- | |||
- | void lightLED(int pin){ | ||
- | /////////////////////////////////// | ||
- | //Turn on LED on pin "pin" for 250ms | ||
- | /////////////////////////////////// | ||
- | Serial.println(pin); | ||
- | |||
- | digitalWrite(pin, HIGH); | ||
- | delay(250); | ||
- | digitalWrite(pin, LOW); | ||
} | } | ||