Using 7-Segment Serial display with Photon

Hello all,

I have a 7-segment display and want to use Photon with it.

I tried using I2C with photon as given in this example. It uses Wire library.

I connect SDA-D0 and SCL-D1. But nothing happens.

Also i tried other methods Serial UART and SPI but have not luck.

I just want to show simple number on this 7-segment display.But I do not know where to start. Can anyone guide me through this?

For I2C have you got pull-ups in place?
Can you scan the I2C bus for the device?
What code did you use for UART & SPI?
How have you got the device wired for each of the individual interfaces?

Thanks for the reply,

i am actually newbie and don’t understand some of your questions :smile:, just need direction in implementing this.

For I2C have you got pull-ups in place?
I don’t know what are these. For I2C I connect SDA-D0 and SCL-D1 GRND and VIN just directly without any resistors. This is the code i use.

Can you scan the I2C bus for the device?
I don’t know what or how to scan i2C bus.

What code did you use for UART & SPI?
For UART and SPI example i used the code given on the page. But of course, there was SoftwareSerial library missing and i could’t find equivalent library.
For SPI i connect SS-D5 and SCK-A3 and SDI-D0 with the code on website but no luck. Of course i tried to change the variable pins accordingly.

Sorry for my inexperience.

That’s most likely the problem then.
As it seems the board has no pull-ups onboard, so you need to add them yourself.
The board should work with 3.3V so you’d add some 4k7 resistors from D0 to 3v3 and from D1 to 3v3. This way the I2C interface should start working.

You’d use some code like this for it
https://go.particle.io/shared_apps/58cda34c77e5d3ec090004fe

If you use HW UART on RX/TX you just use Serial1 instead. Or you can use ParticleSoftSerial as replacement for SoftwareSerial.

For SPI you’d use SCK-A3, SDI-A5 and you’d need to call SPI.begin(D5) when using that pin as SS.

1 Like