Skip to content

Instantly share code, notes, and snippets.

View bauerjj's full-sized avatar

Justin bauerjj

View GitHub Profile
@bauerjj
bauerjj / wemosd1
Created February 8, 2019 06:26
wemos D1 occupancy sensor
/*
* https://howtomechatronics.com/tutorials/arduino/ultrasonic-sensor-hc-sr04/
* https://codebender.cc/sketch:356078#HC-SR04%20Ultrasonic%20Sensor%20Example.ino
* https://einstronic.com/store/controller/esp8266/wemos/wemos-d1-mini-esp8266-wifi-development-board/
*
* Uses: https://github.com/gamo256/dweet-esp
*/
#include <ESP8266WiFi.h>
/**
* Simple routine that performs the following:
* 1. Configures the software UART on pins 2 and 4 (RX,TX)
* 2. Increments a 32-bit variable every 500ms
* 4. If it receives a '1' character from bluetooth, it toggles an LED
*
* @author Justin Bauer - mcuhq.com
* @date 4.24.2016
*/
@bauerjj
bauerjj / bluetooth-hc06.ino
Last active April 22, 2016 08:03
Arduino hc-06 example
/**
* Simple routine that performs the following:
* 1. Blink the on-board status LED every 500ms
* 2. Configures the software UART on pins 2 and 4 (RX,TX)
* 3. Continuously sends the string "hello" to the bluetooth module every 500ms
* 4. If it receives a character from bluetooth, it echos it back
*
* @author mcuhq.com
*/