Search results

  1. vindar

    tgx: a 2D/3D graphics library for Teensy.

    That is a nice looking color gradient for rgb565 ! (and I like the sharks :))
  2. vindar

    tgx: a 2D/3D graphics library for Teensy.

    Thanks for the confirmation, good to know it is working better again. BTW, it seems you are overclocking the Pico2 from 150Mhz to 300Mhz ? Is it safe/stable to do so ? Even though TFT_eSPI doesn't officially support RP2350 yet, I just tested it with an ILI9341 screen and DMA uploads worked fine...
  3. vindar

    tgx: a 2D/3D graphics library for Teensy.

    @sublinear I just pushed a small change that should mostly cancel the slowdown the color interpolation bugfix may have created... Can you pull the newest version of the library from github and let me know if it is better ? Thanks.
  4. vindar

    tgx: a 2D/3D graphics library for Teensy.

    Hi, Such as performance impact seems strange indeed. I have a Pico2 lying around. Could you provide me with a complete sketch that exhibits the slowdown so I can experiment and see what I can do ? BTW: What display/library combos would you suggest on a Pico 2 ? It seems that TFT_eSPI (my...
  5. vindar

    tgx: a 2D/3D graphics library for Teensy.

    Hi, I am just bumping this thread to let you know that I updated the library (by merging the "improved-drawing-primitives" branch)... There are a bunch of new features: Rewrote most of the 2D drawing methods (implying some API breaking change unfortunately). Added drawing primitives to...
  6. vindar

    ILI9341_T4 and tgx color problems

    @Arctic_Eddie Hi, I was away from the forum for some time so my answer comes late and I guess you already moved on with your project but I just want to explain why you do not get the same colors with RGB565() and your Color8to5() function... This is because the constructor RGB565(r,g,b)...
  7. vindar

    Teensyduino 1.59 Beta #2

    Yep, I agree it would be nice to solve this problem asap... There is also a related bug were the audio library assumes it is using SPI0 (even when it is not) and thus disables audio updates while SPI0 is used.
  8. vindar

    Bug in Audio Library (AudioPlaySdWav) ?

    Hi, While investigating a bug report in my library, I think I found a small bug in the AudioPlaySdWav object of the Audio library. Setup Teensy 4.1 with the Audio Shield (rev D2 in my case) an SD card inserted in the builtin SD slot of the T4.1 (not the SD slot of the audio shield !)...
  9. vindar

    Yet another highly optimzed ILI9341 library: for T4/4.1 with diff updates and vsync !

    Hi, I am resurrecting this old thread to mention some improvements to the ILI9341_T4 library. It can now work with any pin configuration (no more special requirements for DC) and it can also work with display without a CS or a MISO pin (or both missing!). Of course, if MISO is missing, vsync...
  10. vindar

    ILI9341 Touchscreen doesn't work with Teensy 4.0

    Hi ! Here is a example using TGX + ILI9341_T4 of a button that switches color when pressed. #include <ILI9341_T4.h> #include <tgx.h> #include <font_tgx_OpenSans_Bold.h> // predefined TGX font using namespace tgx; // we don't want to add tgx:: everywhere... // DEFAULT WIRING USING SPI 0 ON...
  11. vindar

    Interest in 3D graphics lib?

    Looks very neat :) Just to let you know I also wrote a 2D/3D graphics lib (TGX). The 3D API provides similar features to your library except that it does not (yet) provide sub-mesh culling and is screen/hardware agnostic (it draws on memory framebuffer). The lib mostly target ESP32, T4 and...
  12. vindar

    LittleVGL on Teensy

    I'm happy I could help :) Beware that the framerate shown is a bit misleading. The max refresh rate for the ILI9341 screen is around 130Hz/140Hz so getting a higher FPS will not improve smoothness anyway. Also, the FPS lvgl displays is an average that counts all the frames whether or not...
  13. vindar

    LittleVGL on Teensy

    The 65FPS you obtain is related to the framerate set within lvgl: disp->refr_timer->period = 15; // line 158 of lvgl_music_demo.ino This line tells lvgl refreshes/redraw the UI every 15ms so that the maximum framerate will be around 1000 / 15 = 66 FPS. Thus increasing the SPI speed will not...
  14. vindar

    LittleVGL on Teensy

    Yes, that was a typo in the code comments (fixed now) which I probably copy-pasted from another example. This example works in portrait mode. With the last version of the library, using software DC instead of hardware DC is not so bad. In most case, it just increases the driver's CPU usage by...
  15. vindar

    How do i add the default adafruit font to the tgx graphics library?

    Hi, The TGX library has native support for ILI9341_t3 and Adafruit GFX font format (GFXFont). However, the default 'classic' 6x8 Adafruit font given in glcdfont.h is strangely not in Adafruit GFXFont format for some (probably historical) reasons so it need to be converted. Here it is converted...
  16. vindar

    240x320 TFT display working fine now solid white permanently

    Hi, This is a silly question but do you have a touchscreen on the ILI9341 and is it wired to the same SPI bus ? I say that because I got caught a few time forgetting the touchscreen was wired and not setting TOUCH_CS high which resulted resulted in random white screen at boot (depending on the...
  17. vindar

    LittleVGL on Teensy

    I understand that and my previous answer was only a suggestion and not meant to be rude :) As I understand it, you manage to run the LVGL music demo on Teensy 4 with an ILI9341 screen. Your next question now concerns LVGL and its integration into the Arduino environment (i.e. installing...
  18. vindar

    LittleVGL on Teensy

    It seems to me that the problem you encounter is specific to LVGL and not Teensy related. In particular, my ILI9341_T4 lib has nothing to do with lv_demo. I just wrote a short example to show how to interface the driver with a GUI library... I think you may have better luck asking for help on...
  19. vindar

    LittleVGL on Teensy

    If you are talking about the lvl music player demo, then you must also copy the /src subdirectory of the example and all it's content to the new location obviously...
  20. vindar

    tgx: a 2D/3D graphics library for Teensy.

    Hi, Yes, it is already possible using the copyFrom() method which blits a source image over a destination image whatever there sizes may be (scaling is done using bilinear filtering). So for example, the code below im2.getCrop(B2).copyfrom(im1.getCrop(B1)) blits the region of im1 delimited...
  21. vindar

    LittleVGL on Teensy

    fixed links: - LVGL: https://github.com/lvgl/lvgl/archive/refs/heads/master.zip - ILI9341_t4: https://github.com/vindar/ILI9341_T4/archive/refs/heads/main.zip (same links as in post #39).
  22. vindar

    LittleVGL on Teensy

    Hi, You are using an old version of the ILI9341_T4 library... There is no guiInc() method in the last version of lvgl_music_demo... Please install the latest version of both ILI9341_T4 (https://github.com/lvgl/lvgl/archive...ads/master.zip) and LVGL...
  23. vindar

    LittleVGL on Teensy

    I just updated the example in the library to work with LVGL's latest version (the main branch on github). I just tested it from a freshly installed Windows 10 (64 bits) machine and followed the steps: Installed Arduino 1.8.19 with default options. Installed Teensyduino 1.57 with default...
  24. vindar

    LittleVGL on Teensy

    Ok, I think I see the problem: the music player demo fonts are not loaded by default... Edit lv_conf.h located at the root of the arduino /library folder (the same file you already edited) and change the define at lines 330-332 to #define LV_FONT_MONTSERRAT_12 1 #define LV_FONT_MONTSERRAT_14...
  25. vindar

    LittleVGL on Teensy

    Hi, I am the author of the ILI9341_T4 library. Can you tell me more about the problem you encounter with the LVGL examples ? Did you follow the steps described on the examples to install LVGL and connect the screen or did you use a custom installation ? It is a compilation problem ? Normally...
  26. vindar

    tgx: a 2D/3D graphics library for Teensy.

    [I deleted my previous message by mistake as I was trying to edit it so I am posting it again...] Hi, I think the problem is that a box/region is defined with the constructor iBox2(minx, maxx, miny, maxy) and not iBox2(minx, maxx, lx, ly) as you can check in Box2.h around line 120. So I...
  27. vindar

    LittleVGL on Teensy

    Hi, I have some examples which shows how to combine LVGL with my ILI9341_T4 library. In particular, there are some instructions in this example or this one on how to install/use LVGL Hopefully, it should not be difficult to adapt the code to use the screen driver of your choice if you prefer.
  28. vindar

    ILI9341_t3/ILI9341_t3n implementing const reads and static SPI class

    Hi, I do not have much to contribute here but, as a last resort, you can always perform a dirty const_cast<> to cast away the constness or your calling method in order to call a non-const method from the driver... But I guess the C++ standard say doing so is undefined behavior (although in...
  29. vindar

    tgx: a 2D/3D graphics library for Teensy.

    The problems I see with simply replacing drawPixel() by drawSpot() are: 1. Each pixel will be written about r times (for a line of thickness r) so it will be quite inefficient. 2. Doing so will mess with alpha/blending and opacity. However, it is indeed a workable temporary solution is...
  30. vindar

    tgx: a 2D/3D graphics library for Teensy.

    Very nice ! Drawing thick curves is challenging and I honestly do not know how to achieve in an efficient manner... However, it should not be difficult to create anti-aliased versions of the spline/bezier methods (but only single pixel wide). I will probably do that next. BTW: I just added...
  31. vindar

    tgx: a 2D/3D graphics library for Teensy.

    Hi, Done :) I finally added methods for drawing Bezier curves... The declarations (with the associated docstrings) can be found around line 1350 in Image.h. More precisely, the new methods are: drawQuadBezier(). Draw a quadratic rational Bezier curve between 2 points with 1 control point...
  32. vindar

    Yet another highly optimzed ILI9341 library: for T4/4.1 with diff updates and vsync !

    Hi, The problem was (obviously) with my code: the interrupt flag was getting clear too late when another interrupt with higher priority was delaying to SPI interrupt code, resulting in the next interrupt never getting called... The bug should now be fixed. On a related note, I just added a...
  33. vindar

    tgx: a 2D/3D graphics library for Teensy.

    Hi, Rendering directly from the SD card is not supported and not really feasible because mesh data is not read linearly: accessing random positions in the SD card is really too slow. However, on Teensy 4.1, you can load the mesh as needed in external ram and then display it from there. Mesh...
  34. vindar

    tgx: a 2D/3D graphics library for Teensy.

    Hi, The _drawCircleHelper() method is a legacy from the Adafruit GFX library and it is indeed used to draw quarter circles. It is not currently a public method but making it accessible would not a problem. However, you can already achieve the same result (and more !) by combining clipping...
  35. vindar

    Fast 8 bit parallel I/O for T4.0

    Hi, I find your your results quite surprising. I would think that the TOGGLE, SET and CLEAR registers have the same access time... In my (admittingly very dirty) test, I find that the write time is the same for all 3 registers: it takes two cycles when every values are hardcoded. So that is...
  36. vindar

    Yet another highly optimzed ILI9341 library: for T4/4.1 with diff updates and vsync !

    Hi, I am bumping this old thread to mention that I made several improvements to my ILI9341 screen driver: https://github.com/vindar/ILI9341_T4. Most importantly, thanks to user feedback, several subtle bugs have been discovered and solved. The code has now been tested quite extensively is...
  37. vindar

    Fast 8 bit parallel I/O for T4.0

    Hi, You could also remember the pins states and then use the GPIO6_DR_TOGGLE register instead to prevent a delay between the high to low and low to high transitions. All the details for the available registers can be found in the IMXRT1060 manual available here, specifically chap 12.
  38. vindar

    Two ILI431s - different colors

    this is a strange bug. May I ask why you need to use 74HCT245/125 between the T4.1 and the ili9341 screens ?
  39. vindar

    tgx: a 2D/3D graphics library for Teensy.

    I did a little more testing and everything seems to work nicely. However, since my previous post, I have changed the name of the new method from 'blend()' to 'blit()' because, in retrospect, it is just an extension of the already existing blit() method... [so, in the code of the post above, all...
  40. vindar

    Teensy 4 and TimerOne Issue

    Hi, I think you are not supposed to call 'initialize' multiple times... This codes seems to work correctly: #include <TimerOne.h> volatile long offset = 100; void setup() { pinMode(0, OUTPUT); digitalWrite(0, LOW); Timer1.initialize(1000); // 1mS...
  41. vindar

    tgx: a 2D/3D graphics library for Teensy.

    Done :D I just added a new 'blend()' method to the library that performs the blitting of a sprite onto an image using a custom blending operator. If it works fine, I will also later add 'blendMask()' and 'blendScaleRotated()' methods (similar to the existing 'blitMask()' and...
  42. vindar

    tgx: a 2D/3D graphics library for Teensy.

    Hi, The blitting operations that are currently implemented use only basic alpha blending (and you must call the methods with an opacity parameter as the last parameter to activate blending, otherwise colors are simply overwritten). This applies for 'blit()', 'blitMasked()' and...
  43. vindar

    Highly optimized ILI9341 (320x240 TFT color display) library

    If you have the transistor on the board, then you can directly connect the LED pin from your screen to any digital pin of the Teensy without any additional circuitry. Then, you can PWM the pin to dim the screen as you wish... With the transistor in place, the LED pin will only draw a few mA of...
  44. vindar

    Highly optimized ILI9341 (320x240 TFT color display) library

    More details here on how to check if your screen has a transistor attached to the led pin: https://github.com/ThingPulse/esp8266-plane-spotter-color/issues/6
  45. vindar

    Highly optimized ILI9341 (320x240 TFT color display) library

    Hi, In my experience, some «*red ili9341*screens » have a transistor already attached to the LED pin in which case you can directly PWM the backlight from a teensy pin… you can probably check on the PCB if that is the case for your screen.
  46. vindar

    tgx: a 2D/3D graphics library for Teensy.

    Yes, it is very easy to clip any drawing operation to a given rectangular region of an image by creating a sub image referencing this region and drawing on it instead of the main image. Let me illustrate this. Say you have a 320x240 image: tgx::Image<tgx::RGB565> im(buffer,*320,240); And you...
  47. vindar

    tgx: a 2D/3D graphics library for Teensy.

    Hi, I just want to let you know that I updated the ILI9341_T4 library so that it now accepts any pin for CS and DS (but using a hardware CS pin for DS will provide the best performance). So you can now try it with your PCB if you wish. If you are using it to display a UI, then you might see...
  48. vindar

    tgx: a 2D/3D graphics library for Teensy.

    Good to know it is working :) I think it should be faster using only 3 chunks instead of 4 no ? By the way, I just push an update to the library with some breaking change: the view port dimensions are not template parameter of the Renderer3D class anymore but just regular parameters that can...
  49. vindar

    Strategies for attempting separate simultaneous updates on SSD1306 from Teensy

    Hi, I would suggest you use an internal framebuffer. Since your screen is monochrome with size 128x64, a memory buffer will only take 128*64 / 8 = 1kb of RAM (at 1 bit per pixel). You may use the GFXCanvas1 class for example to draw on the framebuffer. Then any process can write on the memory...
  50. vindar

    tgx: a 2D/3D graphics library for Teensy.

    Here is an (untested) snippet of code for drawing a 400x700 viewport centered on a 480x800 screen (in portrait mode) in two passes. First we draw and upload the upper half of the viewport then we do the same with the lower half. The buddha demo requires the following changes: 1. Defining the...
Back
Top