How to Scroll Image (ESP32 and TFT display)

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 พ.ค. 2024
  • Screens that we are using to show data or sensors reading are to small to show large picture. Here is idea for you. You can scroll image and make this nice animation. In this video I will show you how to do that.
    You can buy T-DISPLAY S3 here: www.lilygo.cc/0cAg0r
    This video is sponsored by PCBWay company www.pcbway.com/ . PCBWay have always same prices, I respect that. Quality is great and there is many shipping options. And they are fast
    Conversion tool for images (jpg to RGB565 array):
    www.rinkydinkelectronics.com/t...
    Here is code: github.com/VolosR/ImageScroll
    I need one subscriber more. Thank you!
    If you want support this channel and my work you can buy me coffee here: ko-fi.com/volosprojects
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 66

  • @seb11110b
    @seb11110b ปีที่แล้ว +13

    I like your sense of humor.

  • @vick3394
    @vick3394 ปีที่แล้ว +1

    Thank you. I must say it is a nice project

  • @darrenp9454
    @darrenp9454 ปีที่แล้ว +2

    Thank you for this. I just received my TTGO today and have plans for using it in a cyberpunk diorama so your video was very helpful.

    • @VolosProjects
      @VolosProjects  ปีที่แล้ว

      tnx.where did you buy yours?

    • @CodeMavenXPT
      @CodeMavenXPT ปีที่แล้ว

      @@VolosProjects Sir I'm student. Sir can you give me a Arduino mini computer project components list ? Please 🙏

    • @VolosProjects
      @VolosProjects  ปีที่แล้ว +1

      you can see in videos all the components, 3 push buttons (2pin) , pasive buzzer, potentiometer, arduino nano, i2c oled display and pcb ofc

    • @CodeMavenXPT
      @CodeMavenXPT ปีที่แล้ว

      thanks sir. I am your biggest fan.I can use 1.2k resistor

    • @VolosProjects
      @VolosProjects  ปีที่แล้ว

      @@CodeMavenXPT yes, you can

  • @JustIn-sr1xe
    @JustIn-sr1xe ปีที่แล้ว +1

    I like to make a simple "smart watch" with one of these smaller screens- minus all the internet and mobile connectivity. All I want from it is: Time & Date (DD/MM/YY)- maybe the current temp and humidity. Maybe also current UV index. Would that be too complex to be compact?

  • @tgirard123
    @tgirard123 ปีที่แล้ว +3

    That's very cool. I'm wondering if you could use a similar project with a screen that has touch and be able to manually scroll the image. Hopefully I'll be alive next week to see your next video as well...

  • @mr-jack
    @mr-jack ปีที่แล้ว

    Nicely done and keep safe. :)

  • @davidcaballero952
    @davidcaballero952 8 หลายเดือนก่อน

    Is there anyway to show multiple images in one code?

  • @NelsonSantander
    @NelsonSantander 4 หลายเดือนก่อน

    Excelentes todos tus videos, considero que es de los mejores sitios de enseñanza sobre estos temas , altamente recomendado, gracias

  • @de-bodgery
    @de-bodgery ปีที่แล้ว +1

    Good choice! Jessica Alba...YUM!

  • @sumedhburbure4173
    @sumedhburbure4173 ปีที่แล้ว

    awesome video

  • @TBoy58_405
    @TBoy58_405 ปีที่แล้ว

    Many thanks for this video. I appreciate you being able to put out such informative stuff so often, I know you’re a busy guy. I’ll have fun looking at your code. Also, Jessica Alba, Wolverine, burgers and beer will always bait me 😉 If she asks, tell your wife Pete made you do it 😂 Take care 👏🏾👍🏾🤓

    • @VolosProjects
      @VolosProjects  ปีที่แล้ว +1

      I will try, she can't reach you :) :) Cheers Pete

  • @TBoy58_405
    @TBoy58_405 ปีที่แล้ว +5

    Just in case you’re thinking of upgrading to Arduino IDE 2.0.0, I just found out that it freezes when you use large text files like your image files. So it’s best to use the latest nightly build, which has the fix, until the IDE 2.0.1 comes out. Hope this helps you or someone 👍🏾🤓

    • @VolosProjects
      @VolosProjects  ปีที่แล้ว +2

      tnx, i will wait then😀 i already heard that 2.0.0 have problems

    • @arlo4051
      @arlo4051 ปีที่แล้ว

      I had to switch from 1.8 to 2.0 because of Java issues. 2.0 has it's own new set of quirks like changing the board your using every time you unplug it and changing setting when you do a library update like the TFT_eSPI

  • @zizi66999
    @zizi66999 ปีที่แล้ว

    I already have an Arduino mini computer! Thank you for your Video!Let me ask you a question,esp32 How do read the video from the SD card and play it on the TFT screen?

  • @jumbo999614
    @jumbo999614 ปีที่แล้ว

    Is there TFT LCD standalone with I2C connection in the market? SPI is difficult to wire for me.

  • @SolehAlYunus
    @SolehAlYunus ปีที่แล้ว +2

    Request tutorial play video on Esp32 + LCD ST7789 please, thanks

  • @NielsNL68
    @NielsNL68 ปีที่แล้ว +3

    You forgot to show the most important part (IMHP) the code the code that does the work. :( and that is why i was watching this one.

    • @VolosProjects
      @VolosProjects  ปีที่แล้ว

      i dont undesrstand you, code is in description!

    • @beavisul
      @beavisul ปีที่แล้ว +1

      @@VolosProjects
      Yeah, but your video was about scrolling the image and that's the part of the code you didn't present. What seems obvious to you might be a mystery for a beginner.
      Also you could cover how to avoid flicker and other details that are useful.
      Most of your videos seem rushed. My advice is to prepare a little bit better before you film and to not rush so much. You have the knowledge, you just have to find a way to present it better.
      Thanks for your work, I appreciate it!

    • @VolosProjects
      @VolosProjects  ปีที่แล้ว +6

      I see, I agree with you, my videos are rushed ,it is still hard for me to explain code and I dont have much time for better preparation. I am trying to make one video per week. I have my full time job, 2 month old kid and house i need to finish. I hope quality of my videos will improve in future.

  • @kevinhefeng
    @kevinhefeng ปีที่แล้ว

    You have very good technique! How to preview the .C picture file code with Windows?

  • @jasongreenwood3260
    @jasongreenwood3260 ปีที่แล้ว +1

    Jessica Alba from Into the Blue. Definitely click bait! You got me!
    (Good video though)

  • @IlIDINOIlI
    @IlIDINOIlI ปีที่แล้ว

    koji je naj veci i naj bolji display, koji radi sa esp32?
    za animacije...

  • @forrestallison1879
    @forrestallison1879 ปีที่แล้ว

    Arduino IDE? I'm amazed folks still use it

  • @djste83
    @djste83 ปีที่แล้ว

    I'm tring your code on a esp32 and a ili9341 dysplay, and runs fine with width 240px and height 135px, but if I change the parameters to 320px and 240px and the unsigned short imageS[32400]={0} to unsigned short imageS[76800]={0} in order to fit the screen, I get this error during compilation: DRAM segment data does not fit
    How can I fix it?

    • @VolosProjects
      @VolosProjects  ปีที่แล้ว

      yes it is true, l tried and i get same error, it seems that array is too big, try smaller image, my largest is 234x234

    • @djste83
      @djste83 ปีที่แล้ว

      @@VolosProjects My intent was to perform only the vertical scroll of an image.
      I managed to get it to work by dividing the ili9341 screen vertically into two parts.
      I have replicated your code for the left and right sides using the same imageS variable and now it works perfectly.
      All this hassle is to avoid memory allocation problems during the compilation.
      But now I should read the image from a micro sd card, instead of an .h file. I am trying to read the image from sd and dynamically convert it to a uint16_t variable but i am not having success. Do you have any idea?

  • @vitrola_exe
    @vitrola_exe 2 วันที่ผ่านมา

    Is there a way to use a much larger image from an SD card and do something similar?

    • @VolosProjects
      @VolosProjects  2 วันที่ผ่านมา

      Yes ofcourse, code will be diferent but it is possible.

  • @BenMitro
    @BenMitro ปีที่แล้ว

    Me too - hope we are all alive. Curious why you say that?
    That info is great - my S3's are on their way.

    • @Sennator30
      @Sennator30 ปีที่แล้ว

      Not sure where he lives, but his accent might suggest somewhere likely to be affected by the Ukraine-Russia conflict.

    • @VolosProjects
      @VolosProjects  ปีที่แล้ว +1

      I live in Croatia, and i am not affected by war. (exept high prices of fuel and energy ) ... you are right accent is similar. At begining of video i stated that my wife will kill me becouse that scroling picture (good looking girl). So it was just joke :)

    • @BenMitro
      @BenMitro ปีที่แล้ว

      @@VolosProjects Good. Wives tend to kill with their look and the silent treatment, but that is just how it is. Never stopped me - after all I am a bloke and the body works like the body works - why hide it?

    • @fdnyjohnc
      @fdnyjohnc ปีที่แล้ว

      How can you change the speed

  • @9rune5
    @9rune5 ปีที่แล้ว +3

    Instead of writing 32400, just put in screenW*screenH. Then you can remove the comment, because you've replaced the magic constant with self-documenting code. (there is no optimization to be gained by calculating constants by hand)

    • @IowaMan
      @IowaMan ปีที่แล้ว

      i tried unsigned short imageS[screenW * screen H]={0}; is that the syntax you meant?

  • @abobija
    @abobija ปีที่แล้ว

    Nice video, anyway you should fix the name of your "D" disk drive on your PC, there is some typo in the name :P

    • @VolosProjects
      @VolosProjects  ปีที่แล้ว

      hahah, morat cu :)

    • @abobija
      @abobija ปีที่แล้ว

      @@VolosProjects :D

  • @djste83
    @djste83 ปีที่แล้ว

    Is it possible to have the same code working with uint8_t arrays instead of uint16_t arrays? Pleaseeeee

    • @VolosProjects
      @VolosProjects  ปีที่แล้ว

      no, it will not work

    • @djste83
      @djste83 ปีที่แล้ว

      @@VolosProjects why?

    • @VolosProjects
      @VolosProjects  ปีที่แล้ว

      @@djste83 watch whole video, each pixel need 16bits to store amount of red green and blue

    • @djste83
      @djste83 ปีที่แล้ว

      @@VolosProjects you are right, that's why it wasn't working with uint8_t arrays in my tests. Is it possible to read image from sd card instead of .h file? I'm not able to convert the Image on the fly in a uint16_t array.

  • @CodeMavenXPT
    @CodeMavenXPT ปีที่แล้ว

    Sir I'm student. Sir can you give me a Arduino mini computer project list of components ?

  • @ibendiben
    @ibendiben ปีที่แล้ว

    0:01 🤣

  • @zRedPlays
    @zRedPlays ปีที่แล้ว

    You didn't show the full code

  • @CodeMavenXPT
    @CodeMavenXPT ปีที่แล้ว

    Sir I'm student. Sir can you give me a Arduino mini computer project components list ? Please 🙏

  • @divencia
    @divencia ปีที่แล้ว

    What I saw that it was in Arduino I got away

  • @EasyOne
    @EasyOne ปีที่แล้ว

    Today is a good day to die 😂😂😂

  • @f7p1764
    @f7p1764 ปีที่แล้ว

    nice click bait 👍

  • @salam__7975
    @salam__7975 หลายเดือนก่อน

    hi volos, amazing work with the project, im curious as how to make a background and foreground sprite. where the background is dynamic and the foreground is static like an aircraft attitude direction indicator? this is the code that I have now, it works perfectly but the 'ArrowSprite' which is the fixed aircraft symbol flickers when pushed onto the screen therefore I was thinking of making a composite sprite but I don't know how to get started. please advise.
    #include
    #include "Back.h"
    #include
    #include
    #include "Arrow.h"
    Adafruit_MPU6050 mpu;
    #define I2C_SDA 20
    #define I2C_SCL 21
    #include "frame.h"
    TFT_eSPI tft = TFT_eSPI(); // Initialize library for the TFT screen
    TFT_eSprite AH_Sprite = TFT_eSprite(&tft); // Create a sprite object
    TFT_eSprite ArrowSprite = TFT_eSprite(&tft); // Create a sprite object
    TFT_eSprite TranSprite = TFT_eSprite(&tft); // Create a sprite object
    void setup() {
    Wire.begin(I2C_SDA, I2C_SCL); // Initialize I2C communication
    tft.begin(); // Initialize TFT display
    tft.setRotation(0); // Set TFT rotation
    AH_Sprite.setSwapBytes(true); // Set byte swapping
    AH_Sprite.createSprite(240, 640); // Create a sprite
    tft.setPivot(120,160);
    ArrowSprite.createSprite(96,23);
    ArrowSprite.setSwapBytes(true);
    TranSprite.createSprite(240,640);
    if (!mpu.begin()) {
    tft.println("Failed to initialize MPU6050! Check wiring and connections.");
    while (1); // Infinite loop to stop further execution if MPU6050 not found
    }
    }
    void loop() {
    sensors_event_t a, g, temp;
    mpu.getEvent(&a, &g, &temp); // Read sensor data
    int angle = map(a.acceleration.y, -10, 10, 90, -90); // Map y-axis tilt to angle range
    int y = map(a.acceleration.x, -10, 10, 0, tft.height() - 640); // Map x-axis tilt to vertical range
    int OF=0;
    y += 160+OF;
    AH_Sprite.fillSprite(TFT_BLACK); // Clear the sprite
    AH_Sprite.pushImage(0, 0, 240, 640, Back); // Place background image on sprite

    // Update sprite's pivot point for rotation and vertical movement
    AH_Sprite.setPivot(120, 320 + y); // Adjust pivot point for both rotation and vertical movement
    // Rotate and draw the sprite based on accelerometer data
    // Since we're not using a physical device to display it immediately, you'd need to handle the sprite display to the TFT after rotation if needed
    ArrowSprite.pushImage(0,0,96,23,Arrow);
    ArrowSprite.pushToSprite(&AH_Sprite,72,145,TFT_BLACK);
    AH_Sprite.pushRotated(angle); // Rotate sprite, making the background transparent
    }