Welcome :)


25
Apr 20

Companion Pi Touch Screen

Bitfocus Companion is an awesome way to make buttons on a keyboard device control other software or hardware. My interest in this is because we run church services with very minimal staff. Usually the one person on the sound desk is the same person operating ProPresenter.

We are a small church which has to setup and teardown each week, and I’ve currently got our setup down to three wheeled units to roll out, and three cables to plug in for all sound and vision. More about that and the desk I built to hold it all in the future, because right now we are doing everything from home.

Today is all about using Companion to activate a video switcher and handle running shortcuts in zoom and ProPresenter.

Basic overview

Installation steps.

I have linked to key documents were necessary. Some of these things are easy to find out with a quick google search, and they don’t have links, but the description should be enough to get you there.

  • Attach all the hardware together, but don’t put it in the case yet.
    • I used a separate power supply for the pi and touch screen.
  • Write the Companion Pi image to a micro SD card.
  • Insert the SD card and boot it all up.
  • Then used sudo raspi-config to Change timezone back to Europe/London (clearly this is an optional step, but I do like my time to show correctly on my companion buttons!!)
  • Added the following to the /boot/config.txt file lcd_display=2 This will rotate the touch screen display 180 degrees so that it is oriented correctly for the case.
  • Then installed chromium-browser and set it to run in kiosk mode. I followed the excellent instructions from desertbot.io, but my first step in those instructions was already completed as I had the companion pi image installed and running.
  • For your Kiosk URL use http://localhost:8000/emulator and this will launch the emulator every time the ‘kiosk’ launches.
  • And that’s it, you should have the touch screen ready to use with the companion 32 button emulator.
  • Finally I made some little feet to hold the screen at the right angle. Some T brackets bent to the right angle did the job here, and a couple of found screws that happened to be the right size to fit the holes in the case.

Things to to

  • Screen size. the emulator page is just a little to wide and long for my liking, as this causes scroll bars to be visible. I can’t seem to find a way to get rid of these without altering the emulator page code in companion pi, and I didn’t want to go faffing with the companion code.
  • Boot up seems patchy, sometimes it’s fine and sometimes I get a flashing activity light on the pi which sugests that it couldn’t read a file from the SD card. I suspect the SD card is flaky, so might try another one, but don’t have one spare at the moment…


3
Dec 19

Create directories for months of year

I wanted a way to quickly create directories for each month of the year. I wanted them named using a human readable name, but with a sort order that kept them in month order.

Using bash 4 and a pretty standard time formatting command gives us the command you can see in the gist

« Page 1, 2, 3 ... 31, »