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

Комментарии • 129

  • @upir_upir
    @upir_upir  5 месяцев назад

    Do you like the video? Please consider buying me a coffee ☕, thank you! www.buymeacoffee.com/upir

  • @VoeViking
    @VoeViking Год назад +10

    Another great project, the way you explain how to move the needle is just awesome.

    • @upir_upir
      @upir_upir  Год назад +1

      Thank you, I really appreciate your nice words!

  • @Kitariza
    @Kitariza 6 месяцев назад +2

    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!

    • @upir_upir
      @upir_upir  6 месяцев назад +1

      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!

  • @ABG_3D
    @ABG_3D Год назад +4

    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.

    • @upir_upir
      @upir_upir  Год назад +1

      Thanks a ton for such a nice comment! I´m glad you like it and stay tuned for more :)

  • @PCBWay
    @PCBWay Год назад +8

    That was incredibly well-built👍

    • @upir_upir
      @upir_upir  Год назад

      Thank you, I appreaciate it!

    • @PCBWay
      @PCBWay Год назад

      @@upir_upir

  • @ChristianBehnke
    @ChristianBehnke Год назад +13

    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. 👍🏻

    • @upir_upir
      @upir_upir  Год назад +2

      That´s great to hear, thank you for your comment and good luck with your project!

  • @jumbo999614
    @jumbo999614 Год назад +2

    Great tutorial. Other youtubers' video tutorial just like "Here, download my code and run it".
    Your video really help beginners.

    • @upir_upir
      @upir_upir  Год назад +1

      Thank you, I´m glad it´s helpful!

  • @SatansLtlBaby
    @SatansLtlBaby Год назад +4

    these tutorials are so good!

  • @raymondmichael4987
    @raymondmichael4987 Год назад +1

    It’s such a happy 😊 feels to see a notification from you brother.
    Thanks buddy

    • @upir_upir
      @upir_upir  Год назад

      Thank you, Raymond! And good luck with your project

  • @perotekku
    @perotekku Год назад +2

    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.

    • @upir_upir
      @upir_upir  Год назад +1

      Cool. Please feel free to post a link to your project, I would love to see it!

  • @goowatch
    @goowatch Год назад +1

    Congratulations. Great tutorial. You have best channel on GUI for microcontroller. Go ahead!

    • @upir_upir
      @upir_upir  Год назад

      Glad you think so! Thanks for your comment and stay tuned for more content :)

  • @kshysztof9649
    @kshysztof9649 Год назад +1

    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 :)

    • @upir_upir
      @upir_upir  Год назад +1

      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.

  • @katerspam
    @katerspam Год назад +1

    Impressive and very cool on such a basic display

  • @Ahmedhkad
    @Ahmedhkad Год назад +5

    I was wondering how to change font, very good explanation and thanks for your hard amazing work

    • @upir_upir
      @upir_upir  Год назад +1

      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.

    • @Ahmedhkad
      @Ahmedhkad Год назад +1

      @@upir_upir thanks

  • @gm32x
    @gm32x Год назад +2

    Thanks for the great quality videos, i love your channel

    • @upir_upir
      @upir_upir  Год назад

      Thank you, Gabriel! I’m glad you like it

  • @upir_upir
    @upir_upir  Год назад +4

    Want to see this project used in a menu? 𝐖𝐚𝐭𝐜𝐡 𝐭𝐡𝐢𝐬 𝐯𝐢𝐝𝐞𝐨> ruclips.net/video/HVHVkKt-ldc/видео.html

  • @vladancetojevic
    @vladancetojevic Год назад +1

    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!

    • @upir_upir
      @upir_upir  Год назад +1

      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!

  • @mostafanfs
    @mostafanfs Год назад +1

    I really enjoyed the work

  • @ahmetyldz5674
    @ahmetyldz5674 Год назад +1

    That is awesome tutorial. Thank you so much!

    • @upir_upir
      @upir_upir  Год назад

      You are welcome, I´m glad you like it!

  • @diabolist38
    @diabolist38 7 месяцев назад +1

    Perfect! Thank you.

    • @upir_upir
      @upir_upir  7 месяцев назад

      You are welcome, I´m glad you like it.

  • @plazmax
    @plazmax Год назад +1

    thats awesome, thank you for sharing us

    • @upir_upir
      @upir_upir  Год назад +1

      You are welcome, thank you for your comment!

  • @debarjo
    @debarjo Год назад +1

    Blew my mind!!!!!! Upir you are da Boss!!!!

    • @upir_upir
      @upir_upir  Год назад +1

      Thank you, I’m glad it was useful!

  • @orange_tweleve
    @orange_tweleve 6 месяцев назад +1

    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 !

    • @upir_upir
      @upir_upir  6 месяцев назад +1

      Thank you for your comment; your project looks great! Is that just for fun or are you going to use it somewhere?

    • @orange_tweleve
      @orange_tweleve 6 месяцев назад

      ​@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 .

  • @AFSMG
    @AFSMG Год назад +1

    Excelente trabajo

  • @ricardorochax
    @ricardorochax Год назад +1

    Very good!

  • @luisrey8986
    @luisrey8986 Год назад +1

    Excelente!👍

  • @monskugmail
    @monskugmail Год назад +3

    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 !!!

    • @upir_upir
      @upir_upir  Год назад +1

      Thank you! That’s a good idea, I will put it on my todo list 🙂

    • @monskugmail
      @monskugmail Год назад

      @@upir_upir Thanks Upir

  • @SekssaouaMedia
    @SekssaouaMedia Год назад +1

    تحياتي لك من المغرب

    • @upir_upir
      @upir_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!

  • @laddinimby
    @laddinimby Год назад

    Thanks 👍

  • @pasplusvite
    @pasplusvite Год назад +1

    merci 10/10

  • @chippiko
    @chippiko Год назад +1

    Thanks

    • @upir_upir
      @upir_upir  Год назад +1

      You are welcome! Good luck with your project

  • @BrokenToe
    @BrokenToe Год назад +1

    Keep it up upir

  • @davismusic8090
    @davismusic8090 Год назад +1

    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

    • @upir_upir
      @upir_upir  Год назад +2

      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.

  • @janoshorvath9430
    @janoshorvath9430 Год назад +1

    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?

    • @upir_upir
      @upir_upir  Год назад +2

      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.

  • @dobleboot
    @dobleboot Год назад +1

    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?

    • @upir_upir
      @upir_upir  Год назад

      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!

    • @dobleboot
      @dobleboot Год назад

      @@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.

  • @alberto1dh
    @alberto1dh 6 месяцев назад +1

    Id like to see turbo gauge with esp32c3 and round displays... Im stuck with the project, need ideas

    • @upir_upir
      @upir_upir  6 месяцев назад +1

      I do have a very similar project planned for this year. Stay tuned :)

  • @rhein-sondler
    @rhein-sondler Год назад +1

    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?

    • @upir_upir
      @upir_upir  Год назад

      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?

  • @hansdegroot652
    @hansdegroot652 2 месяца назад +1

    Global variables use 13640 bytes (4%) of dynamic memory, leaving 314040 bytes for local variables. Maximum is 327680 bytes.
    Sketch too big;

    • @upir_upir
      @upir_upir  2 месяца назад

      What board do you use?

  • @marinenav8
    @marinenav8 6 месяцев назад +1

    👍👍👍

  • @DeLewrh
    @DeLewrh Год назад +1

    How come you chose to use two circles instead of just using the stroke fill

    • @upir_upir
      @upir_upir  Год назад

      I guess it’s possible. Using two circles is just an old habit from times when photoshop didn’t support stroke for shape layers.

  • @addm1119
    @addm1119 2 месяца назад +1

    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?

    • @upir_upir
      @upir_upir  2 месяца назад

      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?

    • @addm1119
      @addm1119 2 месяца назад

      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.

  • @Finn-cz7mv
    @Finn-cz7mv 11 месяцев назад +1

    How do you connect the potentiometer beforehand? 25:51

    • @upir_upir
      @upir_upir  11 месяцев назад +1

      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!

  • @marklaurence8504
    @marklaurence8504 5 месяцев назад +1

    where can I get the gerber file for custom PCB?

    • @upir_upir
      @upir_upir  5 месяцев назад

      Thank you for your comment, Are you sure you are commenting on the right video? There is no custom pcb used here.

  • @buutranhoang5455
    @buutranhoang5455 Год назад +2

    I want to download this code, what should I do?

    • @upir_upir
      @upir_upir  Год назад

      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!

  • @user-xq7wz2nu6l
    @user-xq7wz2nu6l Год назад +1

    я гдето слышал что ардуино не очень любит работать с синусом, интересно сколько ресурсов потребляет данная программа?

    • @upir_upir
      @upir_upir  Год назад

      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.

    • @user-xq7wz2nu6l
      @user-xq7wz2nu6l Год назад

      @@upir_upir использование таблицы в некоторых случаях может быть оправдвно, особенно если нет нужды рисовать стрелку очень точно, достаточно нескольких точек для удовлетворительного рисования стрелки. я собираюсь применить ваш проект в дисплее для электровелосипеда, но там кроме рисования есть еще и прочая математика и работа с CAN шиной.

  • @nickname0ff
    @nickname0ff Год назад +1

    Trying repeat your project with U8g2 library, but always get glitch instead images. Do you know why?

    • @upir_upir
      @upir_upir  Год назад

      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.

    • @nickname0ff
      @nickname0ff Год назад +1

      @@upir_upir Thank you! Export with GIMP works fine. But I need to invert color first and use drawXBMP also.

    • @upir_upir
      @upir_upir  Год назад

      What’s the reason for also using drawXBMP?

    • @nickname0ff
      @nickname0ff Год назад +1

      @@upir_upir I getting glitch if I'm using drawXBM. So, I used code from library example with drawing logo, where they use drawXBMP

    • @upir_upir
      @upir_upir  Год назад

      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

  • @chrissantos7865
    @chrissantos7865 Год назад +1

    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

    • @upir_upir
      @upir_upir  Год назад

      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!

    • @chrissantos7865
      @chrissantos7865 Год назад +1

      @@upir_upir that was it, I worked that out after 10 frustrating minutes. You make it look all to simple friend. Thanks

    • @upir_upir
      @upir_upir  Год назад +1

      @@chrissantos7865 I´m glad you figured it out! Feel free to ask if you get stuck again.

  • @nemonespider
    @nemonespider 10 дней назад +1

    Can u make a artificial horizon

    • @upir_upir
      @upir_upir  9 дней назад

      That´s probably a question of finding the right sensor. It should be possible.

    • @nemonespider
      @nemonespider 9 дней назад

      @@upir_upir I’ve seen a few on RUclips but most won’t share the code

  • @LastChanceNow
    @LastChanceNow Год назад +1

    ⭐⭐⭐⭐⭐

  • @dickdon2631
    @dickdon2631 10 месяцев назад +2

    5:58 i cannot select black color, please help me

    • @upir_upir
      @upir_upir  10 месяцев назад

      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!

    • @dickdon2631
      @dickdon2631 10 месяцев назад +1

      @@upir_upir i ask someone else, you must forgot hit delete key on keyboard this step later,is that true?

    • @upir_upir
      @upir_upir  10 месяцев назад

      @@dickdon2631 it’s possible..

  • @EmirPehlivanoglu
    @EmirPehlivanoglu Год назад +1

    24:52

  • @karmitfrog7968
    @karmitfrog7968 Год назад +1

    next video arduino ipod wheel

    • @upir_upir
      @upir_upir  Год назад

      Do you mean that "manual" whell where you had to actually turn it? That would be cool.

  • @tohcp9562
    @tohcp9562 9 месяцев назад +3

    Can you slow down the speech, it might more perfect for tutorial. Thanks

    • @upir_upir
      @upir_upir  9 месяцев назад +2

      I’m trying, hopefully my newer tutorials are little more slower. Could you perhaps use the playback speed to slow it down?

    • @3lpid3
      @3lpid3 5 месяцев назад +1

      You can slow it down yourself. Click on the gear icon and lower the speed to 0.5 or 0.75

  • @theentertainment7239
    @theentertainment7239 Год назад +1

    That will forever be a problem

    • @upir_upir
      @upir_upir  Год назад

      I’m sorry, what will be the problem?

  • @hazemalghabra8816
    @hazemalghabra8816 8 месяцев назад +1

    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

    • @upir_upir
      @upir_upir  8 месяцев назад +1

      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!

    • @hazemalghabra8816
      @hazemalghabra8816 8 месяцев назад

      @@upir_upir thanks for the quick response. Email sent!