Skip to content

Instantly share code, notes, and snippets.

@krdarrah
krdarrah / powerOutage.cpp
Created June 29, 2021 16:53
Particle Boron Power Outage Detector
String str1,str2;
bool onUSB = false;
bool onBattery = false;
bool lowBattery = false;
unsigned long pwrCheckTimeStart;//to check power every 10sec
void setup() {
// INITIAL POWER CHECK
int powerSource = System.powerSource();
@krdarrah
krdarrah / ATMEGA328P_TEST.ino
Last active April 1, 2024 20:25 — forked from speters/uid.ino
Arduino atmega328p unique id/serial number
//found this code here
//https://gist.github.com/speters/f889faec42b510052a6ab4be437d38ca
//Purpose is to simply run a memory check on ATMEGA238P to test for counterfeit parts
#include <avr/boot.h>
#define SIGRD 5
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);