Requirements

the requirements for LegGo were few but very strict:
- Hardware reliability and sturdiness (because it has to endure the life on the stage of a touring musician)
- Software reliability and ease of use
- Good readability and screen contrast
- Portability 

Oh, and an important one: I had a very close deadline: in two week our tour would start.

This led to the most important decision: to use "stock" software already available as much as possible.

The finished product:

Intended usage:
When you turn on LegGO, it automatically displays the selected PDF file (we call it "setlist") in full screen on the LegGo monitor.  

You can Then  browse the pages back and forward with two pedals.

A pushbutton is provided to alternate positive/negative view of the page (i.e. black text on white background or white on dark), according to the lighting conditions of the stage.

Preparing the PDF:
You can prepare the setlist  (i.e. the multi-page PDF file that will be shown on the monitor) in two way: 

Note that while you need a keyboard and a mouse to prepare and upload your PDF setlist  to the LegGO before the show, you don't need anything but the two pedal to operate LegGO during the performance.


Brief description of the software used and of the configuration

I used only existent software and some shell script. 

operating principles:

  1. At the start of the Rasperry, a shell script auto-starts qpdfview that is configured to always open the last file used. 
  2. The shell script also puts qpdfview in full screen mode
  3. The shell script then call 
    wmctrl -r qpdfview -b add,above

     to put qpdfview on foregroud

  4. The pedals are attached to 2 GPIO. We use retrogame to detect the pedals pushes and emit PageUp and Page Down keystrokes, that are detected by qpdfwiev to go to next/previous page. 

  5. In the same way, a push-button is attached to another GPIO, and retrogame is configured to send the F6 keystroke when it's pushed. It is used by qpdfview to change the backgroud end the text (white text on black page or vice-versa)

  6. A second button is connected to GPIO3: when pressed for 5 seconds it shutdown safely the Rspberry PI. A second push restart the Rspberry. it's enabled by putting in /boot/config.txt the following: 

    ...insert the code ...
  7. [optional] My LegGo has the monitor mounted in vertical (this way I can display the pages in they entirety. So I had to rotate the Raspberry output. I put in /boot/config.txt the following code: 

    ... insert the code ... 
  8.  [optional] I noted that on stage sometimes the monitor turns off and on even if the Raspberry PI doesn't has any problem. Putting this code in /boot/config.txt helped a lot:

    config_hdmi_boost 7