Skip to content

Instantly share code, notes, and snippets.

@devdsp
Created September 14, 2010 01:44
Show Gist options
  • Save devdsp/578396 to your computer and use it in GitHub Desktop.
Save devdsp/578396 to your computer and use it in GitHub Desktop.
#include <ht1632.h>
#include <MHV_io_ArduinoDuemilanove328p.h>
HT1632 matrix = HT1632( MHV_ARDUINO_PIN_4,MHV_ARDUINO_PIN_8,MHV_ARDUINO_PIN_10,MHV_ARDUINO_PIN_9, HT1632::pmos_8commons );
void setup() {
digitalWrite(4, HIGH);
Serial.begin(9600);
matrix.set_mode( HT1632::read_mode );
matrix.send_address( 0 );
Serial.print( "Old Value : ");
Serial.println( matrix.read_nibble(), HEX );
matrix.set_mode( HT1632::write_mode );
matrix.send_address( 0 );
matrix.send_data( 0x7 );
matrix.set_mode( HT1632::read_mode );
matrix.send_address( 0 );
Serial.print( "New Value : ");
Serial.println( matrix.read_nibble(), HEX );
}
void loop() {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment