This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The Game of Life displayed on an | |
HD44780 LCD from an Arduino | |
*/ | |
// include the library code: | |
#include <LiquidCrystal.h> | |
// initialize the library with the numbers | |
// of the interface pins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 2009 Kenneth Finnegan | |
// kennethfinnegan.blogspot.com | |
#include <Wire.h> | |
#include <LiquidCrystal.h> | |
//// PINS //// | |
#define LEDPIN 13 | |
LiquidCrystal lcd(2,3,4,5,6,7); | |
//// I2C ADDRESSES //// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 2009 Kenneth Finnegan | |
// kennethfinnegan.blogspot.com | |
// Pins. Must be PWM pins. | |
#define REDLED 9 | |
#define BLUELED 10 | |
#define GREENLED 11 | |
// Can't be higher than 255 | |
#define MAXBRIGHT 200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 2009 Kenneth Finnegan | |
// kennethfinnegan.blogspot.com | |
#include <Wire.h> | |
// I2C address | |
#define DS1307 B1101000 | |
// pinout for the 7 segment display | |
// Starts top center, clock-wise, then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <avr/io.h> // this contains all the IO port definitions | |
#include <util/delay.h> | |
// Global used to store the generated randomness | |
unsigned int reg=1; | |
// This function basically wastes time | |
void delay_ms(long int ms) { | |
for( ; ms > 0; ms--) { | |
_delay_ms( 1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 4 digit 7 segment clock | |
// 2010 kennethfinnegan.blogspot.com | |
// http://kennethfinnegan.blogspot.com/2010/01/arduino-four-digit-clock.html | |
#include <Wire.h> | |
#define DS1307 B1101000 | |
// LED Driver pins | |
#define LEDDATA 12 | |
#define LEDCLOCK 11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 2009 Kenneth Finnegan | |
// kennethfinnegan.blogspot.com | |
// http://kennethfinnegan.blogspot.com/2010/01/arduino-binary-clock.html | |
#include <Wire.h> | |
#define DS1307 B1101000 | |
#define LEDDATA 7 | |
#define LEDCLOCK 8 | |
#define LEDLATCH 9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 2010 Kenneth Finnegan | |
// Arduino Dot Matrix Clock | |
// kennethfinnegan.blogspot.com | |
// http://kennethfinnegan.blogspot.com/2010/02/dot-matrix-arduino-clock.html | |
// Note: There is commented out code throughout | |
// that can be uncommented to use a switch on | |
// pin 13 to toggle the first two columns between | |
// the date and the current temperature in F read | |
// from the 10 bit temperature sensor on the DS3232 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// I2C library using USI hardware support | |
// 2010 Kenneth Finnegan | |
// Heavily based on Atmel application note AVR310 | |
#include <util/delay.h> | |
#include <avr/io.h> | |
#include <inttypes.h> | |
//#define PARAM_VERIFY | |
//#define SIGNAL_VERIFY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 2010 Kenneth Finnegan | |
// http://kennethfinnegan.blogspot.com/ | |
// Two color blink clock running on MSP430 controller | |
#include "msp430G2101.h" | |
#define BLINK_ON 3000 | |
#define BLINK_OFF 1500 | |
#define BLINK_SPACE 6000 |
OlderNewer