Skip to content

Instantly share code, notes, and snippets.

Marcus evilmachina

Block or report user

Report or block evilmachina

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
@evilmachina
evilmachina / VU_earrings.ino
Created Aug 11, 2014
Code for neopixel vu earrings
View VU_earrings.ino
/*
LED VU meter for Arduino and Adafruit NeoPixel LEDs.
Hardware requirements:
- Most Arduino or Arduino-compatible boards (ATmega 328P or better).
- Adafruit Electret Microphone Amplifier (ID: 1063)
- Adafruit Flora RGB Smart Pixels (ID: 1260)
OR
- Adafruit NeoPixel Digital LED strip (ID: 1138)
- Optional: battery for portable use (else power through USB or adapter)
View vu_meter_pith_helmet.ino
/*
VU Meter Pith Helmet code is a modified version of Adafruit LED VU meter for Arduino
LED VU meter for Arduino and Adafruit NeoPixel LEDs.
Hardware requirements:
- Most Arduino or Arduino-compatible boards (ATmega 328P or better).
- Adafruit Electret Microphone Amplifier (ID: 1063)
- Adafruit Flora RGB Smart Pixels (ID: 1260)
OR
@evilmachina
evilmachina / agent.nut
Created Dec 8, 2013
Electric imp door lock. Read more at http://slickstreamer.info
View agent.nut
local doorState = "open";
local page = "<html>" +
"<head></head>" +
"<body>" +
"<form action='" + http.agenturl() +"' method='post'>" +
"<input type='password' autocomplete='on' name='pin' placeholder='pin'></input> <br>" +
"<button name='command' value='open' type='submit'>Open</button>" +
"<button name='command' value='lock' type='submit'>Lock</button>" +
"</form>" +
"</body>" +
View IkeaDioderLed.ino
#define REDPIN 3
#define GREENPIN 5
#define BLUEPIN 6
char payload[5] = "100";
unsigned long timeLastCommand;
View xbeeLedStripe.ino
#define REDPIN 3
#define GREENPIN 5
#define BLUEPIN 6
char payload[5] = "100";
unsigned long timeLastCommand;
@evilmachina
evilmachina / TMP36.device.nut
Created Sep 1, 2013
Electric Imp TMP36 Thermometer Thingspeak Logger
View TMP36.device.nut
hardware.pin9.configure(ANALOG_IN);
function getTemp() {
local supplyVoltage = hardware.voltage();
local voltage = supplyVoltage * hardware.pin9.read() / 65535.0;
local c = (voltage - 0.5) * 100 ;
local c_str = format("%.01f", c);
server.log("Current temp is "+c_str+" °C");
@evilmachina
evilmachina / Get_file_name.sh
Last active Dec 18, 2015
Build your own automated candy machine Part 2 Controlling the servo
View Get_file_name.sh
pi@everymote ~ $ ls /dev/serial/by-id/
usb-SparkFun_Electronics_SparkFun_ProMicro5-if00
View github_post_commit.js
Steps:
0. Checkout your git repo from the server (I use /var/www/carbonite)
1. Upload both of these files to the same directory on your server
2. chmod +x restart_node.sh
3. nohup node github_post_commit.js 2>&1 >> github_post_commit.log &
4. In the github admin for your repo, set a post commit hook to the url http://<your host>:8080/
5. Make a commit to your repo
6. Point a browser at http://<your host>:8080/ and you should see the commit
You can’t perform that action at this time.