Skip to content

Instantly share code, notes, and snippets.

Anna Gerber AnnaGerber

Block or report user

Report or block AnnaGerber

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@AnnaGerber
AnnaGerber / MotionSensor.json
Created Jun 12, 2017
Home automation with Raspberry Pi and Apple Home Kit - node-red flows
View MotionSensor.json
[
{
"id": "bb87c61.ab4c438",
"type": "homekit-service",
"z": "35c3d6b9.82903a",
"accessory": "dcd28ec5.c286d",
"name": "Door Motion Sensor",
"serviceName": "MotionSensor",
"x": 603.5,
"y": 202,
View CampJS ESP8266 Wearables.md

Building Wearables Session at CampJS

Programming ESP8266 with EspruinoJS

Getting set up

The boards are flashed with Espruino. Install the CP2102 driver and Espruino IDE from the Chrome extensions store. See Anna's blog for more details.

Use the GPIO pin numbers in the code e.g. pin 4 not D2.

View README.md
View Instructions.md

Making an LED flower

Here's how to add an RGB LED to a silk flower

Use heat shrink tubing to insulate the leads on the LED. Use different colors of heatshrink so that you can identify the common lead later. image

Remove the green plastic core from a silk flower by pushing it out from the back image

@AnnaGerber
AnnaGerber / 11_piezo.py
Last active Sep 4, 2019
PyFirmata code for Freetronics Experimenter's Kit
View 11_piezo.py
import pyfirmata
import math
board = pyfirmata.Arduino("/dev/ttyACM0")
# connect piezo to pin 9 to use PWM
SENSOR_PIN = 0
PIEZO_PIN = board.get_pin('d:9:p')
it = pyfirmata.util.Iterator(board)
View RGBBlink.ino
View hivend.ino
#include <Wire.h>
// pwm pins for red, green and blue
int rled = 9;
int gled = 10;
int bled = 11;
char currentColor = 'r';
/*
TODO: support hex values for rgb
View ArduinoInsectSounds.pde
int speakerPin = 9;
int played = 0;
int cicada_length = 331; // the number of notes
char cicada_notes[] = " 1212121212121212121212121211212 1212121212121212121212121211212 1212121212121212121212121211212 1212121212121212121212121211212 1212121212122121212121212122111 1212121212121212121212121211212 1212121212121212121212121211212 1212121212121212121212121211212 1212121212121212121212121211212 1212121212122121212121212122111 "; // a space represents a rest
int cicada_beats[] = {1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,2,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,2,1,1,1,1,1,1,
You can’t perform that action at this time.