EasyManuals Logo

SunFounder ESP32 User Manual

Default Icon
771 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #43 background imageLoading...
Page #43 background image
SunFounder ESP32 Starter Kit
Code
Note:
Open the 2.5_7segment.ino file under the path of esp32-starter-kit-main\c\codes\2.5_7segment.
After selecting the board (ESP32 Dev Module) and the appropriate port, click the Upload button.
Always displaying “Unknown COMxx”?
After the code is uploaded successfully, you will be able to see the LED Segment Display display 0~9 in sequence.
How it works?
In this project, we are using the shiftOut() function to write the binary number to the shift register.
Suppose that the 7-segment Display display the number “2”. This bit pattern corresponds to the segments f, c and dp
being turned off (low), while the segments a, b, d, e and g are turned on (high). This is “01011011” in binary and
“0x5b” in hexadecimal notation.
Therefore, you would need to call shiftOut(DS,SHcp,MSBFIRST,0x5b) to display the number “2” on the 7-segment
display.
Hexadecimal
BinaryHex Converter
The following table shows the hexadecimal patterns that need to be written to the shift register to display the numbers
0 to 9 on a 7-segment display.
1.9. 2.5 7 Segment Display 37

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the SunFounder ESP32 and is the answer not in the manual?

SunFounder ESP32 Specifications

General IconGeneral
BrandSunFounder
ModelESP32
CategoryController
LanguageEnglish