How to Rotate Sprites (TFT_ESPI library) PROGRAMING TUTORIAL

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ม.ค. 2023
  • Hello, here is another programing tutorial.
    In this video I will show you how to rotate sprites. I am using the t-display s3 development board but this concept will work with any display supported by tft:espi library. I hope this is not too hard to follow and I hope you will learn something. Enjoy!
    You can check T-display S3 here: www.lilygo.cc/0cAg0r
    here is tutorial about sprites: • How to use and why to ...
    Here is compas code: github.com/VolosR/RotateCompas
    Here is code from tutorial: github.com/VolosR/RotateSprit...
    If you want to support my work you can buy me coffee/beer here:
    ko-fi.com/volosprojects
    Thank You! Dont forget to subscribe!
    #esp32 , #tft_espi, #developmentboard, #arduino, #sprites,
  • วิทยาศาสตร์และเทคโนโลยี

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

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

    I am just starting with esp32 programming on the S3 display, and your videos are super helpful. Hopefully you have more projects coming up, really looking forward.

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

    Thank you! Love your step-by-step build up of the full code! Really helps understanding how to go about it!

  • @BlondieSL
    @BlondieSL 10 หลายเดือนก่อน +1

    When I first heard of sprites on these ESP32s, I assumed that it would be so difficult.
    Then, I watch this video and learn that they are simple to create and manipulate.
    Thanks for all the work that you do to help the world learn. So amazing!!!

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

    Nice and clear. Thanks for the great video and walk through of creating. I need to look more at the functions available in the sprite library.

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

    Great video. Very precise and very clear. Hope you keep on doing such tutorials regularly.

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

    Another super useful project!
    I used this on my previous YT project.
    Thanks for this content!

  • @chipko
    @chipko ปีที่แล้ว +8

    I just bought a few more boards because you inspire me to make things!
    Another great video!

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

    Great video.. really appreciate how you build code in steps which reveals the problems and how to fix it. Thanks!!

  • @phaZed9
    @phaZed9 ปีที่แล้ว +4

    Just wanted to drop in and say, you are a great teacher and these tutorials are fantastic! I have a fairly decent history with 16 and 32 bit micros - and have created many projects. I've even used screens - but mostly pushing lines of text. Now I understand and know of the existence of these methods in the tft library.. thank you for that! Absolutely brilliant mate! This whole series has been outstanding. Subscribed.

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

      Thank you Aaron. Your comment is great motivation. Thank you.

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

    This is brilliant....thank you!! I've been struggling on a similar project with transparencies in sprites and your video showed me how to fix it. Thank you!!

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

    Thank you again so much for your excellent lesson - I follow every move and are able to replicate your result - this is so satisfying! Can't wait for the next lesson!

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

    Thanks for this can not wait to try this out

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

    I want to thank you for making these videos and explaining them so well ! Liked, Subscribed and bought you a coffee! Keep up the good work!

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

      Thank you, comments like this makes me happy. Thank you for coffee also.

  • @paul.newland
    @paul.newland 2 หลายเดือนก่อน

    Your sprite tutorials are absolutely brilliant!

    • @VolosProjects
      @VolosProjects  2 หลายเดือนก่อน +1

      Thank you, and thank you for coffee

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

    Excellent, not too hard to follow but very educational for me - thanks!

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

    Great tutorial! Reading the API is one thing but sample code makes it clearer, thanks

  • @egealkoyak1530
    @egealkoyak1530 ปีที่แล้ว +15

    Here is the video I was looking for! Your videos really help me a lot for my projects. Is it possible that we can adjust the transparency of an image or pixel projected on the st7789? If possible, we would like to see how this is done in your video. Please keep posting videos!

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

    Great video, easy to follow and learn in the way

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

    Thanks for your guidance.
    Love the content.

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

    Great tutorial and such talent, I hope many will leave you good feedback and comments for such a great video and sharing your work. Love this!

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

    WOW, I tried this for my analog watch many times, only got stupid solutions, working, but bad coding. This video gave me all what I need to programm a analog watch I need. Thanks a lot!

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

      Tnx, I am glad you finded your solution.

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

    I learned a lot! Thank you!

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

    Excellent!! Thank you for doing these. very informative and I'm just starting to dabble with it. One question. How would you make a gradient gauge? Say for temperature going from Cold (blue) to normal (green) to hot (yellow and red) in a circle? Would you need to calculate the colors on the fly or maybe just doing a JPEG and using it as the background?

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

    amazing job! thank you

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

    Very useful. Thank you.

  • @Jackie-sg8es
    @Jackie-sg8es ปีที่แล้ว

    Good content as always. I am going to try and make an artificial horizon (EADI) with a MPU 6050 and rotating sprites as you’ve demonstrated. Many Thanks.

  • @rene-jeanmercier6517
    @rene-jeanmercier6517 ปีที่แล้ว +1

    This is great ! Thank you for sharing your knowledge. Regards, RJM

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

      Thank you Rene, i am happye you found something useful for yourself.

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

    Thanks for sharing

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

    Fantastic again my friend.

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

    svaka čast legendo

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

    thanks for this tutorial, i was wondering could you move lines 19 to 24 of the last shots to the setup() section?

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

    wonderful project. grüße aus Deutschland

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

    brilliant video. very interesting :)

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

    thanks for this video

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

    Super helpful

  • @dans-designs
    @dans-designs ปีที่แล้ว

    love your tutorials! thank you so much!!
    do you know if it is possible to rotate a .bmp stored in SPIFFS - or is there a way to use a .bmp as a sprite??

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

    very excellent I wish you could explain the rest of the steps

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

    Thank you so much for your videos. I'm excited to learn more about this T-S3 device!
    It's been so hard to find updated reliable information on it. I'd love to see how you can add an 8 or 16 bit IO Expander - if you're taking requests ;) I still haven't found out where the SCL/SDA pins are or even if there are any default interrupt pins I can use to pass back from the expander! Anyway - I'm off to buy you a coffee! Love your videos!

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

      Thank you Blaine, on esp32 any pins can be scl or sda, all pins can be used as interupts. Tnx for coffee 😀

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

      @@VolosProjects Oh ! Wow. Fantastic. No wonder I couldn't find anything... LOL Thanks again!

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

    Is it possible to use both translate and rotate for sprites? I tried to use translate and rotate on a single sprite. However, i could not make. Thank you for your videos.

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

    great job
    example on t-rgb round display would be perfectly helpfull.......

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

    Thank you.

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

    Excelente! 😃👍

  • @user-mw8yv7pq7v
    @user-mw8yv7pq7v 27 วันที่ผ่านมา +1

    Hello sir. Great job. I enjoy your projects. Have you considered creating an artificial horizon project using spites? I'd like to create a working display on a 2 or 3 inch screen for my grandson who recently became a commercial pilot. I've struggled with the coding to create the display and pivot the background with roll and pitch.
    Thanks for your great tutorials.

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

    I noticed you pushed the sprite to a position, then removed the positioning command. How do you redefine the position of the sprite?

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

    Awesome. Subscribing 🙂

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

    I really appreciate this video - nicely done, very informative. Your approach is intuitive. However, now I am struggling to change the coordinates of the commands to adapt to a bigger TFT - and really got lost. A few extra words about the parameters along the line when you entered them would have made this vid a real burner.

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

    good tutorial, simple understanding, I've got a question Can we put needle sprite fill and draw, also background circle in SETUP loop, and leave only angle increment and needle.pushRotate() in the main loop?
    (I haven't tried the code yet.)

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

    great tutorial, thank you! a question: how do I push rotated sprite to a specified location? something like pushRotated(x, y, angle, &background)

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

    Hi thank you for your videos, do you have any ring gauge example? it's hard to find a good video or tutorial to build a ring gauge to measure speed or temperature.

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

    The tft library has some dark colour defined as TFT_TRANSPARENT. You could use that if you need black in your sprite.

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

    This tutorial was very easy to follow, but you failed to explain why it would blink if you erased the sprite with tft.fillscreen(TFT_BLACK) rather than drawing another sprite as the background. Also, maybe you should have showed it blink.
    I assume there’s some sort of double buffering that’s going on, and all drawing happens on the hidden screen buffer. Then some command triggers a swap buffers after everything has been drawn. It would be nice if you explained this and told us which command is swapping the buffers. And if there is no double buffer, how is it avoiding blinking?

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

    Nice tutorial. Could you put all the sprite drawing in setup and leave only push in the loop?

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

    Hello, do you have any plans on using the LVGL library? It offers great UI and even has an editor called SquareLine studio, it created the UI code automatically

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

    I am trying to find the right pins used for i2c, but the ones I tried so far cause the serial port to give an error dump...
    Is there a special setting in the IDE drop-down menu to turn on i2c functionality?

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

    Please project ESP S3 Internet radio with new display.
    Thanks for your all interesting things.

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

    This is perfect, Im making a speed gauges with a moving needle on a round display and a GPS module for my and my friends mopeds.
    This will combined many of your tutorials that you have released lately.
    Does anybody know of a good esp32 and SPI screen emulator so I can test my code while Im waiting for the parts to arrive?
    Future plans for the display is also to show measured speed from hall-sensor and RPM from a capacitive sensor (wire) turned around the spark plug wire.

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

      Thank you, i wish that there is simulator but for now i think there is no such a software. Tnx again.

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

    Kind of disappointed you didn't show the compass part.
    Also, is there a way to define 3 pivot points? I want to draw a 3-axis aircraft trim indicator.

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

    I find your videos very helpful. It would be very nice to see a video of you working with TFT displays on esp-idf platform. Do you code on esp-idf or only on Arduino?

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

    Hi I have been using an SCD4X CO2/temp/humidity sensor from sensirion with a T-display-S3 displaying data in the form of three ring meters (TFT eSPI) everything works fine with my computer (USB connected) but when I use the t-display plugged to an usb adapteur the screen remains black. After investigation it looks like there is a ledc initialisation error. As the CO2 sensor is working only on I2C pins 43 and 44 I believe that we may have a conflict between I2C and the display. I am not very good in programming. The fact that it works with my computer and not pluged in a wall socket seems to be very strange. Any idea would be appreciated. Regards.

  • @Attic-Toy-Design
    @Attic-Toy-Design ปีที่แล้ว +1

    Hi! Is it possible to make a clock using .jpg image frames in a Lilygo T-Display S3? I have some nice .jpg numbers image frames and I'd like to use them to build a clock. Is one of your tutorials able to explain the process? If not, could you make a sample one to be downloaded from Github? I pay you a nice coffee! Thanks!

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

    Any project on vedio transmission and reception via Lora modules

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

    Before a sprite is pushed to the sreen, I would like to rotate it about 30 degrees before I draw the features onto it. How?

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

    Hi Volos. I have bought a TDisplay and I use Arduino V2. I can't manage to get any picture on the TFT screen (blank screen). I saw that there is an issue with some versions of TFT_eSPI by Bodmer. I found a old topic on the arduino forums with the same issue and it seems that one needed the version 2.4.71 to make the board word correctly. The current versions is 2.5.0. My issue is that the older versions available are 2.4.61 ; 2.4.72 and 2.4.79
    Are you aware ot that issue and how do one resolve it?

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

      I dont know what is version of library, you need to use modified version of library lilygo provided th-cam.com/video/gpyeMjM9cOU/w-d-xo.html

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

      @@VolosProjects Thanks. I found out my issue. It was not sofware related. It's a hardware failure. The screen goes black if I hold it by a specific area. I need to presson the screen to make the picture come back but it's very random. 😒 I have no luck with chinese products.

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

    New with the M5Dial..
    How would i modify this code to get it woking on M5Dial? I'm still confused - but on a higher level🙄Probably something obvious i guess.

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

    So, just curious... do these ESP32 boards (WROOM especially) have some sort of magnetic device on it that could be used to make a real compass?

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

      No, they dont, they need aditional sensor for that

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

    sir good day, sir can you make a stopwatch with wireless stop/start button with this lilygo t-display s3

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

    Hey Volos, I just found your chanel and need some guidance with a project game I'm working on

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

      Hello, how can i help you?

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

      @@VolosProjects we are building a ttgo portable console and making a specific game that is will load. We believe you can be the lead programmer. I've sent you a coffee with my contact info on Kofi

  • @JonMcPhalen
    @JonMcPhalen 15 วันที่ผ่านมา

    I tried following along using my M5StickC Plus-2 and the simple code bricked my device. It took a while to figure out how to unbrick it, but I bricked it again double-checking the code. I've got a T-Display-S3 on order. That said, I have a project that I want to use the M5StickC for (special IR control), so I'm hoping I can sort out what's happening.

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

      Hm, thease are two diferent boards, this tutorial will not work for m5stick.

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

      What versiom of m5stuck cpkus you have, old or new? M5stick have diferent sprite aproach

    • @JonMcPhalen
      @JonMcPhalen 15 วันที่ผ่านมา

      @@VolosProjects The version giving me fits is the Plus2. I have the regular Plus (1.1) as well.

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

    can you show how to use drawString? I have a problem where i can manipulate a number with a encoder and increase it but when i decrease it then the last number is still visible on the screen, when it changes from for example 10 to 9. I would like to do something like drawString(number, 0, 0, 2) + (" ") but that obviously doesnt work.

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

      tft.drawString(String(number)+" ",0,0,2);

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

      @@VolosProjects thank you, i will try this 😊

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

      @@VolosProjects yep worked :)

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

    Write the code according to the video, but the screen does not display. Not sure what the problem is?😅

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

    hi, I tried to rotate a second picture on a picture. That works, but I can't move the rotation point from the middle with "setPivot". it always revolves around the center of the display. only the point of the image around which it rotates changes.

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

      You used sprite.setPivot or tft.setPivot

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

      @@VolosProjects tft.setPivot(45, 110); in Setup and in loop zeigerSprite.setPivot(22,110);. I have both in the program, pointerSprite.setPivot(22,110); changes the rotation point in the image but not the rotation point on the display. at tft.setPivot(45, 110); unfortunately nothing changes when the values are changed

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

      @@svencz1089 first, thank you for coffe, please, send me your whole code on arduino.b2016 gmail.com , tomoraow iw will check it and try to fix it

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

      @@VolosProjects ok thx.

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

    I ordered one from them but it came dead. Solid green LED and a solid red LED. Sometimes won't even power on.

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

      I wonder if it was preloaded with some bad code or something?
      When I bought my first 2 boards, one had a similar action.
      It would appear to power up, but just didn't act/react like the other board.
      It was like I couldn't upload even a LED blink test, because it would time out.
      It acted like I wasn't pushing the program button in at the right time.
      What I ended up doing to forcing the upload over and over and quickly pressing the button.
      I almost gave up, then finally, it clicked in and the code uploaded.
      After that, it worked fine, until one of my tests was caught in a very fast loop (my code error).
      When in that fast loop, it again acted up. So I again did the above force upload with pressing the prog button fast and eventually, it worked again.
      Since then, I just be careful to not create a fast loop (example, a while loop where it can never get out of it).
      No issues since.
      I don't know if that's the issue, but perhaps try that with a small, test LED blink test where you have some
      delay(1000);
      in loop. If you get lucky, that may get it working again.
      If nothing works, then it's probably a bad board and you'll need to contact the seller to get it replaced. That would also be a good test to see if the seller is honest or not.
      Personally, I NEVER EVER order anything directly from any seller in China. I've read of too many problems and rip offs.
      I only order stuff via Amazon and then, ONLY stuff that is "fulfilled" by Amazon. If any issues, Amazon has been excellent in pushing through a refund and either provide an RMA to send the thing back, or if it's not expensive, they tell me to just dispose of it.
      Good luck on that board.

    • @oldNavyJZ
      @oldNavyJZ 10 หลายเดือนก่อน +1

      @@BlondieSL I actually tried this before reading your post and it finally worked with pretty much the same effort. I can now get compiled code on it.
      I think it just didn't have anything loaded - like they missed that step at the factory, or it was corrupt. In any case, it is working now.
      They need better tech writers.

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

    Cool video, as always, look at your email, I sent you a cool future project with the T-display

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

      sorry, i will check it right now

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

    You really need to edit for time. This is really boring watching code upload over and over.