Not only did you taught me how to work with an OLED display but you've shown how to properly include libraries. Trust me, the error "No such file or directory..." has been bugging me for quite a while XD Thank you!
nice to see a live attempt(live in the sense you follow what is happening at a good speed). I really liked this video and got OLED to work for me as well
Hi, another 'old guy' here, after many failed attempts with other library's I found you presentation clear and extremely helpful, and it works!!! Thanks all the best
This is a very detailed, good tutorial! Thank you so much for your work. really wanted to see more videos from you, you are a pleasure to listen to and everything is neatly, consistently and clearly explained
Thank you for the tutorial! I'm only just starting out with STM32, and this was really helpful, not only for the OLED itself, but also how to include external libraries.
Super Great library, I was so lazy to figure out how to work with OLED, just used this library: 10 minutes, all works, and I can focus on my other tasks:) Thank you so much!
I’m an old guy just starting out and coding is overwhelming as hell. This is the best tutorial pertaining to STM32Cube IDE I’ve found. A project I’m trying to do on my own with zero experience, is to make it so the open source NanoVnas firmware can be altered to utilize a larger 5” or 7” lcd. Out of the box they have touch functionality however there are redundant button input to control menus and settings. So if loosing the touch input made it easier the nanovna would still function just fine. Any help would be greatly appreciated. The nanovna has ili9341 driver ic from factory for 2.8” lcd the 5-7” lcds I’ve found use the ssd1963 driver ic. Thanks for the great video
Thank you! Great tutorial! Only one thing - I'm not sure but it seems in the video there is no step #include "ssd1306.h" in main.c . Maybe the author's IDE did this automatically, but mine didn't.
Why does the methods of the library work in your case without including the library by "#include "ssd1306.h"" at the top of the main.c file? I included the library via the project properties in the same way as you but still the methods are unknown in my case.
Hi, the header "ssd1306.h" must be included within the main.c. I just re-watched the video and realized I didn't specifically point it out. At 13:04 (where I switched back into the main.c file) you can see the entry "ssd1306.h" in the Outline-Window. The Outline-Window is located at the top right corner and contains the content of the current file. I hope this helps.
thank you for this tutorial every thing is OK, but i have a problem when i want compile program, compiler show an error about losing my compiler is keil v5.31
Thank you very much for the tutorial! For some reason, although I added the OLED Driver Directory to path of the project, I got error messages and the code did not work until I included each header file in main.c code. Has anyone experienced the same issue?
Hi, thank you. I just removed the file because it was not necessary for the tutorial. The STM32F103RB used in this video should have enough memory to store the file with the test function.
A question, I use keil uvision for this project and I cant follow your tutorial because it gives me an error in the ssd1306.h header, telling that I dont have the _ansi.h pack installed, do you know why could it be?
hello, tomorrow i will use keil uvision to create this project. Then I will check if I get the same error. Did you use CubeMX for the basic project creation or did you start all from scratch?
I followed along with my f4 discovery board and project builds fine but oled dead. When I go into debug it jumps the three oled functions in main. I cannot step through them. Any idea what would cause such behaviour?
Hi, here are some tips: 1.) please check your optimization level of the compiler (if it's to high, then maybe some functions cannot be step through). 2.) Please check if the I2C module is initialized (correct speed) and working. If you have a logic analyzer or an oscilloscope, you could check the SDA and SCL (data and clock) lines. 3.) Please check if the OLED files are located on the right place in the project and the include paths are set correct. 4.) Please check the connection between the OLED and the Discovery board. I don't know the setup of the discovery board. Check if your I2C interface can be used without any prior modifications to the board (soldering bridge for example). If this still does not help, you can send the your source-files (and Warnings of your compiler, if there are any) to hacksontable@gmail.com and i will have a look on it.
@@hacksontable5850 Thank you so much for such a detailed list. I got it working. It was an include path issue and a little mistake in my code due to long time since using the C/C++ language. Best wishes to you. 👍
Hi I see the video post is quite few years ago, I hope you are well. I'm using this library for OLED projects but I'm having a question. I've got a new 1.5" OLED MC01506 I2C 128x128 pix with SH1107 drive. I'm using your SSD1306 library to drive it but I have the issue that all info printed on screen is shifted to right ( probably exact 64 pix ). It is like the left-top corner of the display is at (x,y) = ( 64,0 ) insted of (0,0). Could you please suggest a solution to this issue? I'm not so profficient with these OLED's I expect the issue is comming from the addresing mode of SH1107 being different from SSD1306 ... Thanks
@@hacksontable5850 it was missing from IAR directory in my C drive. But I found a solution, all I had to do is copy a BUNCH of includes that's inside the CubeIDE directory and paste it into my project Include folder. It asked for way more other than ANSI.
@@吾丧我 well after copying ansi it will ask for more. I ended up copying the entire include folder from stm32ide over to my IAR. It is located in directory of your stm32ide I think. Best is to do a search for the ansi file on your computer.
@@UweWong I've copied all the ".h" files which in the same folder with "ansi", But there are still something missing and I can't find them in CubeIDE. I've solved this problem by using another Library whitch don't rely on these files. REALLY THANK YOU !!! 😁
Hi! I've encoutered a problem. After doing exactly the same steps (apart from choosing apropriate i2c1 pins, I use a nucleo-L433RC-P) the display fails to show any life. Anyone have any thouhts why that may be happening? I believe wrongly set i2c parameters are involved. Very informative video though!
Hi milijonierius. Hmmm, if you want, you can mail me the content of the files "main.c", "ssd1306.h", "ssd1306_conf.h" and "stm32f1xx_hal_msp.c" so that I can have a look on it. The e-mail address would be: hacksontable@gmail.com First guess: Is the header-file "ssd1306_conf.h" configured correct? Because you are using an STM32L4. Ensure to define "STM32L4" instead of "STM32F1". Here I have a small "checklist" for you: 1.) Are the cable plugged in correct (means: SDA from NUCLEO is connected to the SDA of the OLED, and so on. Also check the supply/ground) 2.) Check the pin assignment in the configurator (the .ioc file) Are the pins assigned correct as I2C pins (and are the pins marked green) 3.) Check the parameters in the configuration. The mode should be "I2C". The Speed Mode should be "Standard Mode" and the Clock Speed should be "100000" Hz. 4.) Check the I2C-address of your OLED. 5.) Ensure that there are pull-up resistors (4k7) involved. 6.) (in the main.c) Is the function "ssd1306_Init()" called after the "MX_I2C1_Init()"? 7.) Always call the "ssd1306_UpdateScreen()" function to make your changes (e.g. text written) visible on the OLED. If you have an logic analyzer/oszilloscope, you could check the I2C lines to see if there are data coming out from the STM32L4. Hope this helps.
Hi, here just a quick code snippet: You can use the sprintf() function to convert the integer into an corresponding char array that can be displayed on the OLED. I'll give you a short snippet: int varInt = 7; //this is the buffer that contains the converted string char int_str[15]; //here the int gets converted sprintf(int_str, "%d", varInt); //init the ssd1306 driver ssd1306_Init(); //set the cursor ssd1306_SetCursor(5, 5); //output the integer value (as text now) ssd1306_WriteString(int_str, Font_7x10, White); //update the OLED ssd1306_UpdateScreen(); I hope this helps :)
Sorry but there were errors and warnings after set the debug configuration and breakpoint, it said ‘Wimplicit-function-declaration’ and ‘White’ undeclared. I was using L432KC and set the configuration to L4. Could you please help me solve this problem❤❤
Hi, yes I will try to help you. Can you send me a mail with the changes you have made in the header files, so that I can have a look on it. (hacksontable@gmail.com)
@@hacksontable5850 Hi. I am trying to add more fonts. But I did'nt find any program to output 32bit format font archive. Only 8 bit format! Could you tell me wich program did you use? Thanks a lot.
@André Santos sorry for the late reply. I am currently on holiday. But yeah, thats a problem I have done some experiments on. As soon as I am finish with the coverter-software, I will share a link. For this video I have used the existing fonts in the GitHub repo of the OLED driver.
hey there. The thing is I got 3 more pins on an oled which is currently available. Those are chipselect, data/command and reset. What should I do with them? I mean, one could just solder the pins to the ground, according to datasheet (under normal conditions their signal is Low). What do you think? Sorry, I'm newbee.
Hey, there nothing to be sorry for. Its a good question. Can you please send me the name/model of your OLED and the datasheet, so I can have a look on it. I am currently not in my office the next two weeks, but i can have a quick look on it anyway and give you an answer. Just mail the model-number/datasheet of your OLED to: hacksontable@gmail.com
damn, still cant get it to work. Had the most hope for you tutorial of all those i have watched or read so far. Could be i got a whole batch of bad screens since i couldnt even get the back to go all white.
Hi, hmmm it might be the case that the batch is bad or has a different driver (chip) on it. If you want to, you can mail me your source code (oled driver files and the main) so that i can have a look on it. (hacksontable@gmail.com)
Hi, you can use the sprinf() function to convert the integer/float to an corresponding char-array that can be printed on the OLED. Here is a short snippet: int varInt = 7; //this is the buffer that contains the converted string char int_str[15]; //this is the buffer that contains the converted string float varFloat = 10.14; char float_str[15]; //here the int gets converted sprintf(int_str, "%d", varInt); //here the float gets converted to text and stored sprintf(float_str, "%.2f", varFloat); //init the ssd1306 driver ssd1306_Init(); //set the cursor ssd1306_SetCursor(5, 5); //output the integer value (as text now) ssd1306_WriteString(int_str, Font_7x10, White); //se the cursor ssd1306_SetCursor(15, 15); //output the float value (as text now) ssd1306_WriteString(float_str, Font_7x10, White); //update the OLED ssd1306_UpdateScreen(); --> IMPORTANT NOTE C/C++ Build > Settings > Tool Settings", or add manually "-u _printf_float" in linker flags." I will try to cover this topic into a video. I hope this helps.
So sad, it just does not function to me. It cannot find White altough it is marked blue and italic. The same with Font_7x10. It also says that I have implicit declaration of init, setcursor, updatescreen and writestring. But I wrote it exactly like you. So it cannot detect it as a declaration. I wrote it to run the functions.
I have included the header file of the OLED lib in the main under including main.h. It functions now. But I cannot remember you have done that, right? I thought over the Include paths and rebuild it does it automacially or something.
Hi, today in the evening/night I will start a Project and upload it on Github. I will send you the Link then👍 The first project will solely contain the OLED driver and its configutation. The second project will also contain the IR-Temp-sensor (I have received it now). I will create a Project for your STM32L073RZ too, so that you can use it without modifications. I hope this hepls.
@@terecoo123 Hi, quick update. I now have written a driver to read out and convert the temperature with the IR-Sensor. Its written by using the LL (Low Level Library from STM32). I will write a HAL driver too in the next three days. And I will upload the current driver project as fast as possible on GitHub and inform you when its online. A video with a detailed description will be the next step then 👍
@@hacksontable5850 I actually managed to make custom different size fonts for my oled. But my library is also custom. I want to know how people are making 16bit fonts as used in your specified library
@@EmbeddedEnigma I am not sure, what software was used to create this font. But right now I am also writing a tool to create the needed 16bit font. The tool will just need a bitmap font (.png or .bmp file and a .fnt-file). As soon as the tool is finish, there will be a video-tutorial on how to use it. And a download-link of course. Hope this will help you, even if you already created your own library/tool :) Just a question, what is your "font-creation-process"? What do you need as input for your library?
@@hacksontable5850 i am using glcd font creator to create different size fonts. I modified adafruit library that is used for arduino. My fonts require width,height,offsrt and num of characters.
Amazingly helpful video, still relevant in 2024 :D Lovely little displays, very happy to have one up and running now thanks to your help!
Thank you😊
Not only did you taught me how to work with an OLED display but you've shown how to properly include libraries. Trust me, the error "No such file or directory..." has been bugging me for quite a while XD Thank you!
I am happy to hear that😊👍
nice to see a live attempt(live in the sense you follow what is happening at a good speed). I really liked this video and got OLED to work for me as well
Hi, another 'old guy' here, after many failed attempts with other library's I found you presentation clear and extremely helpful, and it works!!! Thanks all the best
I'm glad to hear that👍
This is a very detailed, good tutorial! Thank you so much for your work. really wanted to see more videos from you, you are a pleasure to listen to and everything is neatly, consistently and clearly explained
Thank you for the tutorial!
I'm only just starting out with STM32, and this was really helpful, not only for the OLED itself, but also how to include external libraries.
Super Great library, I was so lazy to figure out how to work with OLED, just used this library: 10 minutes, all works, and I can focus on my other tasks:) Thank you so much!
I am happy to hear that the video saved you some time😊👍
Best Channel of stm32
Hi Reinhard. Many thanks for recording this tutorial. The video is great, you have real talent! I hope to see more of them in the future 👏👏
Thanks a lot 🙂 I am currently working on a few projects. Do you have any wishes regarding a certain topic?
Hi Reinhard. Many thanks for recording this tutorial. The video is great, you have real a talent! I hope to see more of them in the future :)
Thanks a lot :)
thanks Reinhard, you have upped my confience from using simple i2c slaves to a more complex device!
Thank you so much for explaining every single details. That was very useful video.
Very good tutorial. I had to include the both header files of the library into main to clear errors and warnings. wants to see you soon. Thank you.
I had to do this as well, otherwise the program wouldn't build!
Perfect tutorial, helped me a lot! Thank you :)
Thank you 😊
Amazing video, cant wait for the next ones about the oled display
Thanks a lot :)
Do you have any wishes regarding a tutorial-video?
Awesome video!!! Helped so much, thank you from Brazil
Excellent tutorial. Thanks for sharing!
Wow very well put. I really like how you explain the library functions this video saved me a bunch of time!
Great explanation! I got everything and more. Thanks)) Continue your releases
best tutorial i have ever seen
Thank you🙂
Very well explained , from bottomup , more please : )
Thank you 😁 what topic would you like to see next?
I’m an old guy just starting out and coding is overwhelming as hell. This is the best tutorial pertaining to STM32Cube IDE I’ve found. A project I’m trying to do on my own with zero experience, is to make it so the open source NanoVnas firmware can be altered to utilize a larger 5” or 7” lcd. Out of the box they have touch functionality however there are redundant button input to control menus and settings. So if loosing the touch input made it easier the nanovna would still function just fine.
Any help would be greatly appreciated. The nanovna has ili9341 driver ic from factory for 2.8” lcd the 5-7” lcds I’ve found use the ssd1963 driver ic.
Thanks for the great video
Thank you very much🙂
Can you please send me a description of the problem to "hacksontable@gmail.com" so that we can talk about it in further detail.
Thank you! Great tutorial! Only one thing - I'm not sure but it seems in the video there is no step #include "ssd1306.h" in main.c . Maybe the author's IDE did this automatically, but mine didn't.
Hi, I think I inserted the #include "ssd1306.h" manually but did not show it in the video. I will have a look on this.
Thank you.
@@hacksontable5850 #include "ssd1306_fonts.h" is also missing
Thanks. Very clear instruction.
Thank you👍
Thanks so much, and I'm waiting for more tutorials !!
Clear and useful! Thanks for your work!
Thank you :)
could you please do more videos of stm32 tutorials like communication protocols and etc. please bro your explanation is too good to learn.
Yes 👍
Very useful lesson! Thank you!
This tutorial is very helpful thank you for taking the time
Thank you.
Hello, Please do a tutorial for the SPI configurations
This is very helpful I am so grateful.
well done... we hope you continue
Excellent, concise tutorial. Thank you.
Thank you :)
Many thanks for your tutorial
Crystal clear tutorial. Honestly well done!
Do you know if this external library will work with SSD1327 chipset?
Hi, I have not tried it yet. It might need some adaptions in the init-routine of the chip.
Great tutorial! Thanks a lot!!!
Thank you :)
Really nice video, thanks!
Why does the methods of the library work in your case without including the library by "#include "ssd1306.h"" at the top of the main.c file? I included the library via the project properties in the same way as you but still the methods are unknown in my case.
Hi, the header "ssd1306.h" must be included within the main.c. I just re-watched the video and realized I didn't specifically point it out.
At 13:04 (where I switched back into the main.c file) you can see the entry "ssd1306.h" in the Outline-Window. The Outline-Window is located at the top right corner and contains the content of the current file.
I hope this helps.
Excellent!
thank you for this tutorial
every thing is OK, but i have a problem
when i want compile program, compiler show an error about losing
my compiler is keil v5.31
Can you send me the exact error or a screenshot of the error(s)? The E-Mali would be: hacksontable@gmail.com
Thanks man
thank you for your explain.
hi, this is an amazing video!!
Is this compatible with the LVGL drivers?
Hello reinhard, if I may ask. Are you using pull up resistors for the sda and scl pins?
Hi, yes. But the two 4k7 pullup resistors have been already soldered on the OLED print.
Thank you very much for the tutorial!
For some reason, although I added the OLED Driver Directory to path of the project, I got error messages and the code did not work until I included each header file in main.c code. Has anyone experienced the same issue?
@@distantpeopleperson hi, what header-files exactly did you additionally include in the main.c?
@@hacksontable5850 all header files from the OLED Driver folder like ssd1306_fonts.h but it seems to work now
Thanks bro, big help. Is the reason you delete the test functions file because it is very large and might not fit in the F0's flash?
Hi, thank you. I just removed the file because it was not necessary for the tutorial. The STM32F103RB used in this video should have enough memory to store the file with the test function.
A question, I use keil uvision for this project and I cant follow your tutorial because it gives me an error in the ssd1306.h header, telling that I dont have the _ansi.h pack installed, do you know why could it be?
hello, tomorrow i will use keil uvision to create this project. Then I will check if I get the same error. Did you use CubeMX for the basic project creation or did you start all from scratch?
I followed along with my f4 discovery board and project builds fine but oled dead. When I go into debug it jumps the three oled functions in main. I cannot step through them. Any idea what would cause such behaviour?
Hi, here are some tips:
1.) please check your optimization level of the compiler (if it's to high, then maybe some functions cannot be step through).
2.) Please check if the I2C module is initialized (correct speed) and working. If you have a logic analyzer or an oscilloscope, you could check the SDA and SCL (data and clock) lines.
3.) Please check if the OLED files are located on the right place in the project and the include paths are set correct.
4.) Please check the connection between the OLED and the Discovery board. I don't know the setup of the discovery board. Check if your I2C interface can be used without any prior modifications to the board (soldering bridge for example).
If this still does not help, you can send the your source-files (and Warnings of your compiler, if there are any) to hacksontable@gmail.com and i will have a look on it.
@@hacksontable5850 Thank you so much for such a detailed list. I got it working. It was an include path issue and a little mistake in my code due to long time since using the C/C++ language. Best wishes to you. 👍
Hi I see the video post is quite few years ago, I hope you are well. I'm using this library for OLED projects but I'm having a question.
I've got a new 1.5" OLED MC01506 I2C 128x128 pix with SH1107 drive.
I'm using your SSD1306 library to drive it but I have the issue that all info printed on screen is shifted to right ( probably exact 64 pix ). It is like the left-top corner of the display is at (x,y) = ( 64,0 ) insted of (0,0). Could you please suggest a solution to this issue? I'm not so profficient with these OLED's I expect the issue is comming from the addresing mode of SH1107 being different from SSD1306 ...
Thanks
Something escaped me on the second call to oled_init, why the background colour went to black....
I added all the files from the library and when compiling an error pops up: 'White' undeclared (first use in this function)
Same
Hi .
Can you show How to conect a temperature divece with oled.
Gy-906
I have already ordered a gy-906 👍
Thxxxx
I love you
Hi... I can't find the include library: _ansi.h. I get an error for this...
I want to see temperature on oled.
St l073rz oled v-2.0 0.96 and gy-096
Very good video , could you help me to develop power electronics project using Sine PWM?
Thank you. Please write me an mail with a description of the things you need at hacksontable@gmail.com and then we can talk about it :)
do this library work for ssd1309 oled display??
Hello, it normally should.
The description of the library states that it is compatible with the SSD1309 driver. But I have not tried it out right now.
Thanks for replying.I'm currently trying to do it in SPI 3 wire mode! Please give some suggestions!@@hacksontable5850
@@hacksontable5850 Hello! This library worked for SPI in SSD1309. Thank you for the toturial and healthy interaction in comment section. 😃
I am using IAR Embedded Workbench IDE and it keeps on saying "cannot open source file "_ansi.h"". Any idea why this could be happening?
Hi, i've not used IAR Embedded Workbench but I will give it a try this week. Maybe I can tell you whats going on with the"_ansi.h" file.
@@hacksontable5850 it was missing from IAR directory in my C drive. But I found a solution, all I had to do is copy a BUNCH of includes that's inside the CubeIDE directory and paste it into my project Include folder. It asked for way more other than ANSI.
@@UweWong Hi, I met the same question. Could you tell me which folder should I copy, there are too many 🤣 THANKS!
@@吾丧我 well after copying ansi it will ask for more. I ended up copying the entire include folder from stm32ide over to my IAR. It is located in directory of your stm32ide I think. Best is to do a search for the ansi file on your computer.
@@UweWong I've copied all the ".h" files which in the same folder with "ansi", But there are still something missing and I can't find them in CubeIDE.
I've solved this problem by using another Library whitch don't rely on these files. REALLY THANK YOU !!!
😁
Hi! I've encoutered a problem. After doing exactly the same steps (apart from choosing apropriate i2c1 pins, I use a nucleo-L433RC-P) the display fails to show any life. Anyone have any thouhts why that may be happening? I believe wrongly set i2c parameters are involved. Very informative video though!
Hi milijonierius.
Hmmm, if you want, you can mail me the content of the files "main.c", "ssd1306.h", "ssd1306_conf.h" and "stm32f1xx_hal_msp.c" so that I can have a look on it.
The e-mail address would be: hacksontable@gmail.com
First guess: Is the header-file "ssd1306_conf.h" configured correct? Because you are using an STM32L4. Ensure to define "STM32L4" instead of "STM32F1".
Here I have a small "checklist" for you:
1.) Are the cable plugged in correct (means: SDA from NUCLEO is connected to the SDA of the OLED, and so on. Also check the supply/ground)
2.) Check the pin assignment in the configurator (the .ioc file) Are the pins assigned correct as I2C pins (and are the pins marked green)
3.) Check the parameters in the configuration. The mode should be "I2C". The Speed Mode should be "Standard Mode" and the Clock Speed should be "100000" Hz.
4.) Check the I2C-address of your OLED.
5.) Ensure that there are pull-up resistors (4k7) involved.
6.) (in the main.c) Is the function "ssd1306_Init()" called after the "MX_I2C1_Init()"?
7.) Always call the "ssd1306_UpdateScreen()" function to make your changes (e.g. text written) visible on the OLED.
If you have an logic analyzer/oszilloscope, you could check the I2C lines to see if there are data coming out from the STM32L4.
Hope this helps.
@@hacksontable5850 I captured the signal and the problem was that the MCU was sending to the wrong address. Many thanks for the help!
HI, working fin but I cant print some variables like int. How to do this? draw char or string not working...
I will try to give you an example by the end of this week. Probably a Github-Link.
Hi, here just a quick code snippet:
You can use the sprintf() function to convert the integer into an corresponding char array that can be displayed on the OLED.
I'll give you a short snippet:
int varInt = 7;
//this is the buffer that contains the converted string
char int_str[15];
//here the int gets converted
sprintf(int_str, "%d", varInt);
//init the ssd1306 driver
ssd1306_Init();
//set the cursor
ssd1306_SetCursor(5, 5);
//output the integer value (as text now)
ssd1306_WriteString(int_str, Font_7x10, White);
//update the OLED
ssd1306_UpdateScreen();
I hope this helps :)
If you can make a vídeo How to assemble núcleo and gy and display
Why did you not use pb6 and pb7?
There was no special reason for not choosing these pins. I just wanted to show how the pin-assignment works.
Sorry but there were errors and warnings after set the debug configuration and breakpoint, it said ‘Wimplicit-function-declaration’ and ‘White’ undeclared. I was using L432KC and set the configuration to L4. Could you please help me solve this problem❤❤
Hi, yes I will try to help you. Can you send me a mail with the changes you have made in the header files, so that I can have a look on it.
(hacksontable@gmail.com)
nice work! will you continue this project?
Thanks a lot. Currently I am working on a video that shows how to draw geometric objects and graphics. I try to finish it as fast as possible.
@@hacksontable5850 Hi. I am trying to add more fonts. But I did'nt find any program to output 32bit format font archive. Only 8 bit format! Could you tell me wich program did you use? Thanks a lot.
@André Santos sorry for the late reply. I am currently on holiday.
But yeah, thats a problem I have done some experiments on. As soon as I am finish with the coverter-software, I will share a link.
For this video I have used the existing fonts in the GitHub repo of the OLED driver.
@@hacksontable5850 Thank you for your time. I will be waiting for more video from your channel.
Kkkk It Works my oled was burned i change It ....
Yeahhhhh
I lll do the oled and gy together.
I Will see Github now uhuuuu thx thx thx
hey there. The thing is I got 3 more pins on an oled which is currently available. Those are chipselect, data/command and reset. What should I do with them? I mean, one could just solder the pins to the ground, according to datasheet (under normal conditions their signal is Low). What do you think? Sorry, I'm newbee.
Hey, there nothing to be sorry for. Its a good question. Can you please send me the name/model of your OLED and the datasheet, so I can have a look on it.
I am currently not in my office the next two weeks, but i can have a quick look on it anyway and give you an answer.
Just mail the model-number/datasheet of your OLED to: hacksontable@gmail.com
Is ssd1306 adaptable for STM32WLE5JCI6??
nice tut
damn, still cant get it to work. Had the most hope for you tutorial of all those i have watched or read so far. Could be i got a whole batch of bad screens since i couldnt even get the back to go all white.
Hi, hmmm it might be the case that the batch is bad or has a different driver (chip) on it. If you want to, you can mail me your source code (oled driver files and the main) so that i can have a look on it. (hacksontable@gmail.com)
@@hacksontable5850 make more STM32 videos, you are very good at it!
Do you happen to have code to enable scrolling of text?
@@powertechgrows6093 Unfortunately not. It would be a great project though.
Hello, gy from hittube is a old version
Danke!
Gerne 🙂
Hi! Do You know how to print int or float variables onto the screen? Unfortunately conventional c methods do not work :/
Hi, you can use the sprinf() function to convert the integer/float to an corresponding char-array that can be printed on the OLED.
Here is a short snippet:
int varInt = 7;
//this is the buffer that contains the converted string
char int_str[15];
//this is the buffer that contains the converted string
float varFloat = 10.14;
char float_str[15];
//here the int gets converted
sprintf(int_str, "%d", varInt);
//here the float gets converted to text and stored
sprintf(float_str, "%.2f", varFloat);
//init the ssd1306 driver
ssd1306_Init();
//set the cursor
ssd1306_SetCursor(5, 5);
//output the integer value (as text now)
ssd1306_WriteString(int_str, Font_7x10, White);
//se the cursor
ssd1306_SetCursor(15, 15);
//output the float value (as text now)
ssd1306_WriteString(float_str, Font_7x10, White);
//update the OLED
ssd1306_UpdateScreen();
--> IMPORTANT NOTE C/C++ Build > Settings > Tool Settings", or add manually "-u _printf_float" in linker flags."
I will try to cover this topic into a video.
I hope this helps.
@@hacksontable5850 Thank You! Trying that right away C:
So sad, it just does not function to me. It cannot find White altough it is marked blue and italic. The same with Font_7x10. It also says that I have implicit declaration of init, setcursor, updatescreen and writestring. But I wrote it exactly like you. So it cannot detect it as a declaration. I wrote it to run the functions.
I have included the header file of the OLED lib in the main under including main.h. It functions now. But I cannot remember you have done that, right? I thought over the Include paths and rebuild it does it automacially or something.
:)
I my oled didn't turned on. 0 erros :( perfect tutorial... But i AM a beginner
Hi, today in the evening/night I will start a Project and upload it on Github. I will send you the Link then👍
The first project will solely contain the OLED driver and its configutation.
The second project will also contain the IR-Temp-sensor (I have received it now).
I will create a Project for your STM32L073RZ too, so that you can use it without modifications.
I hope this hepls.
Thx i correct the code It worked :).
Let make the gy yeah
@@hacksontable5850 thx Men i so happy
@@terecoo123 Hi, quick update. I now have written a driver to read out and convert the temperature with the IR-Sensor. Its written by using the LL (Low Level Library from STM32). I will write a HAL driver too in the next three days. And I will upload the current driver project as fast as possible on GitHub and inform you when its online. A video with a detailed description will be the next step then 👍
@@hacksontable5850 thx i Will see
how can one create new fonts for oled in stm32 ? I am trying to create bigger fonts but no success
I am currently working on a solution for this 👍
@@hacksontable5850 I actually managed to make custom different size fonts for my oled. But my library is also custom. I want to know how people are making 16bit fonts as used in your specified library
@@EmbeddedEnigma I am not sure, what software was used to create this font. But right now I am also writing a tool to create the needed 16bit font. The tool will just need a bitmap font (.png or .bmp file and a .fnt-file). As soon as the tool is finish, there will be a video-tutorial on how to use it. And a download-link of course. Hope this will help you, even if you already created your own library/tool :) Just a question, what is your "font-creation-process"? What do you need as input for your library?
@@hacksontable5850 i am using glcd font creator to create different size fonts. I modified adafruit library that is used for arduino. My fonts require width,height,offsrt and num of characters.
@@hacksontable5850 overall glcd font creator is really nice tool they provide with everything. But most of the time thete fonts need tweeking
Excellent!