Help, questions about Mini PiTFT

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Chris_Hycki
 
Posts: 1
Joined: Thu Dec 30, 2021 3:09 am

Help, questions about Mini PiTFT

Post by Chris_Hycki »

Hey all, I really wished adafruit did one on one email support because I find with my businesses, it's a better system,
But I understand the circumstances so came here because I ordered the Mini PiTFT display (1.14" 240 x 135) and I have questions about it: https://www.adafruit.com/product/4393

Q: So I want to use the kernel drivers so that I can see my terminal output because my project is running a Discord Bot on a Pi zero 2 w, and the TFT comes with mappable buttons on the side. I was wondering if it could be mapped so that when it is pressed it does a terminal output such as closing out and rebooting the bot with node JS? I have been having to do it manually thru my Mac with Command + . and node bot.js. If I can customize it to do that on the RPi but with the button, it would make my life 6x easier. I was already planning on doing that with a button but it would be out to the side in the case and when pressed it would run the command in the terminal window. Is that even possible in the first place, to have a button that runs those types of commands?? Not sure here, could be overthinking.

Q: I found the CAD Files for all of the adafruit products and can't find this display there? It has F3D and all the files I would love to have because I'm designing my own 3d printed case for this contraption. I can always take measurements when I get my product but having the CAD model makes it so much easier if I can just design around it, thanks!

Hope someone can help, I'm stumbling over my brain,

Cheers Everyone!

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Help, questions about Mini PiTFT

Post by adafruit_support_mike »

Chris_Hycki wrote:the TFT comes with mappable buttons on the side. I was wondering if it could be mapped so that when it is pressed it does a terminal output such as closing out and rebooting the bot with node JS?
You can probably use node.js, but Python has the capacity to do system level commands like forcing a reboot directly. Take a look at the os.system() function:

https://docs.python.org/3/library/os.ht ... #os.system

Getting the equivalent of command line input would involve using interprocess commuinication, so it would be a harder but more powerful way of getting the same result. For that you'd want the subprocess module:

https://docs.python.org/3/library/subpr ... subprocess
Chris_Hycki wrote:Q: I found the CAD Files for all of the adafruit products and can't find this display there?
The Eagle files are linked from the Downloads page in the tutorial:

https://learn.adafruit.com/adafruit-min ... /downloads

You can get most dimensions from that. I don't think we have any 3D files for that board though.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”