Forum Rule: Always post complete source code & details to reproduce any issue!
Page 15 of 22 FirstFirst ... 5 13 14 15 16 17 ... LastLast
Results 351 to 375 of 538

Thread: ILI9488_t3 - Support for the ILI9488 on T3.x and beyond...

  1. #351
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,285
    @mjs513 - ST7735 - Maybe upload a copy of your exact one that is still causing USB issues.. I might even put in my actual Adafruit display to try it.

    If I find anything obvious will post back to T4 thread. One thing I wondered was if they did anything during constructor, but nothing major, just setting a few variables. Everything is done more in their calls to initr()... Was looking to see if there were any other objects... Did not see anything obvious.

    Will play more later

  2. #352
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    3,916
    @degragster - @KurtE

    Yep - got the old screen finally working. New I think I put 5v to one of the other pins by accident and may have fried the chip.

    Runs nice but backlight I very bright and washes out the colors with KurtE's new library.

  3. #353
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    3,916
    @KurtE

    Here is the exact sketch that I am using. Problems occur when you comment out @defragster's debug_tt.

    uncannyEyes0.zip

  4. #354
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,285
    @mjs513, @defragster -

    Thanks Mike, will try yours out and see if it behaves the same for me. If so again probably should post what is needed for @Paul to take a look at.

    I am not sure why I am playing with this KeDei code, other than it is almost close enough to work with.

    As I thought the rotations are wrong:

    If you look at this image:
    Click image for larger version. 

Name:	IMG_0796-(002).jpg 
Views:	5 
Size:	6.5 KB 
ID:	16978

    And you look at the code. The small black square starts at 0,0 and the White square ends at width, height.
    Added code to print out the text at X=0, y=height/2 (minus...) and you can see if I rotate the display such as the text is correct orientation, the black is at the top... Should be at bottom, so need to change settings for controlling some of this...

    Should probably try it with some of the other display drivers...
    Code:
    #include <KeDeiRPI35_t3.h>
    #define TFT_CS 10
    #define TOUCH_CS 9
    KEDEIRPI35_t3 tft = KEDEIRPI35_t3(&SPI, TFT_CS, TOUCH_CS);
    
    float p = 3.1415926;
    
    
    void setup(void) {
    #ifdef TFT_BLK
      pinMode(TFT_BLK, OUTPUT);
      digitalWrite(TFT_BLK, HIGH);
    #endif
    
      Serial.begin(9600);
      Serial.print("hello!");
      tft.begin();
    }
    
    uint8_t rotation = 0;
    void loop() {
      tft.setRotation(rotation);
      Serial.printf("Set Rotation: %d width: %d height: %d\n", rotation, tft.width(), tft.height());
      elapsedMillis timer;
      uint16_t time = millis();
      tft.fillScreen(KEDEIRPI35_RED);
      tft.fillRect(tft.width() / 2 - 32, 20, 64, tft.height() - 40, KEDEIRPI35_GREEN);
      tft.fillRect(0, 0, 8, 8, KEDEIRPI35_BLACK);
      tft.fillRect(tft.width() - 8, tft.height() - 8, 8, 8, KEDEIRPI35_WHITE);
      tft.drawPixel(0, 0, KEDEIRPI35_YELLOW);
      tft.drawPixel(1, 1, KEDEIRPI35_RED);
      tft.drawPixel(2, 2, KEDEIRPI35_BLUE);
      tft.setCursor(0, tft.height()/2-4);
      tft.printf("R:%d W:%d H:%d", rotation, tft.width(), tft.height());
      tft.drawPixel(tft.width() - 1, tft.height() - 1, KEDEIRPI35_YELLOW);
      tft.drawPixel(tft.width() - 2, tft.height() - 2, KEDEIRPI35_RED);
      tft.drawPixel(tft.width() - 3, tft.height() - 3, KEDEIRPI35_BLUE);
      // large block of text
      //delay(2500);
      Serial.println("Hit any key to continue");
      uint8_t loffset = 0;
      for (;;) {
        while (!Serial.available()) ;
        char ch = Serial.read();
        while (Serial.read() != -1) ;
        if (ch == '.') {
          tft.drawRect(loffset, loffset, tft.width() - 2 * loffset, tft.height() - 2 * loffset, KEDEIRPI35_GREEN);
          loffset++;
        } else break;
      }
      rotation = (rotation + 1) & 0x3;
    }

  5. #355
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,285
    Quote Originally Posted by KurtE View Post
    ...
    I am not sure why I am playing with this KeDei code, other than it is almost close enough to work with.

    As I thought the rotations are wrong:
    I think I just pushed up a fix for the rotation issue.

  6. #356
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,285
    Quote Originally Posted by mjs513 View Post
    @KurtE

    Here is the exact sketch that I am using. Problems occur when you comment out @defragster's debug_tt.

    uncannyEyes0.zip
    The good (or bad) news is it crashes my T4 as well... Will debug again tomorrow... But might again probably should put up on T4 thread for Paul to take a look at.

  7. #357
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    3,916
    @KurtE

    Kedei: Think with the Kedei it started off with the challenge of just getting it working now we just cant help ourselves.

    I downloaded your last GitHub - I hope - but my colors are way off:

    Click image for larger version. 

Name:	20190714_201155 (1).jpg 
Views:	2 
Size:	56.7 KB 
ID:	16979

  8. #358
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,312
    Quote Originally Posted by KurtE View Post
    The good (or bad) news is it crashes my T4 as well... Will debug again tomorrow... But might again probably should put up on T4 thread for Paul to take a look at.
    That seems a good plan with a good repro setup - I was going to wait for clean new CORES - but since it dies for you as well.

    I'd like to see it here - Other than current ST7735 and that sketch what is key? Current cores and SPI from PJRC github or other/

  9. #359
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    3,916
    @defragster

    You will need the latest core, Kurt's modified Adafruit_GFX library and latest SPI with the writeRect PR (still open). The uncannyeye sketch is in post #353.

    To duplicate load up the sketch on a clean install and then just comment/uncomment the line
    Code:
      //#define LIGHT_PIN_FLIP    // If defined, reverse reading from dial/photocell
    In this case uncomment it. You don't even need to have displays attached. To duplicate it though you can't use your debug_tt. If you include it, it some how fixes the problem.

  10. #360
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,285
    Quote Originally Posted by mjs513 View Post
    @KurtE

    Kedei: Think with the Kedei it started off with the challenge of just getting it working now we just cant help ourselves.

    I downloaded your last GitHub - I hope - but my colors are way off:

    Click image for larger version. 

Name:	20190714_201155 (1).jpg 
Views:	2 
Size:	56.7 KB 
ID:	16979
    Wonder if display damaged... @defragster what does your colors look like?

  11. #361
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,312
    Lots of pieces from https://forum.pjrc.com/threads/55735...l=1#post210182 ::
    https://github.com/PaulStoffregen/cores
    https://github.com/KurtE/Adafruit-GFX-Library
    https://github.com/PaulStoffregen/SPI

    Here is the UnCannyEyes as used here - with local copy of HardFault_HandlerC(): uncannyEyes0a.zip

    from post >>uncannyEyes0.Zip

    … link to st7735 … https://github.com/KurtE/ST7735_t3/t...ct_reset_delay

    Time to gather …
    NOT NEEDED :: from post >>debug_tt.zip

    NOTE: Once it compiles to upload a failed repro build - to get back to working SerMon USB seems to take a SECOND Button push to get working SerMon back from USB. The SPI LED will blink - but USB stays corrupted until a second Button Push upload.

    <edit> debug_tt - not required if this is placed in the sketch - just toggle: #if 0 and 1.
    NOTE: It is not because the HardFault_HandlerC() is truncated - the copy in debug_tt is a full copy - and instead of the minimal copy below I did another FULL copy of the current version from CORES and the repro is the same. The problem seems to be in the linking or code placement in memory - even though in these cases the T4 is never faulting - so the code is never called or executed.
    Code:
    #if 1  // TOGGLE 0 to exclude and cause BAD USB - set back to 1 and recompile to correct.
    #ifdef __cplusplus
    extern "C" {
    #endif
    
    #if defined(__IMXRT1052__) || defined(__IMXRT1062__)
    void HardFault_HandlerC(unsigned int *hardfault_args) {
      digitalWriteFast( 13, HIGH );
      while (1);
    }
    #endif
    #ifdef __cplusplus
    } // extern "C"
    #endif
    #endif
    >> Running with BARE T4 on USB cable - white wire T4B2.
    OKAY - I get REPRO when this is changed per note above when this line uncommented:
    Code:
    T:\tCode\t4\uncannyEyes0\config.h:
      136    #define BLINK_PIN         1 // Pin for manual blink button (BOTH eyes)
      137    #define LIGHT_PIN      A2 // Photocell or potentiometer (else auto iris)
      138:   //#define LIGHT_PIN_FLIP    // If defined, reverse reading from dial/photocell
    NOTE: it fails, then Button upload when debug_tt active in sketch by uncommenting or recommenting - when the local copy of "HardFault_HandlerC" comes or goes - just the change in config.h causes the code to recompile and that brings the failure back.
    Note from @mjs513 above:
    To duplicate load up the sketch on a clean install and then just comment/uncomment the line
    Code:
      //#define LIGHT_PIN_FLIP    // If defined, reverse reading from dial/photocell
    In this case uncomment it. You don't even need to have displays attached. To duplicate it though you can't use your debug_tt. If you include it, it some how fixes the problem.
    BUT:: IDE SerMon shows Garbage after first upload - it comes online properly with a second Button Upload. It looks like this:
    Click image for larger version. 

Name:	UnCannyE0.png 
Views:	4 
Size:	37.0 KB 
ID:	16980
    Then it clears up showing the 64's and is running???

    <EDIT UPDATE> I am not getting "REPRO / NO REPRO /REPRO / … " by reverting the code?
    @mjs513 - is your note saying any change to 'LIGHT_PIN' ? I did get a hang now with it commented - before it was when uncommented?
    It does seem to take 'Clean Build' - once it works it seems to persist? Maybe it is a change from change to '\uncannyEyes0\config.h' ?


    Edit: I am seeing two kinds of fail - the obvious one I removed debut_tt and made the config.h change - T4 not running - no SPI LED and this on SerMon:
    Code:
    T:\tCode\T4\uncannyEyes0\uncannyEyes0.ino Jul 14 2019 20:57:03
    ********
     T4 connected Serial_tt ******* debug_tt port
    
    T:\tCode\T4\uncannyEyes0\uncannyEyes0.ino Jul 14 2019 20:57:03InitCreate display #Create display #Reset displaysCall init/begin func for each display
    The less obvious case it seemed to start and print normally - and had to observe the LED stayed OFF - with no SPI activity.
    Last edited by defragster; 07-15-2019 at 04:58 AM.

  12. #362
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,312
    Quote Originally Posted by KurtE View Post
    Wonder if display damaged... @defragster what does your colors look like?
    Is there a sample sketch static color pattern I can get a pic of?

  13. #363
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,285
    Some of these requirements might not be necessary with my versions;
    a) SPI - Paul has pulled in my changes
    b) GFX - I believe Adafruit has pulled these in. Maybe already released new version with them?

  14. #364
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,312
    Quote Originally Posted by KurtE View Post
    Some of these requirements might not be necessary with my versions;
    a) SPI - Paul has pulled in my changes
    b) GFX - I believe Adafruit has pulled these in. Maybe already released new version with them?
    I was going to note adafruit gfx updated there - either way not in the last TD Beta.

    Okay, this SPI :: https://github.com/PaulStoffregen/SPI

  15. #365

  16. #366
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,312
    Latest repro steps on T4 thread post #3701

    @mjs513 - KurtE - if my notes are less than clear please update or expand so Paul can get to see it.

    <edit>:
    Back when debug_tt was first noted as having an impact it seemed the only thing it added was alternate code resource for the CORES 'weak' FaultHandler - my testing seems to indicate that as adding that locally to the unCannyEyes sketch was the same as including the debug_tt. Both a nearly empty version - or a FULL copy of the PJRC version.

    There is something very odd here - but not just for mjs513 this time. Typing this I just thought I should pack up my BUILD dir for working and failing - the issue might be something that shows in the leftover build files. Wil go Add those to that post.

    @mjs513 - before this you were seeing other fails and restarts on upload - were they at all similar to this?
    Last edited by defragster; 07-15-2019 at 07:44 AM.

  17. #367
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,285
    @mjs513 and @defragster - I think I can officially probably put this KeDei to rest for awhile (maybe forever)
    Fixed Touch paint to work with the correct rotation stuff...

    Click image for larger version. 

Name:	touchpaint.jpg 
Views:	2 
Size:	15.0 KB 
ID:	16987

    Fixed the touchscreen mapping to screen coordinates, or at least close enough.
    Changed to now output 12 colors (480/40), so whole top of screen.
    Changed it to be array of colors driven instead of code for each color....
    Also an array of color names, which I output when to serial monitor when you click to change colors
    And any Serial input in monitor, toggles printing out touch data...

  18. #368
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    3,916
    Quote Originally Posted by defragster View Post
    Latest repro steps on T4 thread post #3701

    @mjs513 - KurtE - if my notes are less than clear please update or expand so Paul can get to see it.

    <edit>:
    Back when debug_tt was first noted as having an impact it seemed the only thing it added was alternate code resource for the CORES 'weak' FaultHandler - my testing seems to indicate that as adding that locally to the unCannyEyes sketch was the same as including the debug_tt. Both a nearly empty version - or a FULL copy of the PJRC version.

    There is something very odd here - but not just for mjs513 this time. Typing this I just thought I should pack up my BUILD dir for working and failing - the issue might be something that shows in the leftover build files. Wil go Add those to that post.

    @mjs513 - before this you were seeing other fails and restarts on upload - were they at all similar to this?
    To be honest - I believe so. I should go back to my eigen sketch and rerun it with debug_tt included.

    <edit> but I haven't lost usb except for this sketch in a very long time. Eigen threw it into the bootloader and even with debug_tt included still does it.

  19. #369
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    3,916
    Quote Originally Posted by KurtE View Post
    @mjs513 and @defragster - I think I can officially probably put this KeDei to rest for awhile (maybe forever)
    Fixed Touch paint to work with the correct rotation stuff...

    ….

    Fixed the touchscreen mapping to screen coordinates, or at least close enough.
    Changed to now output 12 colors (480/40), so whole top of screen.
    Changed it to be array of colors driven instead of code for each color....
    Also an array of color names, which I output when to serial monitor when you click to change colors
    And any Serial input in monitor, toggles printing out touch data...
    Just tried it and it does work - my colors are just off compared to what you have = but that may be my display.

  20. #370
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,285
    @mjs513 ...

    I lied a little.

    I now have it so it builds and crawls on Teensy LC... it uses SPI.transfer and SPI.transfer16 to do the work. Might be able to more on it, but it aint worth it!

    I just unplugged T4 from my partially assembled board and plugged in TLC

  21. #371
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    3,916
    @KurtE

    Just can't help yourself

    Ready to do 3d graphics on the T4 and adding to the libs: http://crawlingrobotfortress.blogspot.com/2015/12/, Better 3D graphics on the Arduino: avoiding flickering and tearing or how about ray tracing: https://hackaday.com/2014/11/25/ray-...on-an-arduino/

  22. #372
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,679
    Quote Originally Posted by mjs513 View Post
    avoiding flickering and tearing
    Blog:
    This can be achieved by rendering subsequent frames on top of previous frames without erasing, and then erasing only those pixels that have changed.
    That's exactly what I say (since many years.. ) - it looks a bit more "dynamic" if do it the other way: first delete the pixels that changed to "black", then overwrite all others. But best is, to do double-buffering, if possible.
    (..and NEVER..NEVER, write pixels twice.. i.e. delete without thinking and redraw - this WILL flicker if there is a refresh in between - but OK, everybody knows that)
    Last edited by Frank B; 07-15-2019 at 08:46 PM.

  23. #373
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    3,916
    @Frank B - haven't done 3d graphics since my college days and that was on Apollo computers, IBM360 and PDP11's and of course TRS80 - yes I am old So with the T4 going to have some fun. Found a very simple Ray Tracing example with the usual test case of sphere's that runs pretty much out of the box and takes about a sec to run using a ILI9341 using @KurtE ILI9341_t3n library:
    Click image for larger version. 

Name:	20190715_165624.jpg 
Views:	4 
Size:	121.9 KB 
ID:	16992

    <EDIT> The same sketch on a T3.6 takes 34s to complete just to give you an idea. For anyone that is interested here is the sketch:
    TFT22_raytrace.zip
    Last edited by mjs513; 07-15-2019 at 09:38 PM.

  24. #374
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,312
    Got github KeDei - touchpaint example just has debug feedback - scaling seems about right

    But don't see the color box paint area like p#367 to test compare the color block?

    Screen is just WHITE ?

  25. #375
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,285
    @defragster - Might help to see your setup (post, or email). Are you using breakout board? If so how to get +5v to it... I was using my own breakout.
    Also does yours say anything like Version 6.3...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •