1
0
Fork 0
This repository has been archived on 2019-12-23. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
arduinisten/arduino/sketch_oct27a/sketch_oct27a.pde

44 lines
709 B
Text
Raw Normal View History

2010-03-30 18:55:18 +02:00
#include <LCD4Bit.h>
LCD4Bit lcd = LCD4Bit(2);
void setup() {
lcd.init();
lcd.clear();
// create char
lcd.commandWrite(0x40);
lcd.print(0b10001);
lcd.print(0b01010);
lcd.print(0b10101);
lcd.print(0b11111);
lcd.print(0b01110);
lcd.print(0b10001);
lcd.print(0b10001);
lcd.print(0b01010);
// back to normal
lcd.cursorTo(1,0);
for(uint8_t i = 0; i < 80; i++) {
lcd.print(0x00+(i&0x7));
}
}
void loop() {
digitalWrite(13, HIGH);
lcd.commandWrite(0x40+8*random(8));
uint8_t fnord = random(8);
for (uint8_t i = 0; i<8; i++) {
if(i == fnord) {
lcd.print(0b11111);
} else {
lcd.print(0b00000);
}
}
digitalWrite(13,LOW);
delay(10);
}