Git Product home page Git Product logo

board_identify's Introduction

Arduino IDE GitHub version GitHub Release Date GitHub stars GitHub issues Codacy grade GitHub license

Board Identify

An Arduino library which allows identification of the make, model and MCU of board/controller which the code was compiled for. Currently supports identification of over 100 different boards including all Arduino/Genuino, Teensy, ESP8266, ESP32, BBC micro:bit and Digispark boards.

Please note, some boards share the same identifiers and so can't be distinguished between. When this is the case, both boards will be returned.

How to Install

For details on how to install libraries in the Arduino IDE, please see the Arduino website.

How to Use

A full example is provided with the library and can be found in the Arduino IDE under "File->Examples->Board_Identify".

Firstly, you must include the library in your sketch:

#include <Board_Identify.h>

Board Identify uses the namespace "BoardIdentify" to prevent conflicts with other libraries. You can therefor access the board information as follows:

Serial.print(F("Board Type: "));
Serial.println(BoardIdentify::type); 
Serial.print(F("Board Make: "));
Serial.println(BoardIdentify::make); 
Serial.print(F("Board Model: "));
Serial.println(BoardIdentify::model); 
Serial.print(F("Board MCU: "));
Serial.println(BoardIdentify::mcu); 

It is advised to use BoardIdentify::type for any logic as it will never be changed and so should maintain future compatibility.

Adding this line before the library is included will cause a warning in the compile output window containing the identified board:

#define BOARD_IDENTIFY_WARNING

If warnings still don't display, ensure "File->Preferences->compiler warnings" is set to "Default".

Even doing this, some boards still won't display the warning in the compile window but the constants will still be created.

Currently Supported Boards

Over 100 boards/controllers are currently supported including:

  • All Arduino/Genuino AVR
  • All Arduino SAM
  • All Arduino SAMD
  • All Adafruit AVR
  • All Arduboy
  • All Digispark
  • ESP8266 boards including NodeMCU, SparkFun ESP8266 Thing, WeMos boards and Adafruit ESPino
  • ESP32 based boards inlcuding Node32s, Adafruit ESP32 Feather and SparkFun ESP32 Thing
  • nRF52832 / nRF51 based boards including BBC micro:bit and RedBearLab boards
  • All Teensy

Planned Improvements/Changes

For planned changes, improvements and known bugs please visit the Github issues tracker.

board_identify's People

Contributors

mattfryer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.