How to Decode and Display Bitmap Images Using an Arduino

Поділитися
Вставка
  • Опубліковано 25 жов 2024

КОМЕНТАРІ • 51

  • @wchen2340
    @wchen2340 2 роки тому +6

    Finally someone who doesnt just throw in a bunch of libraries and function calls and there you have it (which isnt helpful/overwhelming for beginners or if your application is not off-the-shelve, custom neopixelmatrix in my case). Straight forward implementation and easy to follow presentation. Very helpful. Thanks alot.

    • @BytesNBits
      @BytesNBits  2 роки тому +1

      Hi. No problem. Glad you found it useful.

  • @josephreynolds7395
    @josephreynolds7395 Рік тому

    Im working on an image interpolation program at the moment and this was really helpful. God speed

  • @redxtreme2598
    @redxtreme2598 2 роки тому

    This is exactly what I was hoping to find, for the same reasons as you listed. Thank you!

  • @IronRiviera
    @IronRiviera 3 роки тому +1

    You are good at this. I especially enjoyed this video. I think I really learned a thing or two to use in my own code. Thank you.

  • @billlegge1955
    @billlegge1955 2 роки тому

    Excellent - I live in the middle of nowhere in SW Australia and struggle learning C from books. Your video is a great help. I'm working on a GPS with map display and want to store the maps on an SD card. Many thanks.

  • @marcosmoraes1980
    @marcosmoraes1980 2 роки тому

    Fantastic video. I wish there were more content like this online!

    • @BytesNBits
      @BytesNBits  2 роки тому

      Hi. Thanks for your comments. I'm glad you found it useful.

  • @thanakolamul6197
    @thanakolamul6197 Рік тому +1

    Nice explanation. It might help me as well. I will try it. Love from sri lanka.❤️

    • @BytesNBits
      @BytesNBits  Рік тому

      Thanks. Glad you found it useful.

  • @patrickk2791
    @patrickk2791 3 роки тому

    Here we go! Been looking forward to this one :)

  • @altitude1039
    @altitude1039 Рік тому

    Thanks for posting this, just got some ESP32 boards with colour touch screens, and have been having trouble getting any sketches to work.

  • @patrickk2791
    @patrickk2791 3 роки тому

    This was both a very fun and a very informative video, very well explained! Great job once again!

  • @IronRiviera
    @IronRiviera 3 роки тому

    This info is all very useful. I wonder if you'd be willing to teach how to make a needle gauge, as you were discussing. I've looked at the kbv examples and they are a bit confusing. Thank you

    • @BytesNBits
      @BytesNBits  3 роки тому

      Hi. Control panels are on my list of things to do at some point. My idea in this video to to draw / photo / etc some gauges to make a more realistic control panel. Each gauge would have a solid colour background. You would then draw the needles / pointers / etc. onto the gauge to show the value. Use the overwrite and redraw technique to erase the old pointer and then redraw the new value to animate it.
      For a rotary dial you need to work out the end points of the needle. Taking the centre point makes one end easy. Next you need to translate the values into angles and then work out the coordinates of the other end using trigonometry. Then just draw a line between the two.
      I hope this helps a bit. It's a bit vague but I hope you get the idea.

    • @IronRiviera
      @IronRiviera 3 роки тому +1

      @@BytesNBits Yes, I understand. I'm guessing the pixels under the old needle position would have to be redrawn as well. At any rate, I enjoy your style, and am looking forward to more. BTW; you deserve so many more subscribers. Maybe you could get an article onto Hackaday?

  • @TunelessBog
    @TunelessBog Рік тому

    Would you be able to reduce the delay in your slideshow code to display multiple images on the SD card quickly as a GIF?

    • @BytesNBits
      @BytesNBits  Рік тому

      The limiting factor is the screen area you need to draw for each frame. If your GIF is small you'll get a good frame rate. Full screen size and you're down to 1fps or slower.

  • @tomasvolpe
    @tomasvolpe 2 роки тому

    Hello, thank you very much for sharing your work. I was wondering if there is a way to display these images in a faster way, maybe using .raw format or something similar? Is it possible to increase the speed of the process? Thanks in advance

    • @BytesNBits
      @BytesNBits  2 роки тому +1

      Hi. The main bottleneck is sending the data out to the screen. This needs to be done pixel by pixel. The Arduino is very low on RAM so we can't create any sensible memory based frame buffer which would let us send the whole screen in one go. Have a look at this video for the idea using a Pi Pico - ua-cam.com/video/fGfb2NvDlG4/v-deo.html

  • @FebMixer
    @FebMixer 2 роки тому

    Thank you for sharing your wealth of knowledge with us.
    I'm using a monochromatic screen (SHARP MEMORY DISPLAY) - and I'm trying to decode 1-bit bmp files with no luck. Following your guide & reducing the total byte counts / buffer doesn't seem to do the trick.
    Any tips?
    Much appreciated!

    • @BytesNBits
      @BytesNBits  2 роки тому +1

      Hi. I would create a small bitmap image say 16 x 16 pixels. Then modify the code to output all the data is pulls out of the image file. You should then be able to see the data, what the code thought it had to do and hopefully you'll start to see where it went wrong. I hope this helps.

    • @FebMixer
      @FebMixer 2 роки тому

      @@BytesNBits This helps a ton. Basically did what you suggested (except I went for a 3x3 1bit bmp). With more testing, I should be able to get something out!
      Will update this thread/upload my own vid explaining how I ended up doing it.
      Thanks for your reply! Cheers.

    • @BytesNBits
      @BytesNBits  2 роки тому

      @@FebMixer Great. Let me know what happens.

  • @iskimaru
    @iskimaru 2 роки тому

    Can i display images without the bidirectional converter

    • @BytesNBits
      @BytesNBits  2 роки тому

      Hi. The screen runs at 3.3V and the Arduino outputs at 5V. You run the risk of damaging the screen without the level shifter. If you look at my setup video for the screen and Arduino I use a simple resistor voltage divider circuit, but the level shifter is a much neater solution.

  • @surenbono6063
    @surenbono6063 Рік тому

    ..how to make arduino recognise/read color (pixel array) in a image file at certain coordinate on that image?...used to decode timezone and country data on a globe map image file where each country is represented by a color...for auto local timekeeping GPS watches..

    • @BytesNBits
      @BytesNBits  Рік тому

      The code in the tutorial should give you all the data you need for a bitmap image. As you decode the file you'll be able to extract the pixel data you need.

  • @khaileng3020
    @khaileng3020 2 роки тому

    Can I read the jpg image into bytes from arduino sd card and send it to python on laptop through bluetooth HC-06 , because i want to do the image processing but i dont know how to read the jpg image in sd card in bytes or hexadecimal format

    • @BytesNBits
      @BytesNBits  2 роки тому

      Hi. Yes. Once you read the file in raw byte format it's just a series of 8 bit values. You can send this over any communications channel. You'll obviously need some code at the Python end to decode the data and turn it back into a jpg image inside the software.

    • @khaileng3020
      @khaileng3020 2 роки тому

      @@BytesNBits but what is the coding to read the jpg image in bytes or hex, and send it through serial ? Do you have the video of tutorial? I am really new to this field

    • @BytesNBits
      @BytesNBits  2 роки тому

      @@khaileng3020 You can use the code in the video to read the file in hex. That's what it's doing for the bitmap image. You can then output that over the serial monitor or another channel. At the PC end you'll need to be able to identify the data and then compile it into the jpg file for saving.

  • @robertrobert5583
    @robertrobert5583 Рік тому

    Thanks for this very helpful guide. It works but for some reason the image is mirrored. 🥴

    • @BytesNBits
      @BytesNBits  Рік тому

      Hi. Sometimes the pixel data is stored in a different order. Check the image height and width values in the DIB header. If they are negative the pixels are being stored in the opposite order on that axes. e.g. a negative height means the rows are top to bottom rather than bottom to top.

    • @robertrobert5583
      @robertrobert5583 Рік тому

      @@BytesNBits thanks for this. In the end it was easier to just flip the image!

  • @umutkayacan7659
    @umutkayacan7659 3 роки тому

    Nice!

    • @BytesNBits
      @BytesNBits  3 роки тому +1

      Thanks again for your support!

    • @umutkayacan7659
      @umutkayacan7659 3 роки тому

      @@BytesNBits no problem. This channel deservers more subs imo

  • @DepechLyot
    @DepechLyot 2 роки тому

    Егор Смирнов
    3 минуты назад (изменено)
    Thank you for your job Bob! Let me ask you, i i've got an ili9225 display ant it has different methods. screen.endWrite(); screen.startWrite(); i found and they the same but was protected. but there is no method screen.writeColor(screen.color565(r, g, b), 1); and screen.setAddrWindow(). Instead it has screen.drawPixel(); that hendel some functions of setAddresWindow but i cant figure it out how change and split different librares and methods. Cold you please take a lock and me it possible to solve that problem?

    • @DepechLyot
      @DepechLyot 2 роки тому

      Just cant place the link bu can be easy found o Git so there is an similar issue there

    • @BytesNBits
      @BytesNBits  2 роки тому +1

      Hi. I'm in the process of making a video on how to write your own drivers for devices and will be using the LCD screen as an example. I'll cover how to work out the screen commands and implement them in code. That will probably give you a better answer. That one should be out the the next 2-3 weeks.

    • @DepechLyot
      @DepechLyot 2 роки тому

      @@BytesNBits thanks a lot this will help!