I am using a TM1637 display for my Arduino Uno. The goal was to just light up one point of the colon in the middle - what seems to be kind of impossible to accomplish. During research I stumbled over the following snippet, which I dont fully understand:
uint8_t segto;
int value = 1244;
segto = 0x80 | display.encodeDigit((value/100)%10);
display.setSegments(&segto, 1, 1);
Ok line 1 seems to declare s.th. like a char, an unsigned 8bit integer. Line 2 should be clear. Line 3: The pipe symbol seems to do a kind of addition - never seen this before. The rest here is also not clear to me - why these strange calculation to pass a value (here 2) to .encodeDigit() ? Finally line 4: Why is the adress of 'segto' passed to the function instead of just the value?
This all ends up showing a "2:" on the display. I got the snippet from this 'manual': https://robojax.com/learn/arduino/robojax-TM1637_display_manual.pdf
Maybe s.o. can help to light things up a bit