I am making a project in which numbers from 1 to 9 are displayed on the 7 segment display
I have used esp32 as microcontroller
I am using Arduino IDE to program
THE CODE IS GETTING SUCCESSFULLY UPLOADED BUT NOTHING IS BEING DISPLAYED ON THE DISPLAY
I can't understand what's the problem
I have attached the photos of the circuit and the code
PLEASE HELP!
Hi, @akshansh25
Welcome to the forum.
The above link will show you how to post your code.
Can you please post a copy of your circuit a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.
Thanks.. Tom..
![]()
The standard approach, then, is to break the problem down into something you can understand!
Before trying to write digits to the display, can you just blink one segment?
Having got one segment going, make sure you can blink each segment individually.
Then try combinations of segments ...
Is it CC-type or CA-type 7-segment display?
As advised in post #3, just blink seg-a at 1-sec interval using GPIO-16.
Write the codes in the IDE, copy and paste in your reply post.
Look at the following diagram (Fig-1) for the pinout of your 30-pin ESP32 Dev Module.
Figure-1:
I know your code is wrong but I can't see it clearly
Post your code using code tags <CODE/>
He has copied/pated SevSeg.h Library based sketch from some source. He should try himself to open the IDE and write few lines of codes to blink seg-a at 1-sec interval.
I can see what the OP did, thank you.
Hi,
I see a lot of current limit resistors.
This may help, its the basics.
Tom..
![]()
What happens when you run a blink sketch
and defining the Data Pin as 1 segment of the Display
and if that works, Go through all 7 Segments 1 by 1
Does each Segement work through a Basic Blink Sketch ?
You have , what appears to be Way Way too many resistors.
WHY ?
Also, Tell us the value of the resistors and do the Ohm's law Calculation that you figured would light up the 7 Segment Display
also a Datasheet would be cool
One would expect eight - one per segment (including the DP) - and that does seem to be the number in the photo.
330 ohm resistors....You can look at the picture and see.
Why do you say that?
Looks like the right number to me - see Post 10
Looks like 330 ohm to me - should be OK
No, One would expect 1.
However if he's connected them correctly there isn't any harm putting 1 on each leg.
but my concern is,,, HAS HE ?
Because there is more than 1 and you don't need more than 1 per 7 Segment Display
EDIT : I suppose some people do put more in as a result of paranoia and i get that...
and there was a time when i also did.
Then you do enough projects and you realize you don't need to buy a few hundred resistors when like 10 will suffice
@akshansh25
Do you need help posting your code?
I Agree he needs to post his code
It is wired correctly, the resistor per segment means each LED has the same amount of current....Which leads to brighter segments.
I think the display is Common Cathode, however not connecting the Common Cathode or Common Anode to the respective power pin is probably the issue.
I can see the code and I know it's wrong, but I don't want to encourge people to use screen shots and photos for posting code
From what i can gather this is his code
#include "SevSeg.h"
SevSeg sevseg;
void setup()
{
byte sevenSegments = 1;
byte CommonPins[] = {};
byte LEDsegmentPins[] = {2, 0, 4, 16, 17, 5, 18, 19};
bool resistorsOnSegments = true;
sevseg.begin(COMMON_ANODE, sevenSegments, CommonPins, LEDsegmentPins, resistorsOnSegments);
sevseg,setBrightness(80);
void loop()
{
for(int i = 0; i < 10; i++)
{
sevseg.setNumber(i);
sevseg,refreshDisplay();
delay(1000);
}
}
@akshansh25
PLEASE CONFIRM THAT THIS IS YOUR CORRECT CODE
Are you working together with @akshansh25


