Valentin Bruchet
/
a_ID12RFID_HelloWorld
RFID
main.cpp@2:0328f7d52450, 2021-05-05 (annotated)
- Committer:
- valentinbruchet
- Date:
- Wed May 05 08:16:02 2021 +0000
- Revision:
- 2:0328f7d52450
- Parent:
- 1:2c017f3d2d04
RFID;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
simon | 1:2c017f3d2d04 | 1 | // Hello World for printing RFID tag numbers |
simon | 0:df71eb8a3c0b | 2 | |
simon | 0:df71eb8a3c0b | 3 | #include "mbed.h" |
simon | 0:df71eb8a3c0b | 4 | #include "ID12RFID.h" |
simon | 0:df71eb8a3c0b | 5 | |
valentinbruchet | 2:0328f7d52450 | 6 | ID12RFID rfid(PA_10); |
simon | 0:df71eb8a3c0b | 7 | |
valentinbruchet | 2:0328f7d52450 | 8 | int main() |
valentinbruchet | 2:0328f7d52450 | 9 | { |
valentinbruchet | 2:0328f7d52450 | 10 | while(1) |
valentinbruchet | 2:0328f7d52450 | 11 | { |
valentinbruchet | 2:0328f7d52450 | 12 | if(rfid.readable()) |
valentinbruchet | 2:0328f7d52450 | 13 | { |
valentinbruchet | 2:0328f7d52450 | 14 | printf("RFID Tag number : %d\n\r", rfid.read()); |
simon | 0:df71eb8a3c0b | 15 | } |
valentinbruchet | 2:0328f7d52450 | 16 | |
simon | 0:df71eb8a3c0b | 17 | } |
simon | 0:df71eb8a3c0b | 18 | } |