I moved commandMode variable into the updateBufferData because I didn't think it was used anywhere else. The variable is not used anywhere else, but the function depends on the command being stored towards the end of the function. Summary: commandMode needs to be global. This fixes my mistake.
Works well. Split the bulkier system functions into their own file. This made room for the mode runctions in the main file.
Not fully tested but somewhat working.
Works well. Not sure where to put the A/D checking. Not in the main loop. Perhaps a dedicated function where we only go if a jumper is closed.
Code should now work on Serial7Segment hardware directly. Use the Serial_ColonDots example sketch to test it.
To use the additional pins, PB6 and PB7, on the ATmega328 we have to add some maps to the pins_arduino.h file. This allows Arduino to identify PB6 and digital pin 22, and PB7 as digital pin 23.
Added basic SPI control and SPI control of settings. Works well. Also re-named some of the examples to make it more clear
Added a really simple I2C example sketch. Cleaned up some residual stuff in the main firmware. Moved the I2C receive event down below the main loop because it's not really an ISR.
I didn't realize there was 76800 and 38400bps in there. They're back in there now.
User supplies value from 0 to 100 percent instead of 0 to 255. SetBrightness does all the error correcting and map to get to delayMicrosecond value.
I added brightness support to the SevSeg library. I'm fairly happy with it. Works well with the OpenSegment backpack. I need to get a S7S backpack for testing as well.
I realized that the EEPROM locations are read during each 'setupTWI', 'setupUART' function so I removed the readSystemSettings and left the EEPROM checking where it originally was. The display init is now in its own function (also where we look up brightness setting).
Many changes but the major one was adding the ability to reset the UART to 9600 when the RX is pulled low for a certain amount of time. This affected boot up, EEPROM locations, and the way that the UART is controlled. We now initialize the UART using standard Arduino calls instead of hardware registers. This commit works well with the BasicSerial example code. Even though there are quite a few code changes, the test code (BasicSerial) leads me to believe it works bug free.
This is nothing but whitespace changes.
SevSeg library supports both common anode and cathode. Please test. From here, I plan to make many smaller firmware changes (that do not related to how segments are actually displayed). I need to get the products with a ATmega type backpack (Serial7Segment and OpenSegment) to this library so that we can use similar code, but with different pin definitions.
Arduino has to have the file name same as directory. Removed version number from file. Repo should be able to handle file versions.
Added commands to better support I2C. Added buffering to serial inputs. The hardware has changed, pins have moved, current limiting resistors added. Code reflects this. Adding Eagle PCB design files.
-------------------------------------------- - Reorganized main.c and Serial-7-Seg.h. Only function prototypes, defines, and includes are in the .h file. - Optimized a few of the global variable types and made volatile where necessary. - Got rid of a silly 1 argument switch statement.