The SparkFun 7-Segment Serial Display - Green is a user-friendly LED display module that provides a simple way to add a 4-digit numeric display to your projects. It can be controlled via a serial interface, making it compatible with microcontrollers like the Arduino UNO. This display is commonly used in digital clocks, electronic meters, and other devices where numerical data needs to be shown.
Pin Number | Name | Description |
---|---|---|
1 | VCC | Power supply (3.3V to 6V) |
2 | GND | Ground connection |
3 | RX | Serial data input (TTL level) |
4 | TX | Serial data output (not used in all applications) |
#include <SoftwareSerial.h>
// RX and TX pins for software serial
#define DISPLAY_RX_PIN 10
#define DISPLAY_TX_PIN 11
// Set up a software serial port
SoftwareSerial displaySerial(DISPLAY_RX_PIN, DISPLAY_TX_PIN);
void setup() {
// Start the software serial port at the baud rate of the display
displaySerial.begin(9600);
}
void loop() {
// Send a test number to the display
displaySerial.print("1234");
delay(1000); // Wait for a second
// Clear the display
displaySerial.write(0x76); // Clear command for the display
delay(1000); // Wait for a second
}
Q: Can I change the baud rate of the display? A: Yes, the baud rate can be changed by sending a specific command to the display.
Q: How do I control individual segments of the display? A: Individual segment control is usually done through specific serial commands. Refer to the datasheet for the command set.
Q: Is it possible to daisy-chain multiple displays? A: Some 7-segment serial displays support daisy-chaining. Check the datasheet for your specific model to see if this feature is supported and how to implement it.
Remember, this documentation is a starting point. For more detailed information, always refer to the manufacturer's datasheet and technical resources.