I2C: bits to byte
I2C (Inter-Integrated Circuit) is a two-wire (SDA — data, SCL — clock) serial protocol widely used for connecting microcontrollers and sensors. Unlike SPI, in I2C, after each byte is transmitted, the receiving side sends an ACK (acknowledgement) bit: pulling the SDA line to a low state (0) means "byte received".
In I2C, each byte is transmitted in MSB-first order (most significant bit first). Thus, for each character, 9 bits appear on the line: 8 data bits + 1 ACK bit (always 0).
Below is the sequence of bits on the SDA line captured by a logic analyzer (every 9 bits is one byte). Open the attached file and recover the message.
Discard the last (9th) bit of each group, read the remaining 8 bits as an MSB-first number, and then perform chr().