sparkfun / Serial7SegmentDisplay

Example code and board files for the Serial 7 Segment Display.
https://www.sparkfun.com/products/11629
95 stars 73 forks source link

Clarify cursor position after Digit Control commands #10

Closed somedaygone closed 11 years ago

somedaygone commented 11 years ago

Can you update the Wiki with what happens to the cursor after you issue one of the Digit Control special commands 0x7B - 0x7E? For example, what is the result of:

Serial.write(0x76);        // Clear display command, resets cursor
Serial.write('1');         // will display '1'
Serial.write('2');         // will display '2'
Serial.write(0x7D);        // Control Digit 3
Serial.write(0b01001000);  // binary for equal sign '='
Serial.write('C');         // will display 'C'

Is it "12=C" or "12C "?

jimblom commented 11 years ago

Good question. I'll update the wiki with this info.

The digit control commands won't touch the cursor, so it'll remain where it was before the command was received. Your example should print "12C ".