I bought a 4 Digit 7 Segment Display (the blue one). The datasheet says “Model No.: USD-439AB4B-35”.
I wired it to GPIO pins of a BBC micro:bit, and made a program that turns on every segment (except the dot) on each digit in turn. As far as I understand, each segment should be on the same amount of time (one fourth) and so they should all have the same brightness. But that’s not the case in practice, see the photos below (with and without a colored light filter on the display)
Could the problem be with my circuit accidentally adding resistance somewhere, or is the display malfunctioning?
Extract of my program’s source code (in Rust):
macro_rules! pins {
( $($name: ident $const_: ident,)+ ) => {
$(
let $name = gpio::Pin::output(breadboard::$const_);
$name.set_low();
)+
}
}
pins! {
a DISPLAY_SEGMENT_A,
b DISPLAY_SEGMENT_B,
c DISPLAY_SEGMENT_C,
d DISPLAY_SEGMENT_D,
e DISPLAY_SEGMENT_E,
f DISPLAY_SEGMENT_F,
g DISPLAY_SEGMENT_G,
d1 DISPLAY_DIGIT_1,
d2 DISPLAY_DIGIT_2,
d3 DISPLAY_DIGIT_3,
d4 DISPLAY_DIGIT_4,
}
loop {
for d in &[d1, d2, d3, d4] {
d.set_high();
busy_loop::wait_approx_ms(1);
d.set_low();
}
}