MahdaSystem / TM1638

TM1638 driver for AVR (ATmega32), STM32 (HAL) and ESP32 (esp-idf)
MIT License
17 stars 10 forks source link

STM32 undefined reference to `TM1638_STB_OUTPUT' #1

Closed P55-rgb closed 3 years ago

P55-rgb commented 3 years ago

Hello. There are errors in the libraries! Can you view my project or post your working project?

image

c:\st\stm32cubeide_1.4.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_1.5.0.202011040924\tools\arm-none-eabi\bin\ld.exe: D:/ST_prog/tm1638my_pin/Debug/../Core/Src/TM1638_platform.c:135: undefined reference to `TM1638_STB_OUTPUT'

https://cloud.mail.ru/public/vb3r/BfCauUsco

Hossein-M98 commented 3 years ago

Hello @P55-rgb I checked your project. You must uncomment 55th line in "TM1638_platform.h" file. Annotation 2021-06-29 234542

P55-rgb commented 3 years ago

image image

The project was assembled without errors.

  1. Why is it not the number 8 on the indicator, but this one?
  2. How to clear all digits on indicator?
  3. How do I clear a single digit?
Hossein-M98 commented 3 years ago
  1. I think your seven-segment display is common-cathode type. Therefore, you must change seven-segment display type in 65th line of "TM1638.h" file. Annotation 2021-07-01 141328

  2. Add this function to your project and call it: void ClearAllDigits(void) { uint8_t Buffer[8] = {0}; TM1638_SetMultipleDigit(Buffer, 0, 8); }

  3. void ClearSingleDigit(uint8_t DigitNumber) { TM1638_SetSingleDigit(0, DigitNumber); }