Wednesday, 18 May 2011

Arduino with Sparkfun 7-segment Serial Display

Here's a quick example of getting an Arduino working with a Sparkfun 7-Segment Serial Display.





This short example just counts up from zero to 9999.


Connections

  • Arduino 5v pin to "VCC" on LED module
  • Arduino GND pin to "GND" on LED module
  • Arduino TX pin to "RX" on LED module

Source Code

int i = 1;
char buf[12];

void setup() {
  Serial.begin(9600);
  Serial.print("v");
}

void loop() {

  sprintf(buf, "%04d", i);
  Serial.print(buf);

  if(i < 9999) i++;
  delay(1000);

1 comment: