I got my opensegment shield in the mail today, and it’s not working. When I use it with Serial, the center segments of the numbers and the decimal points light up brightly, while the rest of them are very dim. I tried the Software Reset example to try to fix the problem, but it doesn’t work. Here is an image of the problem described: http://i.imgur.com/sv3yXCX.jpg. The image was taken while running the Serial Basic example, code here:
/*
9-23-2012
Spark Fun Electronics
Nathan Seidle
This code is public domain but you buy me a beer if you use this and we meet someday (Beerware license).
Serial7Segment is an open source seven segment display.
This is example code that shows how to display basic numbers on the display.
Note: This code expects the display to be listening at 9600bps. If your display is not at 9600bps, you can
do a software or hardware reset. See the Wiki for more info:
http://github.com/sparkfun/Serial7SegmentDisplay/wiki/Special-Commands#wiki-baud
To get this code to work, attached an Serial7Segment to an Arduino Uno using the following pins:
Pin 8 on Uno (software serial TX) to RX on Serial7Segment
VIN to PWR
GND to GND
*/
#include <SoftwareSerial.h>
SoftwareSerial Serial7Segment(7, 8); //RX pin, TX pin
int cycles = 0;
void setup() {
Serial.begin(9600);
Serial.println("OpenSegment Example Code");
Serial7Segment.begin(9600); //Talk to the Serial7Segment at 9600 bps
Serial7Segment.write('v'); //Reset the display - this forces the cursor to return to the beginning of the display
}
void loop()
{
cycles++; //Counting cycles! Yay!
Serial.print("Cycle: ");
Serial.println(cycles);
char tempString[10]; //Used for sprintf
sprintf(tempString, "%4d", cycles); //Convert deciSecond into a string that is right adjusted
//sprintf(tempString, "%d", cycles); //Convert deciSecond into a string that is left adjusted (requires digit 1 command)
//sprintf(tempString, "%04d", cycles); //Convert deciSecond into a string with leading zeros
//sprintf(tempString, "%4X", cycles); //Count in HEX, right adjusted
//int negativeCycles = cycles * -1;
//sprintf(tempString, "%4d", negativeCycles); //Shows a negative sign infront of right adjusted number
//Note: This method works well as long as your number is less than or equal to 4 digits.
//14422 will cause the display to wrap (5 digits)
//-5766 will cause the display to wrap (5 digits)
//To fix this, send a 'v' character or look at how to control the digit placement
//https://github.com/sparkfun/Serial7SegmentDisplay/wiki/Basic-Usage#wiki-cursor
Serial7Segment.print(tempString); //Send serial string out the soft serial port to the S7S
delay(10);
}
Less importantly, whenever I use any of the I2C or SPI examples, the display just shows randomly lit segments. I don’t know if this is unintended, but it doesn’t matter as I don’t wish to use I2C or SPI for the project I have in mind.
Does anybody know how I might fix the serial issue? It’s driving my crazy and I’ve looked everywhere online and couldn’t find any info related to this issue. Also, does anybody know how to do a hardware reset of the shield? I wanted try that, but I couldn’t find any instructions on how to do it.