Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the ARDUINO_* constants #956

Open
alranel opened this issue Dec 15, 2023 · 1 comment
Open

Document the ARDUINO_* constants #956

alranel opened this issue Dec 15, 2023 · 1 comment

Comments

@alranel
Copy link
Member

alranel commented Dec 15, 2023

The official Arduino cores define a set of constants that can be used to write more portable sketches and code by identifying the architecture and board being used.

We have architecture-specific constants such as:

  • ARDUINO_ARCH_AVR
  • ARDUINO_ARCH_SAMD

As well as board-specific constants such as:

  • ARDUINO_GIGA
  • ARDUINO_UNOR4_WIFI

We should add a page to the language reference documenting all the available constants.

@alranel
Copy link
Member Author

alranel commented Jan 5, 2024

Bonus: add a link to a dedicated page on best practices for writing portable code, showing how to use such constants for common board-specific tasks such as pin numbers or Wire object to use etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant