Arduino RFID example


SUBMITTED BY: Guest

DATE: Oct. 20, 2013, 3:04 p.m.

FORMAT: Text only

SIZE: 726 Bytes

HITS: 1029

  1. /*
  2. INSTRUCTIONS:
  3. =============
  4. Connections:
  5. ------------
  6. 1. Connect 5V of Arduino to 5V of RFID module.
  7. 2. Connect GND of Arduino to GND of RFID module.
  8. 3. Connect Digital Pin 2 of Arduino to TX pin of RFID module.
  9. To read output:
  10. --------------
  11. 1. Upload the code and open the serial monitor by pressing Ctrl+Shift+M
  12. 2. Swipe a card and see what output you're getting on the serial monitor.
  13. */
  14. #include <SoftwareSerial.h>
  15. SoftwareSerial mySerial(2, 3); // RX, TX
  16. void setup()
  17. {
  18. Serial.begin(9600);
  19. mySerial.begin(9600);
  20. }
  21. void loop() // run over and over
  22. {
  23. if (mySerial.available())
  24. Serial.println(mySerial.read());
  25. }

comments powered by Disqus