miguelbalboa / rfid

Arduino RFID Library for MFRC522
The Unlicense
2.74k stars 1.43k forks source link

Added ESP8266 support and documentation. #562

Closed Spoozy closed 3 years ago

Spoozy commented 3 years ago
Q A
Bug fix? no
New feature? yes
Doc update? yes
BC breaks? no
Deprecations? no
Fixed tickets no
Rotzbua commented 3 years ago

Hi, thanks for your PR. A full list of pin configs is available at: https://github.com/miguelbalboa/rfid#pin-layout Updating every example with new pin layouts for a lot of board is a bit overdocumentation. Maybe it would be useful to have a link to the readme in every example.

Spoozy commented 3 years ago

No worries, although I could change the documentation, the most important thing is to have the constexpr uint8_t RST_PIN = D3; as the normal #define RST_PIN 9 doesn't work using the ESP8266 from what I have tested. I will implement the link to the README :)

hochwasser commented 3 years ago

What is the problem when the define got replaced with const or sonstexpr? Does this break old code? If not, I would suggest replacing the defines.

Rotzbua commented 3 years ago

@hochwasser The problem is that all tutorials and instructions with this library uses #defines. The usage of constexpr would not break anything but confuses Arduino beginners.

I created a fork #522 which targets new concepts.

Rotzbua commented 3 years ago

@Spoozy the pr conflicts so I added the hint the link to the readme to every example. I think that is the initial intention of the pr. Thanks for contribution 👍

hochwasser commented 3 years ago

@Rotzbua I understand that constexpris a relatively new. const could also be used in this situation.