diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | ] | 62 | ||||
-rw-r--r-- | tags | 48 |
3 files changed, 1 insertions, 110 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6e92f57 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +tags @@ -1,62 +0,0 @@ -#include "maxCommands.h" - -#define cs 6 -#define clk 5 -#define dataIn 3 - - -void setup() { - Serial.begin(9600); - - Serial.println("Starting up \n\n\n"); - - pinMode(cs, OUTPUT); - pinMode(clk, OUTPUT); - pinMode(dataIn, OUTPUT); - - - digitalWrite(cs, HIGH); - - writeCommand(maxSHUTDOWN_INV, 1); - - writeCommand(maxINTENSITY, 0x00); - - -} - -void loop() { - - for ( int i = 0; i < 255; i++) { - writeCommand(maxDIGIT_1, i); - - delay(200); - } - -} - - -void writeCommand(uint8_t addr, uint8_t data) { - uint16_t byteToWrite = addr << 8 | data; - - //Set Chip select low - digitalWrite(cs, LOW); - - Serial.print("Writing: "); - for (int i = 0; i < 16; i++) { - bool bitToWrite = ( byteToWrite & 1 << 15 - i ) > 0; - Serial.print( bitToWrite ); - - //Write Data - digitalWrite(dataIn, bitToWrite); - delayMicroseconds(10); - - //Write clock - digitalWrite(clk, HIGH); - - //Wait and go low - delayMicroseconds(100); - digitalWrite(clk, LOW); - } - digitalWrite(cs, HIGH); - Serial.println(); -} @@ -1,48 +0,0 @@ -!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ -!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ -!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ -!_TAG_PROGRAM_NAME Exuberant Ctags // -!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ -!_TAG_PROGRAM_VERSION 5.8 // -MaxCommands MaxCommands.h 2;" d -Sprite sprites.h /^struct Sprite {$/;" s -ball sprites.h /^struct Sprite ball = {$/;" v typeref:struct:Sprite -blocks sprites.h /^struct Sprite *blocks[] = { &iBlock, &oBlock, &tBlock, &sBlock, &zBlock, &jBlock, &lBlock };$/;" v typeref:struct:Sprite -buff sprites.h /^ uint8_t buff[4];$/;" m struct:Sprite -height sprites.h /^ uint8_t height;$/;" m struct:Sprite -iBlock sprites.h /^struct Sprite iBlock = {$/;" v typeref:struct:Sprite -iBlockR sprites.h /^struct Sprite iBlockR = {$/;" v typeref:struct:Sprite -initSprites sprites.c /^void initSprites() {$/;" f -jBlock sprites.h /^struct Sprite jBlock = {$/;" v typeref:struct:Sprite -jBlockD sprites.h /^struct Sprite jBlockD = {$/;" v typeref:struct:Sprite -jBlockL sprites.h /^struct Sprite jBlockL = {$/;" v typeref:struct:Sprite -jBlockR sprites.h /^struct Sprite jBlockR = {$/;" v typeref:struct:Sprite -lBlock sprites.h /^struct Sprite lBlock = {$/;" v typeref:struct:Sprite -lBlockD sprites.h /^struct Sprite lBlockD = {$/;" v typeref:struct:Sprite -lBlockL sprites.h /^struct Sprite lBlockL = {$/;" v typeref:struct:Sprite -lBlockR sprites.h /^struct Sprite lBlockR = {$/;" v typeref:struct:Sprite -maxDECODE_MODE MaxCommands.h 15;" d -maxDIGIT_0 MaxCommands.h 7;" d -maxDIGIT_1 MaxCommands.h 8;" d -maxDIGIT_2 MaxCommands.h 9;" d -maxDIGIT_3 MaxCommands.h 10;" d -maxDIGIT_4 MaxCommands.h 11;" d -maxDIGIT_5 MaxCommands.h 12;" d -maxDIGIT_6 MaxCommands.h 13;" d -maxDIGIT_7 MaxCommands.h 14;" d -maxINTENSITY MaxCommands.h 6;" d -maxSCAN_LIMIT MaxCommands.h 16;" d -maxSHUTDOWN_INV MaxCommands.h 4;" d -maxTEST MaxCommands.h 5;" d -oBlock sprites.h /^struct Sprite oBlock = {$/;" v typeref:struct:Sprite -rotateNext sprites.h /^ struct Sprite *rotateNext;$/;" m struct:Sprite typeref:struct:Sprite::Sprite -sBlock sprites.h /^struct Sprite sBlock = {$/;" v typeref:struct:Sprite -sBlockR sprites.h /^struct Sprite sBlockR = {$/;" v typeref:struct:Sprite -sprites sprites.h 2;" d -tBlock sprites.h /^struct Sprite tBlock = {$/;" v typeref:struct:Sprite -tBlockD sprites.h /^struct Sprite tBlockD = {$/;" v typeref:struct:Sprite -tBlockL sprites.h /^struct Sprite tBlockL = {$/;" v typeref:struct:Sprite -tBlockR sprites.h /^struct Sprite tBlockR = {$/;" v typeref:struct:Sprite -width sprites.h /^ uint8_t width;$/;" m struct:Sprite -zBlock sprites.h /^struct Sprite zBlock = {$/;" v typeref:struct:Sprite -zBlockR sprites.h /^struct Sprite zBlockR = {$/;" v typeref:struct:Sprite |