Permalink
Browse files

readme

  • Loading branch information...
jdeboi committed Jul 31, 2012
1 parent c1072b5 commit f2a1724ca4955af3b4ffcca30d583e2ec6c8a946
View
@@ -0,0 +1,33 @@
+Contents
+7/30/12
+
+HT1632 - Adafruit library for the 16x24 LED Matrix Panel. I added several functions
+(translate() is one example) to make it easy to scroll text and/or images. At some point
+I'm going to do a pull request on the LED driver's github repo. I'm also going to create a
+video demoing some of the functions. Until then, feel free to take a peak at the files if
+you're curious.
+http://www.adafruit.com/products/555
+
+LEDMatrixVisulaizer - A Processing sketch that I wrote to make it easy to design and output
+LED images/ patterns. The program allows you to turn LEDs on and off as well as draw LED
+lines, circles, and squares (all shapes can be filled or unfilled). You can save the design
+to a text file and/or import previous designs. You can also print out the values of each
+LED in the matrix, which is useful if you'd like to use an array of LED matrix values in
+Arduino sketches (like the pimpMyBike sketch).
+
+exercises - mostly incomplete. Originally intended for use in the Pimp My Bike Skillshare
+class, but I didn't flesh out the examples. Perhaps I will do that at a later date.
+
+pimpMyBike - main Arduino sketch for the bike circuit containing LED turn indicators, brake
+light, speedometer, and odometer.
+
+reedSwitch - sketch I wrote to test the reedSwitch.
+
+turningIndicator
+
+turningIndicatorLEDs
+
+bike.fzz - Fritzing diagram of the bike circuit
+
+
+
@@ -1,27 +0,0 @@
-
-int numMatrices = 1;
-int [][] LEDpixels;
-int wLEDs = 24 * numMatrices;
-int hLEDs = 16;
-int circleD = 12;
-int padding = 5;
-int space = circleD + 2 * padding;
-
-
-void setup(){
- size(wLEDs*space, hLEDs*space);
- LEDpixels = new int[wLEDs][hLEDs];
-}
-
-void draw(){
- ellipseMode(CORNER);
- for(int i = 0; i < wLEDs; i ++){
- for(int j = 0; j < hLEDs; j++){
- int on = LEDpixels[i][j];
- fill(on, 0, 0);
- ellipse(i*space, j*space, circleD, circleD);
- }
- }
-}
-
-void
@@ -1,58 +0,0 @@
-/*
- Button
-
- Turns on and off a light emitting diode(LED) connected to digital
- pin 13, when pressing a pushbutton attached to pin 2.
-
-
- The circuit:
- * LED attached from pin 13 to ground
- * pushbutton attached to pin 2 from +5V
- * 10K resistor attached to pin 2 from ground
-
- * Note: on most Arduinos there is already an LED on the board
- attached to pin 13.
-
-
- created 2005
- by DojoDave <http://www.0j0.org>
- modified 30 Aug 2011
- by Tom Igoe
-
- This example code is in the public domain.
-
- http://www.arduino.cc/en/Tutorial/Button
- */
-
-// constants won't change. They're used here to
-// set pin numbers:
-const int buttonPin = 2; // the number of the pushbutton pin
-const int ledPin = 13; // the number of the LED pin
-
-// variables will change:
-int buttonState = 0; // variable for reading the pushbutton status
-
-void setup() {
- // initialize the LED pin as an output:
- pinMode(ledPin, OUTPUT);
- // initialize the pushbutton pin as an input:
- pinMode(buttonPin, INPUT);
- Serial.begin(9600);
-}
-
-void loop(){
- // read the state of the pushbutton value:
- buttonState = digitalRead(buttonPin);
-
- // check if the pushbutton is pressed.
- // if it is, the buttonState is HIGH:
- if (buttonState == HIGH) {
- // turn LED on:
- digitalWrite(ledPin, HIGH);
- Serial.println("on");
- }
- else {
- // turn LED off:
- digitalWrite(ledPin, LOW);
- }
-}
@@ -1,67 +0,0 @@
-/*
- Button
-
- Turns on and off a light emitting diode(LED) connected to digital
- pin 13, when pressing a pushbutton attached to pin 2.
-
-
- The circuit:
- * LED attached from pin 13 to ground
- * pushbutton attached to pin 2 from +5V
- * 10K resistor attached to pin 2 from ground
-
- * Note: on most Arduinos there is already an LED on the board
- attached to pin 13.
-
-
- created 2005
- by DojoDave <http://www.0j0.org>
- modified 30 Aug 2011
- by Tom Igoe
-
- This example code is in the public domain.
-
- http://www.arduino.cc/en/Tutorial/Button
- */
-
-// constants won't change. They're used here to
-// set pin numbers:
-const int buttonPin = 2; // the number of the pushbutton pin
-const int ledPin = 13; // the number of the LED pin
-boolean on = false;
-boolean pressed = false;
-
-// variables will change:
-int buttonState = 0; // variable for reading the pushbutton status
-
-void setup() {
- // initialize the LED pin as an output:
- pinMode(ledPin, OUTPUT);
- // initialize the pushbutton pin as an input:
- pinMode(buttonPin, INPUT);
- Serial.begin(9600);
-}
-
-void loop(){
- // read the state of the pushbutton value:
- buttonState = digitalRead(buttonPin);
-
- // check if the pushbutton is pressed.
- // if it is, the buttonState is HIGH:
- if (buttonState == HIGH && pressed == false) {
- // turn LED on:
- pressed = true;
- on = !on;
- if(on){
- digitalWrite(ledPin, HIGH);
- Serial.println("on");
- }
- else {
- // turn LED off:
- digitalWrite(ledPin, LOW);
- }
- }
- else if(buttonState == LOW && pressed == true){
- pressed = false;
- }
-}
View
@@ -1,59 +0,0 @@
-#include <avr/io.h>
-#include <avr/pgmspace.h>
-
-#ifndef FONT5X7_H
-#define FONT5X7_H
-
-// standard ascii 5x7 font
-
-static unsigned char font[] brake = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 1, 1, 1, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 1, 1, 1, 1, 1, 1, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 1, 1, 0, 0, 1, 1, 1,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 1,
- 1, 1, 0, 0, 0, 0, 1, 1,
- 1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 1, 1,
- 1, 0, 0, 1, 1, 0, 0, 1,
- 1, 1, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 1, 1, 1,
- 0, 0, 1, 1, 1, 1, 0, 0,
- 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 1, 1, 0,
- 0, 1, 1, 1, 1, 1, 1, 0,
- 0, 1, 1, 1, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 1, 1, 0,
- 0, 1, 1, 1, 1, 1, 1, 0,
- 0, 1, 1, 1, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 1, 1, 1,
- 0, 0, 1, 1, 1, 1, 0, 0,
- 1, 1, 1, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 1, 1,
- 1, 0, 0, 1, 1, 0, 0, 1,
- 1, 1, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 1,
- 1, 1, 0, 0, 0, 0, 1, 1,
- 1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 1, 1, 0, 0, 1, 1, 1,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 1, 1, 1, 1, 1, 1, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 1, 1, 1, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0
-};
-#endif
@@ -111,16 +111,20 @@ void setLEDShape(){
//right turning indicator is on, left off
else if (rOn && lOn == false && stepUp){
drawRight();
+ rightIndicator = true;
}
//left turning indicator is on, right off
else if (lOn && rOn == false && stepUp){
drawLeft();
+ leftIndicator = true;
}
//right is on
else if (lOn && rOn == false && stepUp == false){
//never going to happen
}
else if(rOn && lOn && strobeOn == false){
+ rightIndicator = false;
+ leftIndicator = false;
strobeOn = true;
rOn = false;
lOn = false;
@@ -161,7 +165,7 @@ void scroll(){ //or turning on
}
void strobe(){
- if(strobeOn == false || rOn || lOn){
+ if(strobeOn == false || rOn || lOn || brakeOn){
}
else{
blinkOn = ! blinkOn;

0 comments on commit f2a1724

Please sign in to comment.