0

Let's say I have a Python script that receives an IR signal and lights up an LED. We'll call it a "hit" indicator. In the IR transmission, let's say a person's name was embedded in the signal. How might I write or draw that name onto the official Raspberry Pi 7" LCD that is connected via the display ribbon?

2
  • in a GUI or command line application? If a GUI what library are you using for the GUI? if not a GUI a simple print("hit name of person hit") would work. Aug 16 '18 at 6:17
  • It is a command line application and you're absolutely right that a print would work. I was intending for something more like introducing a GUI in the way @Matt called out but couldn't find the right way to phrase that. Thank you for your question!
    – Beez
    Aug 16 '18 at 6:33
3

I'm sure there are many, many ways of doing this but one of the easiest would be to create a GUI with python's built in tkinter module. Size the GUI window to the size of the LCD screen and when the IR signal name is received, code a label with name received to be displayed on the GUI.

2
  • Now that you mention it, I have seen this before and had forgotten about it! I'm assuming this is capable of sending through the display ribbon? I imagine the ribbon works much the same way as HDMI?
    – Beez
    Aug 16 '18 at 6:29
  • @Beez Yes. It is capable. Think of it this way - the LCD screen you have attached to the Pi is effectively just a desktop monitor which can open applications, display windows, etc. By creating a GUI that is sized properly in tkinter we are simply opening a window that is viewed through the LCD screen. Regardless of how that screen is connected to our Pi.
    – Matt
    Aug 16 '18 at 7:25

Not the answer you're looking for? Browse other questions tagged or ask your own question.