TM1638 icon indicating copy to clipboard operation
TM1638 copied to clipboard

Add ESP-IDF examples and config files

Open hayschan opened this issue 2 years ago • 6 comments

ESP32 MCU code examples for the TM1638 chip.

hayschan avatar Aug 31 '23 07:08 hayschan

Hello Thanks for contribution Unfortunately, this example will not work! There are some commented lines (lines 50~52) in the TM1638_platform.h file that should be uncommented, depending on the target platform. I suggest putting the platform-dependent parts of the code in the example's main.c file, as was done in the README.md. Good luck

Hossein-M98 avatar Aug 31 '23 17:08 Hossein-M98

OK. I have an idea. I will add a commit later today.

  1. Add a MACRO that automatically activates when building with ESP-IDF build chain (using ESP_PLATFORM).
  2. Add a Kconfig for configuring the GPIO of TM1638.

I would like to make this TM1638 project as flexible as possible. So that most ESP users will not have to change the code. This is especially useful if they use this project as a git submodule.

hayschan avatar Sep 01 '23 06:09 hayschan

OK, continue, we will see the result

Hossein-M98 avatar Sep 01 '23 06:09 Hossein-M98

Just pushed a new commit that did what I said.

The default GPIO pins for the ESP32 is still the same as your original pins, e.g. 0,1,2. Users can configure the GPIO pins to their custom pins through menuconfig (sdkconfig).

image

Currently, there are no errors building the ESP32 examples in ESP-IDF build chain.

I will test on a real TM1638 module and come back with the result of the digit displaying in real world.

hayschan avatar Sep 01 '23 06:09 hayschan

Any follow up that need to be done by me for this merge?

hayschan avatar Dec 18 '23 04:12 hayschan

You told me you were going to run tests with real hardware and report the result. I was waiting for your report. On the other hand, I changed the source code a little, first you need to apply the changes in your code.

Hossein-M98 avatar Dec 19 '23 04:12 Hossein-M98