-
1Setting up the T-Display-S3 build environment.
First I installed Visual Studio Code using the .deb file from https://code.visualstudio.com/ using the standard sudo dpgk -i.
Then following the directions from the amazon listing I bought the board from, I installed PlatformIO. Quoted below:
PlatformIO
- PlatformIO plug-in installation: click on the extension on the left column → search platformIO → install the first plug-in
- Click Platforms → Embedded → search Espressif 32 in the input box → select the corresponding firmware installation
After that I downloaded the full repository from https://github.com/Xinyuan-LilyGO/T-Display-S3 as a zip file, extracted it and imported it into Visual Studio Code.
Finally I found i was missing the package for python virtual environments that PlatformIO requires,, This was a quick fix with sudo apt-get install python3-venv.
-
2Building the device code
devicecode.zip contents:
"fonts.h" - font for the digital clock
"fonts2.h" - font for the scoreboard and media play time
"multiple.h" - 2d array containing bitmaps for all 30 NBA logs plus the KODI logo,
"pin_config.h" - pin config file to allow brightness control with the button on the dev board
"PCBClock,ino" - this is the actual source code for the project
I built this project starting out by editing one of the examples from the LilyGO repo, so if you followed the build environment instructions. You can compile this code by just copying the contents of this zip file over top of the same folder in /examples, and editing the plaformio.ini file to make this the active project.
-
3Server Scripts explained
serverscripts.zip contents:
"updatescores.sh" - Main server for NBA scores, it calls the parser and sends the results to the display.
"getscores.sh" - Main parser, downloads the scores and parses them for sending to the display,
"helper.sh" - Helper script to remove games that aren't currently in progress or completed.
"fix.sh" - Small helper script to remove the space from Trail Blazers.
"xbmc.sh" - This script queries KODI with json to get play time and duration then sends it to the display.
-
4LIRC
I use LIRC to trigger the server actions. If you dont have a LIRC receiver on your KODI media center now is the perfect time to set one up. LIRC has excellent support for FTDI, so I recommend getting a SparkFun FTDI Basic Breakout and a TSOP4838. Then all you need to do is bend the pins on the infrared receiver to fit in the corresponding holes on the FTDI board, No soldering and I think the finished product looks pretty cool.
Tips for setting up LIRC:
Use IRrecord to collect the buttons for your TV remote. I like to assign functions to buttons that aren't used by the TV when it is in the basic viewing mode, such as menu arrow button or play and pause. Remember to stop LIRC before running IRrecord, otherwise IRrecord wont be able to access your IR receiver. service stop lirc.
After you've finished IRrecord copy the config file to /etc/lirc/lircd.conf.d/
Using irexec to run the server script:
Edit or create the file /etc/lircrc and add an entry like this for each button function you want.
begin
prog = irexec
button = KEY_UP
config = /home/linus/serverscripts/./xbmc.sh
endFinally make sure to add irexec to a startup script, It isn't automatically started by LIRC and none of the functions you add to lircrc will work without irexec running.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.