All Projects → skoumalcz → arduino-id-guard

skoumalcz / arduino-id-guard

Licence: Apache-2.0 license
Tiny library to avoid deploying your sketch to wrong device.

Programming Languages

C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to arduino-id-guard

Arduino
🚀 Proyectos de todo tipo para arduino utilizando sus sensores y actuadores. 🤖
Stars: ✭ 27 (+28.57%)
Mutual labels:  arduino-library, arduino-sketch
arduino-primo-tutorials
Here some tutorials to explain and show how to make use of the new features of the Arduino Primo and Arduino Primo Core, such as Wifi, BLE, NFC, InfraRed and various sensors. Hope you can find this helpful to create amazing stuff, save the planet or make a cool project to look smart at the dinning table with your uncles.
Stars: ✭ 12 (-42.86%)
Mutual labels:  arduino-library, arduino-sketch
Sim800L-Arduino-Library-revised
HIGH SCHOOL PROJECT - The purpose of this Arduino library is to allow the use of the SIM800L module in a simple and transparent way.
Stars: ✭ 81 (+285.71%)
Mutual labels:  arduino-library, arduino-sketch
Esp32 Ble Mouse
Bluetooth LE Mouse library for the ESP32 (Arduino IDE compatible)
Stars: ✭ 180 (+757.14%)
Mutual labels:  arduino-library
Duetimer
⏳ Timer Library fully implemented for Arduino DUE
Stars: ✭ 184 (+776.19%)
Mutual labels:  arduino-library
Arduinostl
An STL and iostream implementation based on uClibc++ that supports my CS-11M class.
Stars: ✭ 201 (+857.14%)
Mutual labels:  arduino-library
Linkedlist
🔗 A fully implemented LinkedList made to work with general Microcontrollers and Arduino projects
Stars: ✭ 241 (+1047.62%)
Mutual labels:  arduino-library
Arduino Applemidi Library
Send and receive MIDI messages over Ethernet (rtpMIDI or AppleMIDI)
Stars: ✭ 177 (+742.86%)
Mutual labels:  arduino-library
Arduinowebsockets
A library for writing modern websockets applications with Arduino (ESP8266 and ESP32)
Stars: ✭ 213 (+914.29%)
Mutual labels:  arduino-library
Esp Webota
Simple web based Over-the-Air (OTA) updates for ESP based projects
Stars: ✭ 189 (+800%)
Mutual labels:  arduino-library
Teensystep
Fast Stepper Motor Library for Teensy boards
Stars: ✭ 191 (+809.52%)
Mutual labels:  arduino-library
Md max72xx
LED Matrix Library
Stars: ✭ 186 (+785.71%)
Mutual labels:  arduino-library
Dsckeybusinterface
An Arduino/esp8266/esp32 library to directly interface with DSC security systems.
Stars: ✭ 202 (+861.9%)
Mutual labels:  arduino-library
Corsairlightingprotocol
Control LEDs connected to an Arduino with iCUE, create an unofficial Corsair iCUE compatible Arduino LED controller.
Stars: ✭ 182 (+766.67%)
Mutual labels:  arduino-library
Arduino Tvout
Arduino-TVout
Stars: ✭ 216 (+928.57%)
Mutual labels:  arduino-library
Acebutton
An adjustable, compact, event-driven button library for Arduino that debounces and dispatches events to a user-defined event handler.
Stars: ✭ 180 (+757.14%)
Mutual labels:  arduino-library
Lpd8806
Arduino library for LED strips and pixels using LPD8806 (and probably LPD8803/LPD8809)
Stars: ✭ 207 (+885.71%)
Mutual labels:  arduino-library
Dmxserial
An Arduino library for sending and receiving DMX packets.
Stars: ✭ 190 (+804.76%)
Mutual labels:  arduino-library
Rf24audio
Arduino library for streaming data/audio from analog inputs via NRF24L01 modules
Stars: ✭ 190 (+804.76%)
Mutual labels:  arduino-library
Radio
An Arduino library to control FM radio chips like SI4703, SI4705, RDA5807M, TEA5767.
Stars: ✭ 193 (+819.05%)
Mutual labels:  arduino-library

IdGuard - Arduino hardware ID

Tiny library to avoid deploying your sketch to wrong device or to identify device by its ID. Writes device ID in EEPROM memory and verifies if it matches ID hardcoded in your sketch.

Usage

#include "IdGuard.h"

#define DEVICE_ID 2

int ledPin = 13;

void setup() {

  // Optional offset to write ID in 4th byte from the end in EEPROM.
  // Defaults to 0, which means ID is stored in last byte in EEPROM.
  IdGuard.offset = 3;

  // Recommended, but optional led for error signalization.
  IdGuard.error_led_pin = ledPin;

  // Writes DEVICE_ID to EEPROM memory.
  // LED defined by error_led_pin blinks I and D letters in Morse code "..|-..".
  // Restarts device to prevent execution of any following code.
  // Comment out this line after ID is successfully stored in EEPROM.
  IdGuard.writeIdAndRestartDevice(DEVICE_ID);

  // Checks DEVICE_ID against last byte in EEPROM memory.
  // Blinks I and D in morse code "..|-.."and restarts device in case of
  // mismatch to prevent execution of any following code.
  IdGuard.forceId(DEVICE_ID);

  // Only reads ID from EEPROM.
  uint8_t device_id = IdGuard.readId();

}

void loop()
{
  // main loop will be never called in case of ID mismatch thanks to IdGuard
}

Credits

Jakub Dolejsek
David Vadura

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].