Datasheet: https://github.com/sparkfun/Serial7SegmentDisplay/wiki/Serial-7-Segment-Display-Datasheet
Below is how I hooked up my pullup resisters to the corresponding mbed I2C pins and jumper wires
+ = positive side of my breadboard
+ -> mbed Vout
+ -> 2.2k -> p9 and Jumper-wire in the same breadboard hole -> Jumper wire -> SDA pin on Sparkfun 7-Segment Serial Display
+ -> 2.2k -> p10 and Jumper-wire in the same breadboard hole -> Jumper wire -> SCL pin Sparkfun 7-Segment Serial Display
CODE:
#include "mbed.h"
DigitalOut myled(LED1);
I2C i2c(p9, p10);
const int addr = 0x71; //7-Segment Serial display is 0x71
int main() {
char cmd[4]; //[0x31][0x32][0x41][0x42] (ASCII-code for '1', '2', 'a', 'b')
cmd[0] = 0x31;
cmd[1] = 0x32;
cmd[2] = 0x41;
cmd[3] = 0x42;
i2c.write(addr, cmd, 4);
while(1) {
myled = 1;
wait(0.2);
myled = 0;
wait(0.2);
}
}
My design is not working as expected. The Sparkfun 7-segment board is not showing any values that I am attempting to output with the mbed via i2c. I have never used i2c before so I am not sure if my pullup resister is correctly hooked up and if my code is properly outputting the bytes to the display.
To debug my design I checked if the display is getting power which it is. I used UART which also worked as expected by correctly outputting ASCII to the display.
I have no idea why the i2c communication is not working, what do I need to get my i2c communication to work?
Datasheet: https://github.com/sparkfun/Serial7SegmentDisplay/wiki/Serial-7-Segment-Display-Datasheet
Below is how I hooked up my pullup resisters to the corresponding mbed I2C pins and jumper wires
+ = positive side of my breadboard
+ -> mbed Vout
+ -> 2.2k -> p9 and Jumper-wire in the same breadboard hole -> Jumper wire -> SDA pin on Sparkfun 7-Segment Serial Display
+ -> 2.2k -> p10 and Jumper-wire in the same breadboard hole -> Jumper wire -> SCL pin Sparkfun 7-Segment Serial Display
CODE:
My design is not working as expected. The Sparkfun 7-segment board is not showing any values that I am attempting to output with the mbed via i2c. I have never used i2c before so I am not sure if my pullup resister is correctly hooked up and if my code is properly outputting the bytes to the display.
To debug my design I checked if the display is getting power which it is. I used UART which also worked as expected by correctly outputting ASCII to the display.
I have no idea why the i2c communication is not working, what do I need to get my i2c communication to work?