Spent an hour trying to update ibraries till I found the bug info ....... interested to see how UK Steve solves it with SPI
Mike Just saw your post (#54 @ Base Station with WiFI) is the WeMos esp32 the same one you are using for this throttle development? I have been playing with this one ...... but have others on order.
I just posted a pic of the three boards I am using so far. Your board should work but will require a few wires to connect the pins to the motor shield (more than likely you would need that anyway). You will need a pinout diagram on that board to connect things correctly, if the numbers are correct on the silk screen D4=A0, D2=A1, D25=MAIN ENABLE, D23=PROG ENABLE, D19=MAIN DIRECTION, D18=PROG DIRECTION, D21=SDA, D22=SCL..
Hi All Well it's just over a week since I started this thread. Prior to that date, I had neither my first ESP32 or an SPI driven Touch Screen Display. Today I'm playing with the first 13 function keys all displaying nicely on the display, with all the driver code running on the "32" and the touch interface is working too I guess I need to slow down a little and take a few steps back. So I'll be getting a few lessons together along with the Uno versions of the code, then we can work through this together. Here's my Wifi & Bluetooth Battery ESP32 dev board driving the display. Note, there is no USB powering this setup, that's because as you can see in the second picture, there's an 18650 LiIon battery 'on board'. I have loads of these salvaged from old laptop battery packs. It doesn't take much imagination to see where I'm heading here, with a custom interface PCB, connecting the '32', display and joystick the throttle just needs a nice compact case to put it in. The battery charge circuit is also on the dev board
I can see where a second board would be useful for those who opt for an ESP32 without the battery/charger setup. Any suggestions on a standalone setup for charger? Perhaps one of the RC Car charger setups for the batteries? (those are 3.7VDC usually)
Hi All When you guys have acquired a display of the type I suggested, here are the connection details to set it up with an UNO. If you grab this library... https://github.com/Bodmer/TFT_ILI9341 there are plenty of examples included to test your setup. As the displays are 3.3v logic we have to shift Uno's output levels unfortunately, hence the resistor arrays. You can use combinations of values in the 1k to 10k range (not critical) with the upper array (as pictured) being roughly half the value of the lower. I used 1k upper, 1.8k lower giving a voltage at display pins of about 3.2 volts. The file User_Setup.h that comes with the library, needs editing at line 48 #define TFT_DC 8 // Data Command control pin Needs changing to 9.
I finally over the weekend got to hook this up and play around. I have to say way easier then I thought! just as an FYI I used 10k and 4.7k resistors they work fine.
Way to go Keith, nice to see someone reporting back After you and other folks are done testing the library examples, it will be time to do some work with the touch interface. This will involve a little understanding of how the touch surface works and how we integrate the two 'devices' into a seemingly single package that all works together with some clever code. Out of the box the TFT_ILI9341 library does not support touch, or adaptations of Adafruits TFT Button class. To that end I'm currently trying to integrate the additional code into that library. This is only to keep work done on the forthcoming Arduino Uno type examples in line with the brilliant stuff one can do with Bodmers TFT_eSPI library that specifically targets ESP8266 and ESP32. I've still a little work to do on that, but I'm getting there. What I would like to achieve with all this, is a menu based throttle display. Where users can have a choice of either picking say a Loco # from a list with the joystick scroll/select control or just touching the appropriate area of the screen with the little plastic stylus that should have been included with your purchase Regards Steve.
Keith Glad to hear you are operational. I have my breadboard set up and am patiently awaiting the proper LCD. Steve F
Hi Guys, I've been watching this thread for a while and am dying to get started... Have a bunch of ESP32s and a TFT display or two on order, as well as some joysticks but they're taking forever to arrive - seems like I'll only get them next year. I do however, have a different 3.5in TFT display with SPI interface, and also a few ESP8266-12S modules, also two WeMos D1 Arduino-like boards. I would like to start playing with the code you've been working on - is there a link somewhere? TIA Norm
Hi Steve, I'm interested to see how you have wired your level shifter? IMHO I would have connected the 1.8K resistor to ground, the centre tap between the two resistors to the TFT panel, and the Arduino output to the 'free' end of the 1K? Am I missing something?
RC Car charger is probably overkill. They are designed for multicell batteries that need balance charging and fast charging. I’ve got one, but not been able to use it for my 1s batteries. Instead I have used the much cheaper WeMos charger, or a cheap stand alone charge board. I’ve also bought some cheap 4s charger boards, but haven’t used them yet.
Keith/Steve Frustrating! wired up according to the diagram .. checked wiring numerous times ... I get nothing but a white screen with the Bodmer examples. I have now tried with two different 2.4" TFT screens and both get white screen. I wish there was a simpler set up to test the TFT so I could figure out if they are functional and proceed from there. Steve F
Simon, I have found using cell phone batteries works great for stuff like this. Most have the charging circuits built in and you can have just a small sub or even 2 wire jst type plug on the receiver. Put the on/off switch after the battery and then you are good to go. For low power applications like this they last for a very long time between charges. Steve F, believe me I know how frustrating this stuff can be ! Is there a chance you can link the exact ones you have here? I know there are a couple different chipsets out there and have read of issues with a certain type so maybe that could be it? Knowing you a bit from here I doubt it’s anything your doing.
Keith This is the TFT I am using: https://www.ebay.com/itm/2-4-240x32...e=STRK:MEBIDX:IT&_trksid=p2057872.m2749.l2649 I was just about to update my post as when I plugged the setup into USB earlier I saw a graphic arch (TFT_ArcFill) which then disappeared ...... unless my mind was playing tricks ..and then back to white screen. So I'm back to square one
I had the same problem when using platformio. I submitted a pull request to Bodmer that added the ability to define the pins as build flats and avoid the user setup header file. The problem I ran into was the wrong user setup was picked up, it was always picking the default pins which wouldn't work no matter what. With the pull request I sent I define all pins from the platformio.ini file now and avoid modifications to the library bits. Sent from my ONEPLUS A5010 using Tapatalk
Interesting info. Can you give me your list of pin connections as you listed them in the sketch ...... I'll give it a try.
Here are the defines I used: Code: -DUSER_SETUP_LOADED -DILI9341_DRIVER -DTFT_CS=17 -DTFT_DC=16 -DTFT_RST=5 Here is the full set of pins used, with the above defines for the ESP32: Code: MISO 19 MOSI 23 SCK 18 DC 16 RESET 5 CS 17 T_CS 21 T_DIN 19 T_DO 23 T_CLK 18
Mike/Keith/Steve Thank you ......I now know that the TFTs are funcional .... if I let them rest for a period, upon re-powering I get a functional display (in this case TFT-Pie-Chart) and then it reverts to a white screen ....... OH fun, a new wrinkle to look into. Thanks guys.