Arduino OLED Gauge
HTML-код
- Опубликовано: 20 сен 2022
- Do you like the video? Please consider buying me a coffee ☕, thank you! www.buymeacoffee.com/upir
Learn how to create a simple OLED gauge with Arduino UNO!
PCBWay - www.pcbway.com/setinvite.aspx...
WOKWI project: wokwi.com/projects/3433917090...
Useful links from the video:
Arduino UNO - s.click.aliexpress.com/e/_AXDw1h
Arduino breadboard prototyping shield - s.click.aliexpress.com/e/_ApbCwx
128x64 SSD1306 OLED Display: s.click.aliexpress.com/e/_DCK...
Font for tickmarks - www.dafont.com/pixeled.font
Font for speed - www.dafont.com/aldo-the-apach...
Huge Aluminium Knob: s.click.aliexpress.com/e/_A4GlET
Big Black knob: s.click.aliexpress.com/e/_Aq1wGF
u8g fonts (fonts available for u8g library): nodemcu-build.com/u8g-fonts.php
u8g documentation: github.com/olikraus/u8glib/wi...
Wokwi starting project: wokwi.com/arduino/projects/30...
Transparent OLED display: s.click.aliexpress.com/e/_Dns...
Photopea (online Photoshop-like tool): www.photopea.com/
image2cpp (convert images into C code): javl.github.io/image2cpp/
Polar coordinates - en.wikipedia.org/wiki/Polar_c...
Related videos:
Turbo pressure gauge with Arduino and OLED display - • Turbo pressure gauge w...
Arduino Car Cluster with OLED Display - • Arduino Car Cluster wi...
Knob over OLED Display - • Knob over OLED Display...
Arduino + OLED = 3D ? - • Arduino + OLED = 3D ?
------------------------------------------------------------------------------------------------------------------------------
Learn how to create a custom gauge using 128x64px SSD1306 OLED Display connected to Arduino UNO, driven by a simple 10K potentiometer. Everything is explained step by step, so even if you are beginner, you should be able to follow this tutorial. For graphics, a free online graphic editor Photopea is used. Before we go with real Arduino, we will test the program running in the free online Arduino emulator WOKWI. Have fun!
------------------------------------------------------------------------------------------------------------------------------
PCBWay is a service for manufacturing custom PCBs. If you click the link above, you will get a coupon for $5, which is exactly the price of 10 pieces of custom PCBs. In that case, you will only pay for shipping. Do you have any experience doing this? Please let me know in the comment section!
------------------------------------------------------------------------------------------------------------------------------
Do you have any questions? Suggestions for the next video? Please put those down in the comment section. I try to answer as many questions as I can. Thank you for watching and reading the video description, and I hope to see you next time. Good luck with your projects!
--------------------------------------------------------------------------------------------------------
Hashtags:
#wokwi #arduino #OLED
--------------------------------------------------------------------------------------------------------
Keywords related to this video:
Arduino UNO, Arduino, OLED, u8g, u8g2, Arduino Display, Arduino Free Code, esp32, Arduino project, Arduino display, Arduino ideas, new project ideas, Arduino 2022, Arduino project 2022, Arduino project ideas, Arduino tutorial, microcontroller, arduino projects for engineering students, arduino based projects, microcontroller projects, cool projects, mini project using arduino, arduino mini projects, electronics projects using arduino, how to make arduino project, arduino uno projects for beginners, projects with arduino, projects using arduino, project using arduino, arduino based projects for final year
Do you like the video? Please consider buying me a coffee ☕, thank you! www.buymeacoffee.com/upir
Another great project, the way you explain how to move the needle is just awesome.
Thank you, I really appreciate your nice words!
RUclips recommended this and i only watched 9 minutes of this video and subscribed your channel. Really like the pace of explaining and doing same time. I like to do boost gauge to my car with arduino or some else microboard with oled screen. Haven't started, just watching youtube and dreaming abaut that. But while watching this video only nine minutes i 'm sure that i can do it just the way i like. Thanks!
Thank you for your comment and nice words, I’m glad it was helpful. Please check also my other videos, I actually plan to record a video about creating a custom boost gauge indicator soon. I have one already, but that was just simulating the values using a potentiometer and not a real sensor. Anyway, good luck with your project!
Upir, I just want to commend you on yet another great video with fantastic explanations for anyone to follow along. Looking forward to the next one.
Thanks a ton for such a nice comment! I´m glad you like it and stay tuned for more :)
That was incredibly well-built👍
Thank you, I appreaciate it!
@@upir_upir
I have no need for a speed gauge, but I learned so much about the process that I'll probably use some of this in another project! Thanks for the detailed instructions. 👍🏻
That´s great to hear, thank you for your comment and good luck with your project!
Great tutorial. Other youtubers' video tutorial just like "Here, download my code and run it".
Your video really help beginners.
Thank you, I´m glad it´s helpful!
these tutorials are so good!
Thank you!!
It’s such a happy 😊 feels to see a notification from you brother.
Thanks buddy
Thank you, Raymond! And good luck with your project
Will be using info from this for my own speedometer project.
Plan is to use a hall effect sensor to record transmission output RPMs, then convert to speed with rearend ratio and tire circumference.
Main reason for not using GPS is the hall effect isn't reliant on satellite signal, as I want consistent input of data, so I can log travel distance for an odometer.
Cool. Please feel free to post a link to your project, I would love to see it!
Congratulations. Great tutorial. You have best channel on GUI for microcontroller. Go ahead!
Glad you think so! Thanks for your comment and stay tuned for more content :)
That was a great video :)
I'm just starting out, and I haven't yet understood the concept of assigning a certain input data type and value, to display it on the screen, as well as SPI and I2C communication methods. You make it look very easy, hopefully I'll catch up to you with your videos :)
I was able do drive a 5110 screen and display a Hello World in it, but nothing more so far :)
Thank you, I´m glad you like it. Please feel free to watch my older videos as there are some details described more in detail, especially regarding the OLED screens and driving those with Arduino. Feel free to ask if you have any questions.
Impressive and very cool on such a basic display
Thank you!
I was wondering how to change font, very good explanation and thanks for your hard amazing work
Glad it was helpful! As for the fonts, here is a quick overview of the fonts that could be easily used - nodemcu-build.com/u8g-fonts.php
If that´s not enough, you can always create your own font, or - as in this video, just images for digits.
@@upir_upir thanks
Thanks for the great quality videos, i love your channel
Thank you, Gabriel! I’m glad you like it
Want to see this project used in a menu? 𝐖𝐚𝐭𝐜𝐡 𝐭𝐡𝐢𝐬 𝐯𝐢𝐝𝐞𝐨> ruclips.net/video/HVHVkKt-ldc/видео.html
If you are using display with 7 pins (SPI), don't forget to comment line 36, and uncomment line 37.
Great video upir, as always!
Good tip! It´s mentioned in the wokwi source code, but it´s worth reminding, since I haven´t specifically mentioned the line numbers. Thank you for your comment and good luck with your projects!
I really enjoyed the work
Awesome, thank you!
That is awesome tutorial. Thank you so much!
You are welcome, I´m glad you like it!
Perfect! Thank you.
You are welcome, I´m glad you like it.
thats awesome, thank you for sharing us
You are welcome, thank you for your comment!
Blew my mind!!!!!! Upir you are da Boss!!!!
Thank you, I’m glad it was useful!
Hello , not really sure if you will see my comment , but thanks a lot for the tutorial , i managed to make a gauge cluster with rpm , speed , fuel level ; boost pressure , turn signals , low beam/ high beam and a fully functioning odometer thats speed dependant. I uploaded a short clip of it on my channel's shorts. Thanks again !
Thank you for your comment; your project looks great! Is that just for fun or are you going to use it somewhere?
@upir_upir thank you ! Oh and yeah the gauge cluster is for an rc truck I'm working on. There's a lot of other cool things on it like an actual spectrum analyzer for music ( 20hz to 20khz ) with esp32. The gauge cluster was the final addition for audio/video setup 😅 I uploaded another video of the chassis if you wanna see .
Excelente trabajo
Thank you!
Very good!
Thank you, Ricardo!
Excelente!👍
Thank you!
Excellent 👍
Maybe I can learn enough from you to build a Arduino based color Vu-meter.
Or maybe you can teach us how to make it. Just an idea.
Thanks !!!
Thank you! That’s a good idea, I will put it on my todo list 🙂
@@upir_upir Thanks Upir
تحياتي لك من المغرب
I´m glad that you think I can understand, but thankfully we have google translate :) Thank you for your comment and good luck with your projects!
Thanks 👍
You are welcome 👍
merci 10/10
Thank you!
Thanks
You are welcome! Good luck with your project
Keep it up upir
I will try 🙂
Thanks for the video, I am following your tutorial, however this script as well as the one with the progress bar does not keep a stable value but fluctuates. I guess this is linked to the micro voltage variations. what could I write to insert a certain tolerance threshold and thus obtain larger steps between one and the other? I thank you
Thank you for your comment. There are multiple ways how to fix that, starting with a simple capacitor, changing the code to average few last readings, restricting the code to only jump by defined increments, to something like this:
www.instructables.com/Smooth-Potentiometer-Input/
www.norwegiancreations.com/2015/10/tutorial-potentiometers-with-arduino-and-filtering/
I´m sure you will find more examples if you google "arduino smoothing potentiometer", but please feel free to ask if you have any questions. Good luck with your projects.
Good video, but since the GUI is pretty simple, it could have been done with simple geometry primitives (circles, lines, etc.) too. What is the advantage of using fixed pictures instead of those?
Thank you for your comment, I usually start with image in Photoshop/Photopea because it´s much faster to tweak the appearance compared to generating code and tweaking the values there. A lot of times, it turns out that using a fixed picture is usualy more performant solution compared to drawing primitives, but you are correct that it´s surely an option.
Thank you for the tutorial. I believe you are using the pay version of Photopea. For instance at 5:15:37 you are typing Ctrl-Shif_C on the selection, then Ctrl-V to paste. There is not way I can get that with the free Photopea, it always says this is an empty selection. I checked this like five times and made sure I had exactly the same layers and selections as you and could never get anything from the selection. Is this the case?
The only difference between paid and unpaid Photopea is not showing the ads. Otherwise, it should be the same. The Ctrl + Shift + C shortcut should never show you this kind of message, only the Ctrl + C does. Try using menu item instead - Edit > Copy Merged. Let me know if that helps!
@@upir_upir Thanks, it seems to be Photopea is browser dependent , I was using Edge and the best was only catching the current layer. I've retried with Chrome and it works. I will now move to test with chrome what you do at 19:38:37 where when I was trying to fill the digits with black, but the whole digit was covered with black too ending on a black layer.
Id like to see turbo gauge with esp32c3 and round displays... Im stuck with the project, need ideas
I do have a very similar project planned for this year. Stay tuned :)
I'm looking for a dash for the bike. There should be a display of 0-60 km/h. And the speed is determined with a Hall sensor on the wheel. Can you build something like this for the Arduino Nano?
Yes, you should be able to use Arduino Nano with this code, just switch the potentiometer with the halo sensor. Which exact sensor are you using?
Global variables use 13640 bytes (4%) of dynamic memory, leaving 314040 bytes for local variables. Maximum is 327680 bytes.
Sketch too big;
What board do you use?
👍👍👍
Thank you!
How come you chose to use two circles instead of just using the stroke fill
I guess it’s possible. Using two circles is just an old habit from times when photoshop didn’t support stroke for shape layers.
Help needed
Hello upir, great video. I have tried to change the pin to be used to A1 however when I changed the pinMode in the void setup and the analogue read in the void loop to A1, the gauge will only go down as far as 53 and only as high as 56. Then it will fall back down to 53.
Can you or anyone help me in understanding where I went wrong in changing the pin being used from A0 to A1?
Sounds strange. I have quickly reconnected the Potentiometer to A1 in the WOKWI simulator and updated the code, and it works as expected. Are you perhaps doing something else with the pin?
Thanks for the reply!
I was able to resolve the problem by clearing the arduino memory and then re uploading the code. For whatever reason it’s working now.
How do you connect the potentiometer beforehand? 25:51
You can see it much better if you open the WOKWI emulator - link is in the description of this video. The signal pin (middle one on potentiometer) goes to pin A0, the other two pins from potentionmeter goes to 5V and GND. It does not matter how you connect it, because it would either set the value clockwise or counter clockwise. Let me know if that helps or if you still need any help and good luck with your project!
where can I get the gerber file for custom PCB?
Thank you for your comment, Are you sure you are commenting on the right video? There is no custom pcb used here.
I want to download this code, what should I do?
Open Arduino IDE, open the WOKWI emulator - wokwi.com/projects/343391709050176083
Copy the code from emulator into Arduino IDE and save it. Or you can directly save it also from the WOKWI website. Let me know if that helps!
я гдето слышал что ардуино не очень любит работать с синусом, интересно сколько ресурсов потребляет данная программа?
It’s running fast enough, but since there are only certain number of positions, you can use lookup table and precompute the values in the setup function. This is what I have done for the “knob over oled” project and it helped a little bit.
@@upir_upir использование таблицы в некоторых случаях может быть оправдвно, особенно если нет нужды рисовать стрелку очень точно, достаточно нескольких точек для удовлетворительного рисования стрелки. я собираюсь применить ваш проект в дисплее для электровелосипеда, но там кроме рисования есть еще и прочая математика и работа с CAN шиной.
Trying repeat your project with U8g2 library, but always get glitch instead images. Do you know why?
u8g2 library uses different image format - the XBM format. You can export it using GIMP or for example use this online "editor" - xbm.jazzychad.net/ I will try to investigate if there is an easy way how to convert between the formats and easily switch between u8g and u8g2. Let me know if that helps.
@@upir_upir Thank you! Export with GIMP works fine. But I need to invert color first and use drawXBMP also.
What’s the reason for also using drawXBMP?
@@upir_upir I getting glitch if I'm using drawXBM. So, I used code from library example with drawing logo, where they use drawXBMP
Please see my latest video where this is explained- ruclips.net/video/4GfPQoIRqW8/видео.html
The P stands for program memory, so you the appropriate function based on where your data is stored
I find this program super frustrating. I was using the pencil tool to correct pixels and half way through it stopped working and turning pixels red. I can figure out what happened or how to fix it
My guess is that you have accidentally enabled the quick mask mode. Try pressing Q button to turn the quick mask mode off. It´s the button below the color selector. Let me know if that helps!
@@upir_upir that was it, I worked that out after 10 frustrating minutes. You make it look all to simple friend. Thanks
@@chrissantos7865 I´m glad you figured it out! Feel free to ask if you get stuck again.
Can u make a artificial horizon
That´s probably a question of finding the right sensor. It should be possible.
@@upir_upir I’ve seen a few on RUclips but most won’t share the code
⭐⭐⭐⭐⭐
😋
5:58 i cannot select black color, please help me
There are many different reasons why you might not be able to select it. Perhaps you have a different layer selected? Also, once you have the magic wand selected, you need to make sure to have the same settings as in the video. Also, deleting the black color is not really that important, you can just keep it. Good luck with your projects!
@@upir_upir i ask someone else, you must forgot hit delete key on keyboard this step later,is that true?
@@dickdon2631 it’s possible..
24:52
What?
next video arduino ipod wheel
Do you mean that "manual" whell where you had to actually turn it? That would be cool.
Can you slow down the speech, it might more perfect for tutorial. Thanks
I’m trying, hopefully my newer tutorials are little more slower. Could you perhaps use the playback speed to slow it down?
You can slow it down yourself. Click on the gear icon and lower the speed to 0.5 or 0.75
That will forever be a problem
I’m sorry, what will be the problem?
Hello- do you mind sharing your email? We have an arduino-based gauge cluster project that could greatly benefit from your experience and skills. Thanks
Sure, you should be able to see my email address if you go into the about section of this channel. However, I know that sometimes it only works on desktop and not on phone. I look forward to your email!
@@upir_upir thanks for the quick response. Email sent!