Posted on



In this video tutorial we are going to learn how load bitmap graphics in our Arduino Touch Screen projects using Adafruit’s GFX library. We are going to use some of the most popular Arduino displays. Let’s get started!

The procedure that I am going to describe works with all the color displays that are supported by Adafruit’s GFX library and by the displays that use the TFTLCD library from Adafruit with a small modification. So from the displays I own I can use the color OLED display, the 1.8″ ST7735 color TFT display, the 2.8″ Color Touch Screen that I reviewed a few weeks ago and the 3.5″ Color TFT display. You can find links for all the displays below.

——————–
WHERE TO BUY
——————–

Color OLED:

1.44″ TFT:

1.8″ TFT ST7735:

2.8″ Touch Screen:

3.5″ Color TFT:

Arduino Uno:

PowerBank:

Full disclosure: All of the links above are affiliate links. I get a small percentage of each sale they generate. Thank you for your support!

——————–
LIBRARIES
——————–

📥 Adafruit GFX Library:

📥Image2Code Java Utility:

The GFX library from Adafruit offers a function which is called drawBitmap which displays a monochrome bitmap image on the display. We can’t load multicolor graphics with this function just single color graphics. But we can change the color of the bitmap image so with a little imagination we can create colorful graphics. If the display we use does not support the Adafruit GFX library but it is using the TFTLCD library we have to copy the code of the drawBitmap function in our sketch before we can use it.

The drawBitmap function takes 6 arguments. The first two are the x and y coordinates of the screen where we want the image to be displayed. The next argument is the array in which the bitmap is loaded in our code. The next two arguments are the width and height of the bitmap in pixels, in other words the resolution of the image. The last argument is the color of the bitmap, we can use any color we like. The bitmap data must be located in program memory since Arduino has a limited amount of RAM memory available.

——————–
CODE OF THE PROJECT
——————–

——————–
Quiz of Knowledge Android Game
——————–

You can download my latest Android Game which is called Quiz of Knowledge here:

📥

——————–
MORE PROJECTS
——————–
Arduino Datalogger:
Arduino Weather Station Project:
Arduino Nokia 5110 LCD Display:
Arduino OLED display tutorial:
DIY Arduino:

——————–
ABOUT EDUC8S.TV
——————–
Educ8s.tv is a Youtube channel and website which is dedicated in developing high quality videos about DIY hardware and software projects. In this channel we develop projects with Arduino, Raspberry Pi, we build robots and simple electronic circuits. Check out our website as well for more information:

——————–
SUBSCRIBE ON YOUTUBE
——————–

Never miss a video: ——————–
Physics Experiments Puzzle Game
——————–

You can download my latest Android Game which is called Incredible Physics Experiments here:

📥

——————–
MORE PROJECTS
——————–
Arduino Datalogger:
Arduino Weather Station Project:
Arduino Nokia 5110 LCD Display:
Arduino OLED display tutorial:
DIY Arduino:

——————–
ABOUT EDUC8S.TV
——————–
Educ8s.tv is a Youtube channel and website which is dedicated in developing high quality videos about DIY hardware and software projects. In this channel we develop projects with Arduino, Raspberry Pi, we build robots and simple electronic circuits. Check out our website as well for more information:

——————–
SUBSCRIBE ON YOUTUBE
——————–

Never miss a video:

Nguồn: https://ilhapura.net/

Xem thêm bài viết khác: https://ilhapura.net/game/

41 Replies to “Arduino Tutorial: Bitmap graphics on an Arduino Touch Screen and other top Arduino Displays”

  1. Thank you, there is also this website that i found online that does the same and also you can add multiple images and get everything in just one file: https://javl.github.io/image2cpp/

  2. Very interessting video. Keep it up. How can i make that code running on a 1.8 Display with st7735 driver?

  3. So why no way to display 24bit color bitmaps? the 96×64 1331 oled is supposed to support 24bits per pixel isn't it?

  4. Awesome!! this is now a solution to what i would like to work on. Some more tutorials of this kind please……..thank you

  5. Hey i really love the channel! Can you create a tutorial on how to use the micro sd card with this TFT display to generate multicolour images?? i really need help.
    If anyone could provide some code or a link to a tutorial that would be immensely appreciated!

  6. Hi EDUC8S.TV !!, I wanted to consult you how to detect a bitmapped image used as button menu if we have in mind that you draw it with drawbitmap function.??

  7. Hi Nick. Great tutorials.

    My TFT does not work with
    Adafruit_TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET);

    instead needs #include <MCUFRIEND_kbv.h>
    MCUFRIEND_kbv tft;
    which means nothing then works.

    Is there a way to fix this?

    Many thanks in advance

  8. Cool vid just subbed your vid on rotary encoders helped me out on a project you seam to know a lot about arduino displays I am a little suck on an idea I had is there a way to run video clips on an arduino

  9. Many thanks for the video! However I do have some issue with the bitmap/Progmem function. Unfortunately the screen displays random pixels when using this function. The strange thing is that no matter what bmp data I put into the .c file the result on the screen does not change- I could change the whole block of bitmap data or completely delete it from the .c file but still nothing will change.

    I wonder- Do i need to do something as silly as remove and re-add the .c file into my sketch to make it refresh what is in the progmem? I'd appreciate any help- this is driving me nuts. All other functions from the GFX library work really well and the x/y plus color part of the bitmap function work fine (they position the random pixels around the screen in the correct color) I'm using a 128×128 color oled with a NANO, im happy to post the very basic code here for your expert help!

  10. 9/10 awesome tutorial! Maybe you could have explained why you use the PROGMEM since this is quiet a complex topic which can be mind-bogling to newcommers to the Arduino Platform. Keep it up! 🙂

  11. How does the code actually understand the car array is the array in graphics.c
    You did not include graphics.c anywhere. Help?

  12. hey man i really like your videos they helped me alot. but now i have a problem. can you make a video how to make an easy menü fir an color oled. so only one button switches througt different screens.
    i tried it hours and hours but didnt get a good result. Maybe you and your skill can do this.

    thx man

  13. Hey there I tried you library with my 3.5 tft lcd shield and it doesn't work is there another version I don't know about for that

  14. Love the video! this should help me design boot up screens and menu icons for several projects! however i am having some trouble with the demo code, even trying your examples loaded directly from the folder. I get a white screen that flashes everytime it would change colors of your bitmaps.

  15. nice work as always
    I saw one LCD brand name is Nextion
    could you please make a tutorial on it to make a temperature and humidity controller with DHT22
    Thanks for valuable support

  16. I would like to use a display like this for gauges in a car. would this be reliable enough for that? could arduino hold all the program for that. I have some awesome ideas. if this will work. great video as usual.

  17. Thanks Nick, another really interesting tutorial – already have a few ideas to utilise these. Seasons greetings by the way! Jono

  18. Hey, I just wanted to say thanks for providing CC (captions). My deaf friend loves your channel because it's pretty much the only electronics hobby channel that provides this.

  19. I enjoy the video and thanks for the help, but I always thought this displays were too slow for real graphics (is so slow you can see the frame loading from up to down). I have a future project I am planning to do and require to show gauges on a color display. I search everywhere and find that arduino is just too slow. But arduino is all I know. So later I found a display called nextion and it seems much better than any other display used for arduino because it has its own graphic processor, so is very fast displaying graphics. Not sure if you ever tried nextion, but I think is a better option for this kind of projects.

    With that I don't mean stop making this videos, though. I am subscribed to your channel and I plan to keep it that way. Is just a suggestion for the future.

Leave a Reply

Your email address will not be published. Required fields are marked *