-
You will need a 2.8" Arduino TFT Touch Screen Shield, I am using this one from Elegoo.
- You also need an Arduino Uno, I am using this one from Elegoo.
-
TFT set-up varies greatly between displays, so I recommend following the instructions provided with your display along with this table.
- Calibrate your display and make sure touch works. The MCUFRIEND_kbv library provides a fantastic sketch for this that will tell you what settings and pins to use.
-
Change to your display settings at the top of the sketch.
-
Install the
Adafruit_GFX
,MCUFRIEND_kbv
,TouchScreen
Arduino libraries and/or whatever you need for your display to run. -
Upload the sketch, with a bit of luck you should see this:
You should be good to go, move onto setting up the Python script.
-
Make sure you have Python installed, I am using v3.9.2.
-
Activate venv and install deps.
- Go into the script folder.
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
-
Change
"COM12"
to the port your Arduino is using. -
Run the script.
- If you set everything up correctly, you should see the TFT display refresh.
You should be good to go, move onto the BetterDiscord plugin.
NOTE: Since BetterDiscord is not supported by Discord, it has a good chance of breaking on new Discord updates. If the project isn't working, this is a likely culprit.
-
Install BetterDiscord.
-
Move the plugin to your Plugins folder.
-
If all went well, you should some stuff happening in the Python console.
-
If the display isn't working, make sure to run some example sketches and check if you put in the right settings at the top of the file.
-
Make sure to look at the TFT display, it will tell you when the Python script and/or the BetterDiscord is connected.
-
If the Python script never connects, make sure you have the right COM port setup in the script and the display refreshes when you run it.
-
The BetterDiscord plugin (as of me writing this) doesn't retry the WebSocket connection, you have to manually restart the plugin if Python disconnected or you ran the plugin first.
-
Both the Python script and the BetterDiscord plugin output logs that you could use to get more information about the problem, they typically look something like this:
- For BetterDiscord you have to enable the console in settings.
Python | Discord |
---|---|
- Tried turning it off and on again? No, seriously. Preferably in this order: Arduino, Python script, BetterDiscord plugin.