Skip to content

Instantly share code, notes, and snippets.

/*********************************************************************
PRESENCE USE ME THIS AINT BAD
This is an example for our nRF51822 based Bluefruit LE modules
Pick one up today in the adafruit shop!
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
@paulgorman
paulgorman / upstairs-light.php
Last active June 15, 2020 13:36
Unifi PHP LED light control using “unifi-php-api”
<?php
/*
At sundown, turn off upstairs Unifi AP status LED
At sunrise, turn status LED on
Crontab:
* * * * * ~/unifi-php-api/upstairs-light.php > /dev/null 2>&1
- Presence
*/
require_once('Client.php');
/*********************************************************************
Presence's fucking simon clock thing
*********************************************************************/
#include <Arduino.h>
#include <SoftwareSerial.h>
#include "Adafruit_BLE.h"
#include "Adafruit_BluefruitLE_SPI.h"
#include "Adafruit_BluefruitLE_UART.h"
#include "BluefruitConfig.h"