New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Support for TTGO-T8 ESP32 board #410
Comments
Changes have been pushed. My implementation differs from yours in some minor ways. I also restructured how GPIO_Defs is put together. If we continue to add platforms, that file would get very messy. In the new model, each platform has its own include file and the GPIO_Defs file is a selector. |
Thanks for adding the TTGO T8. The restructured GPIO_DEFS will definitely keep things tidy as the supported platforms grows. I don't believe the relocation of the MISO pullup is correct. After reviewing the SPI library it looks like SPI.begin() will overwrite the added MISO pin declaration. That is to say, the library will change the MISO pin back to a input without pullup. TLDR; The MISO pullup should go directly after SPI.begin(), before SD.begin() is called. BTW, this pullup was the magic ingredient to getting the TTGO T8's SD card to work. It seems that TTGO decided not to include the customary 10K ohm MISO pullup on this board's design. The resistor is shown on the schematic, but is marked as "NC", so they deliberately do not stuff it. Bad decision. It took an afternoon of hair pulling to find this mistake. Using the internal weak pullup is working fine, so no need to solder an external resistor.
|
I think we should draw the line at only adding platforms that support SD cards as well. The generic definitions should catch the rest. |
In this case the card has a built in SD Card that might lead people to get frustrated. I have moved the pullup statement. |
Looks good. Thanks.
|
Getting the TTGO-T8 ESP32 board to work with ESPixelStick requires very minor code changes. It would be great to add official support for it in a future release.
The TTGO-T8 has several desirable features for use with ESPixelStick firmware. It is inexpensive ($7-10 USD) so that checks-off one important box. But hardware wise, it has 4MB to 16MB Flash, Micro SD Card Socket, onboard antenna, U.FL socket for external antenna (optional feature, just move bridge resistor), and plenty of GPIO.
Typical vendor link:
https://www.aliexpress.com/item/32851423415.html
I'm new to the ESPixelStick project (just discovered it last week). So I don't know the expected procedures to follow in regards to Github pull requests. But since the code impact is minor, I will just share my changes in code braces, see below.
BTW, I tested with a V1.7 board and a modified 4.x-dev branch. The update should work with any TTG0-T8 hardware (flash size 4MB / 8MB / 16MB, board rev V1.1 / V1.3 / V1.7). I found that a level shifter IC (typically 74HCT125) is required on the data pins to avoid LED flicker, even on short cable lengths.
Code changes begin here:
1. platformio.ini file
At the bottom of platformio.ini add this new board env:
2. FileMgr.cpp
Find this code in FileMgr.cpp:
Replace it with this:
3. GPIO_Defs.hpp
Find this code in GPIP_Defs.hpp:
Replace it with:
End of code changes.
Build with Platformio using the ESP32_TTGO_T8 board env. Enjoy!
The text was updated successfully, but these errors were encountered: