Skip to content

Instantly share code, notes, and snippets.

View schappim's full-sized avatar
💤
Sleeping . +10GMT

Marcus S schappim

💤
Sleeping . +10GMT
View GitHub Profile
@schappim
schappim / arcade_button_midi_controller_parts_list.txt
Created March 2, 2011 01:02
Arcade Button MIDI Controller Parts List
DFArduino
http://littlebirdelectronics.com/products/dfrduino-duemilanove-328-arduino-compatable-clone
USB A-B Cable
http://littlebirdelectronics.com/products/usb-cable-ab-for-arduino-3-foot
Enclosures
http://littlebirdelectronics.com/search?q=Plastic+Enclosure&submit.x=0&submit.y=0&submit=Go
Arcade Buttons (in a multitude of colors)
@schappim
schappim / BareMinimum.pde
Created August 14, 2011 04:26
Bare Minimum code needed to get started
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
@schappim
schappim / BareMinimum.pde
Created August 16, 2011 14:14
BareMinimum
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
@schappim
schappim / Blink.pde
Created August 16, 2011 14:21
Blink
@schappim
schappim / DigitalReadSerial.pde
Created August 16, 2011 14:24
Digital Read Serial
/*
DigitalReadSerial
Reads a digital input on pin 2, prints the result to the serial monitor
This example code is in the public domain.
*/
void setup() {
Serial.begin(9600);
pinMode(2, INPUT);
@schappim
schappim / AnalogReadSerial.pde
Created September 14, 2011 09:09
AnalogReadSerial
/*
AnalogReadSerial
Reads an analog input on pin 0, prints the result to the serial monitor
This example code is in the public domain.
*/
void setup() {
Serial.begin(9600);
}
@schappim
schappim / DigitShield.pde
Created September 22, 2011 06:53
Digit Shield Example Code
// Display the value 123:
DigitShield.setValue(123);
// Display the value 64 with leading zeros:
DigitShield.setLeadingZeros(true);
DigitShield.setValue(64);
// Display the value of pi with 2 decimal places
DigitShield.setPrecision(2);
DigitShield.setValue(3.14159265);
@schappim
schappim / DigitShieldAPI.pde
Created September 22, 2011 06:56
Digital Shield API
DigitShield.begin() : initialize the Digit Shield. This is required before use.
DigitShield.setValue(int value) : set an integer value to display
DigitShield.setValue(double value) : set a floating point value to display
DigitShield.setPrecision(int decimalPlaces) : specify the number of decimal places to display
DigitShield.setLeadingZeros(boolean b) : specify whether numbers should be displayed with leading zeros (default is false)
DigitShield.setBlank(boolean b) : allows you to blank the display completely. Specify false to turn the display back on.
DigitShield.setDigit(int d, int n) : set digit d to value n. Digits are numbered 1-4 from left to right.
DigitShield.setDecimalPoint(int d, boolean on) : turn the decimal point of digit d on or off.
@schappim
schappim / gist:1366104
Created November 15, 2011 04:06
LBE Workshop Notes
Get in contact with us:
help@littlebirdelectronics.com or marcus@littlebirdelectronics.com or madeleine@littlebirdelectronics.com
02 8003 3523
http://www.littlebirdelectronics.com/facebook
http://twitter.com/lbhq
http://www.littlebirdelectronics.com/googleplus
Hackerspaces:
http://www.makehackvoid.com/ (Canberra)
@schappim
schappim / mux2.py
Created December 22, 2011 12:05
mux2.py
#!/usr/bin/python
import os
import logging
DDR_IN = (1 << 5)
DDR_OUT = (0 << 5)
PULL_R_UP = (1 << 4)
PULL_R_DOWN = (0 << 4)
PULL_R_EN = (1 << 3)
PULL_R_DIS = (0 << 3)
uart1_pin_mux = [