thank you so much for this series! These videos are incredibely useful for learning about embedded programming using these MCUs - I have done the ADC, DAC, the LCD with I2C, and looking forward to doing the other ones.
Wow its amazing how simply and clearly this library has been written. I hope tommorow its will work correctly in my project. Thans for sharing,i appryciate that, i there are a lot of work ahead me to by able do sommething simmilar by myself.
Weirdly enought I had to exclude the .c file from the build because all functions were declared twice, but except from those minor setup difficulties i really love the library! works like a charm!
Can you please tell me how to read the multiple channel of adc using timer....I have seen you videos but it is using dma or the polling function let me know is it possible to use a particular timer interrupt for 3 channel adc..and let me know how.
Hey, excellent video but i am working with a STM32f4 nucleo .. What do I have to change to make it work? I suspect that got something to do with the slave address, cause I tried to make all the steps and it not prints the hello.. can you help me please?
can you please tell me what adress should i use on lc216x2_i2c.c as the slave address when i am using i2c2 and not i2c1? my i2c1 is busy with other stuff, can you please help me?
the code has a mistake in theheader file, it has a part of the .c file, and also qhen you remove that part, the .c file does not recognizes the functions of the library
OMG, this tutourial is amazing, I was able to set up my display in 15 minutes :0. One thing: In the "lcd16x2_i2c.h" file in line 307 is an unclosed command: ear */ I don't know what it is supposed to do, I just closed the command and it works! /* ear */
Hi, I have a Nucleo-401RE using STM32CubeIDE version 1.8.0. Added the lcd16x2_i2c.c and /h files to the project (Core/Src and Core/Inc) and get 22 errors when I build. All errors are in the .lcd16x2_i2c.c file "redefinition of" starting on line 47. I assume it is a setup problem on my end. Any thoughts?
Trying to compile lcd16x2_i2c.c file, it fails to compile with multiple errors of redefinition. FOr example, error: redefinition of 'lcd16x2_i2c_printf'. Please any help? I'm using CUBE IDE 1.5
HELLO THERE ; only two of the files that appear on the screen have been uploaded. Can you upload the rest of the files so that it doesn't give an error?
I get 16 error from your .C-file with something about "redefinition of ---" one the first line of all the functions. I don't understand why. Anyone ells with this problem?
Hello All, just getting started with this and it looks great. I am having trouble with the files/code. 'lcd16x2_i2c_init' doesnt seem to be anywhere. Any help?
Found that error - was using the 4 and 8 bit files for the I2C project! Fixed that stupid mistake but I am getting a host of errors. I have tried deleting the section called out by Maris and still no luck. Are the libraries correct?
Got errors taken care of, LCD seems to come up but no message and no LED indication that I have talked to the LCD. Using a Nucleus-144 H723 and can't find a clear pinout of the board so I might be on the wrong pins. I am using PB6 for SCL and PB7 for SDA, have pullups enabled, Alternate function Open Drain, and High for max output speed.
I appreciate this tutorial, however, I am having these errors: ../Core/Src/main.c:128:7: warning: implicit declaration of function 'lcd16x2_i2c_init' [-Wimplicit-function-declaration] 128 | if (lcd16x2_i2c_init(&hi2c1)) | ^~~~~~~~~~~~~~~~ ../Core/Src/main.c:132:3: warning: implicit declaration of function 'lcd16x2_i2c_printf' [-Wimplicit-function-declaration] 132 | lcd16x2_i2c_printf("Hello World"); | ^~~~~~~~~~~~~~~~~~ These are warnings and I have no errors, but it still does not seem to function. Any help in understanding would be greatly appreciated.
I'm sorry but i have one more question. Is it reight to define function in two files at the same time? For exaple: static void lcd16x2_i2c_sendCommand(uint8_t command) in lcd16x2_i2c.h and the same function static void lcd16x2_i2c_sendCommand(uint8_t command) in lcd16x2_i2c.c
@@sinulokssinuloks7934 in this case it's correct because the .h file is a headder file. headder file just take the name of the functions in the .c-file of the same name. In your code you just have to include the .h-file and the compiler knows from that which functions are used..
Hello, Mohamed I am facing a problem so ı need to ask if ı am wondering you can answer me? When ı add -u_printf_float to the miscellaneous section and build the code, ı am having a building problem. `.text' will not fit in region `FLASH' and region `FLASH' overflowed by 8120 bytes. Can you help me ?
Yes, That’s your code data size exceeding MCU Ram memory. Either reduce your ram data size like reduce array max length or use an MCU with bigger Ram memory
Hello- Don't know if anyone is listening out there but I have compiled many times (success); the LED turns on after I init the LCD, the backlight comes on, but no text is on the LCD. I have turned the contrast up to the point where I see the 1st and 3rd line of blocks (I am trying a 4 line LCD) but no text. Does anyone know if there is a difference in talking to a 2 line vs a 4 line LCD? Seems to be so does anyone know how to do it?
@@mutexembedded2206 Hello! Good to finally hear from someone and it is YOU! I am using the Nucleo-H723ZG, STMCubeIDE, a SainSmart I2C 4x20 LCD display. I have made mods to your code to try to get the 4x20 display to work. The LCD backlight lights up and my feedback LED (very nice) does light up - just no printing. happy to forward my modified .H and .C files to you (somehow) in an effort to learn more from you.
I spent last 10 hrs with the code with the same microcontroller and like all the others who commented, i got the same error because the author forgot to upload proper code.
Welcome back! I'm too writing and rewriting libraries from Arduino et al. to STM32 and place them all on my GitHub for free: github.com/DanielMartensson/stm32-libraries If you want, I can help you by writing a WiFi project. I think that WiFi is very important communication tool today. More important than other.
Glad to say, this is one of the few channels were you actually get clear and fast learning content
thank you so much for this series! These videos are incredibely useful for learning about embedded programming using these MCUs - I have done the ADC, DAC, the LCD with I2C, and looking forward to doing the other ones.
:)
Wow its amazing how simply and clearly this library has been written. I hope tommorow its will work correctly in my project. Thans for sharing,i appryciate that, i there are a lot of work ahead me to by able do sommething simmilar by myself.
you cant guess how i appreciate you for this tutorial
Welcome back I miss you !
Nice to have you back Muhammad! And this was just the example I was looking for ;-)
More to come!
Great job bro I always wait for your nice tutorial
Thanks for you comment, Abdul
Welcome back Akhi Muhammad Yaqoob, we miss you..
Best Regards.
Hi! Thanks man.
That was the first thing I wanted to say. Wellcome back! You have been missed.
I missed you Muhammed. thanks.
Hey Pusat. I will try to be active more frequently. Thanks
Incredibly helpful, thank you.
Hi Yaqoob, great tutorials. However, I want to know if your library can also work with I2C LCD 20x4 display?
Weirdly enought I had to exclude the .c file from the build because all functions were declared twice, but except from those minor setup difficulties i really love the library!
works like a charm!
Without any more changes in the code?
Thank you soo much its working for me.
Thank you very much but my question is "where are all the libraries kept "?
i didn"t understand,need to turn on interrupt for i2c in Cube mx?
You can switch to the dark theme in Cube IDE, looks cooler and easier on the eyes.
Thanks, I will check that out.
Hello, can anyone help me how to move the cursor in steps? I miss that function in the great libary
Can you please tell me how to read the multiple channel of adc using timer....I have seen you videos but it is using dma or the polling function let me know is it possible to use a particular timer interrupt for 3 channel adc..and let me know how.
Thank you very much, but I think there are errors in the .h file, towards the end the .c is repeated
excelente tutorial. gracias
could you please make a video on stm32 usb without cubeMx?
can you guide to write about stm32f4 with fingerprint sensor R307? thank you
May I know how is it done in Keil uV5 ?
Hey, excellent video but i am working with a STM32f4 nucleo .. What do I have to change to make it work? I suspect that got something to do with the slave address, cause I tried to make all the steps and it not prints the hello.. can you help me please?
could you please make videos on stm32mp1 discovery (Yocto) projects
Good job 👏
can you please tell me what adress should i use on lc216x2_i2c.c as the slave address when i am using i2c2 and not i2c1?
my i2c1 is busy with other stuff, can you please help me?
Thank you very much for your effort. Unfortunately, c and h files are mixed.
Is it same for the 20*04 I2C LCD?
the code has a mistake in theheader file, it has a part of the .c file, and also qhen you remove that part, the .c file does not recognizes the functions of the library
OMG, this tutourial is amazing, I was able to set up my display in 15 minutes :0.
One thing:
In the "lcd16x2_i2c.h" file in line 307 is an unclosed command:
ear
*/
I don't know what it is supposed to do, I just closed the command and it works!
/*
ear
*/
can you share the whole project please?
Hi, I have a Nucleo-401RE using STM32CubeIDE version 1.8.0. Added the lcd16x2_i2c.c and /h files to the project (Core/Src and Core/Inc) and get 22 errors when I build. All errors are in the .lcd16x2_i2c.c file "redefinition of" starting on line 47. I assume it is a setup problem on my end. Any thoughts?
Could you find the solition ?
Trying to compile lcd16x2_i2c.c file, it fails to compile with multiple errors of redefinition. FOr example, error: redefinition of 'lcd16x2_i2c_printf'. Please any help? I'm using CUBE IDE 1.5
HI, can you help me in this code. I have tried it many time but it is not working with proteus, NEED halp.
Hi sir! Can these libraries files work with F401RE nucleo stm32 board ?
Once edited to remove errors, the library files work fine with a F401RE board. I’ve also modified them to work with a 20x4 i2c display.
Funcionó para la STM32F103C8! Pero hay errores en los archivos, se debe de corregir y listo!
the library does not work
HELLO THERE ;
only two of the files that appear on the screen have been uploaded. Can you upload the rest of the files so that it doesn't give an error?
I get 16 error from your .C-file with something about "redefinition of ---" one the first line of all the functions. I don't understand why. Anyone ells with this problem?
I removed the .C file and then it worked.
The two files have several errors, it doesnt work :/
Hello All, just getting started with this and it looks great. I am having trouble with the files/code. 'lcd16x2_i2c_init' doesnt seem to be anywhere. Any help?
Found that error - was using the 4 and 8 bit files for the I2C project!
Fixed that stupid mistake but I am getting a host of errors. I have tried deleting the section called out by Maris and still no luck. Are the libraries correct?
Got errors taken care of, LCD seems to come up but no message and no LED indication that I have talked to the LCD. Using a Nucleus-144 H723 and can't find a clear pinout of the board so I might be on the wrong pins. I am using PB6 for SCL and PB7 for SDA, have pullups enabled, Alternate function Open Drain, and High for max output speed.
Hi! Could you check line 307 of lcd16x2_i2c.h. What is it ear ?
Hello,
There's no such line 307.
This's part of lcd16x2_i2c.h, line 300-310. What is it ear?
vsprintf(stringArray, str, args);
va_end(args);
for(uint8_t i=0; i
@@mutexembedded2206 it's true, the libary is not working ... plz fix that!
the issue is that a c file is mixed in the h file... i deleted the c-file content, i guess now it works
@@m4nuz You're my hero
I appreciate this tutorial, however, I am having these errors:
../Core/Src/main.c:128:7: warning: implicit declaration of function 'lcd16x2_i2c_init' [-Wimplicit-function-declaration]
128 | if (lcd16x2_i2c_init(&hi2c1))
| ^~~~~~~~~~~~~~~~
../Core/Src/main.c:132:3: warning: implicit declaration of function 'lcd16x2_i2c_printf' [-Wimplicit-function-declaration]
132 | lcd16x2_i2c_printf("Hello World");
| ^~~~~~~~~~~~~~~~~~
These are warnings and I have no errors, but it still does not seem to function.
Any help in understanding would be greatly appreciated.
Hi! Files of library has different name in video and on github. Maybe it's problem.
Yeah. Ones on GitHub are correct. Not a problem anyway. Compiler accept such thing.
I'm sorry but i have one more question. Is it reight to define function in two files at the same time?
For exaple:
static void lcd16x2_i2c_sendCommand(uint8_t command) in lcd16x2_i2c.h and the same function
static void lcd16x2_i2c_sendCommand(uint8_t command) in lcd16x2_i2c.c
@@sinulokssinuloks7934 in this case it's correct because the .h file is a headder file. headder file just take the name of the functions in the .c-file of the same name. In your code you just have to include the .h-file and the compiler knows from that which functions are used..
Multiple errors “redefinition ………” in .c file. Has anyone fixed this yet?
O/K. I edited the .h and .c files and it all works well.
Hello, Mohamed I am facing a problem so ı need to ask if ı am wondering you can answer me? When ı add -u_printf_float to the miscellaneous section and build the code, ı am having a building problem. `.text' will not fit in region `FLASH' and region `FLASH' overflowed by 8120 bytes. Can you help me ?
Yes,
That’s your code data size exceeding MCU Ram memory.
Either reduce your ram data size like reduce array max length or use an MCU with bigger Ram memory
@@mutexembedded2206 Thank You!
Hello- Don't know if anyone is listening out there but I have compiled many times (success); the LED turns on after I init the LCD, the backlight comes on, but no text is on the LCD.
I have turned the contrast up to the point where I see the 1st and 3rd line of blocks (I am trying a 4 line LCD) but no text.
Does anyone know if there is a difference in talking to a 2 line vs a 4 line LCD? Seems to be so does anyone know how to do it?
Hi Steve,
Which STM microcontroller you're using?
I will be happy to take a look at your project setup
@@mutexembedded2206 Hello! Good to finally hear from someone and it is YOU!
I am using the Nucleo-H723ZG, STMCubeIDE, a SainSmart I2C 4x20 LCD display. I have made mods to your code to try to get the 4x20 display to work. The LCD backlight lights up and my feedback LED (very nice) does light up - just no printing.
happy to forward my modified .H and .C files to you (somehow) in an effort to learn more from you.
@@stevescott55 Sure, just send me a sharing link.
@@mutexembedded2206 hello?
@@stevescott55 🕶
I spent last 10 hrs with the code with the same microcontroller and like all the others who commented, i got the same error because the author forgot to upload proper code.
FYI your audio is better. All the best with Shut down. Day 9 for me. Lol
Hi Naasik, thanks
I think the library in GitHub is different from what is used in the video. they have a lot of lines
there is a duplicate, find
cl*/ and and then find ear*/
and delete everything in between those two
Welcome back! I'm too writing and rewriting libraries from Arduino et al. to STM32 and place them all on my GitHub for free: github.com/DanielMartensson/stm32-libraries If you want, I can help you by writing a WiFi project. I think that WiFi is very important communication tool today. More important than other.
..\Src\lcd16x2_i2c.c: 2 warnings, 17 errors
Created on: Mar 28, 2020
@@user-me7vm6ns1f What's that again
@@mutexembedded2206
13:57:05 Build Failed. 16 errors, 2 warnings. (took 431ms)
Description Resource Path Location Type
redefinition of 'lcd16x2_i2c_sendCommand' lcd16x2_i2c.c /LCD_I2C/Core/Src line 52 C/C++ Problem