Inconsistent brightness per segment on 4 digit 7 segment display

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();
        }
    }

From the display’s datasheet:

  • Forward current: 20mA, but this is under “Absolute Maximum Rating” and I don’t know if it’s for the entire chip or per segment.
  • Forward voltage: min 3.2V, typ 3.4V, max 3.5V

I measure 3.22V between the microbit’s “3V” and GND pins. I haven’t found how much current the nRF51822 microcontroller can source, but it would be somewhat surprising if that amount were different on different pins.

I am not sure if this is a factor, but I would suggest you avoid pin5 and pin11, as they are shared with the micro:bit buttons, and exhibit a slight drop in voltage compared to the rest of the pins.

I anticipated that I might want to use the buttons, so I already don’t use these pins. They’re the purple and black wires on the photos, they go into the breadboard but nothing else is in these breadboard columns.