Home / Instructions for using the Mimo Magic Monster with the Raspberry Pi

These instructions below are for the Rasberry Pi 2 and earlier. With the Raspberry Pi 3, it is much easier. Please see our new page here: https://www.mimomonitors.com/pages/using-our-usb-displays-with-the-raspberry-pi-3

 

Raspberry Pi

How to Guide: Using Mimo Monitor’s Magic Monster with Raspberry Pi

To learn more, please visit http://www.mimomonitors.com or get in touch via info@mimomonitors.com  

Instructions work for all Magic Monster 10.1” Resistive Touchscreen Monitors

Required Hardware:

Mimo Monitors UM-1000 Magic Monster USB touch display (http://www.mimomonitors.com/products/mimo-magic-monster-10-1-inch-resistive-touchscreen-monitor)
Powered USB hub able to supply 1A of current minimum (example case uses Dynax Mode: U24H41)
Raspberry PI (model B in example case)
SD Card (4GB or larger)

 

1. Download the most up-to-date version of Raspbian, the official Raspberry Pi OS.

2. Burn the image onto an SD card. In the example case we use a Windows machine and used Win32DiskImager to burn the image onto an 8GB card. For users who prefer Linux, use dd. You can use any SD card, but it must be 4GB or larger.

3. Download the archive from the Mimo Monitors website. The team rebuilt the kernel around the Raspbian built dating to 6/20/14 and tested it with the Raspberry Pi B+. We have only tested it with the Magic Touch monitor, however. If you have any problems, let us know: https://cdn.shopify.com/s/files/1/0026/7132/files/Mimo-Pi-Aug2014.zip?3545)

4. If you have a Linux machine, you can mount the SD card. If you are using Windows, you will need to install and run a program that understands Linux partitions. We recommend Paragon Software’s ExtFS for Windows, free for personal use. Whatever file system driver you choose, it must be able to WRITE ext4 partitions.

5. Open the Mimo archive from step 3 and copy:

- img to the boot partition of the SD card (do not copy it to the /boot directory of the ext4 file system). It is always good practice to keep all original files, so rename the existing kernel.img to kernel-stock.img

The remainder of the files go into locations as specified by the directory structure that is part of the archive file.

- /ext/X11/Xorg.conf – file – As this file does not yet exist, no backup will be needed.
- /usr/share/X11/xorg.conf.d/10-evdev.conf – file – overwrite what is there and rename the existing file 10-evdev-stock.conf
- /lib/firmware – directory – overwrite what is there and rename the existing directory firmware-stock
- /lib/modules – directory – overwrite what is there and rename the existing directory modules-stock 

6. Connect power to the Pi and the hub. Connect the screen to the hub. Finally, connect the hub to the Pi. Depending on how you choose to proceed with the next steps, you may need a network cable and may want a keyboard and/or mouse. You can connect a second monitor, but the steps may vary based on your setup. In the example case, we changed the config.txt file by removing the ‘#’ before hdmi_force_hotplug. Another option is to boot with just the Mimo screen, and then SSH into the Raspberry Pi. Of course, this option requires a network connection.

7. Boot the system. If everything is connected properly, you should get a green screen on the Mimo.

8. Either via console or SSH, run ‘sudo raspi-config’ to:

- Expand filesystem
- Enable boot to desktop/scratch -> desktop log in as user ‘pi’ at graphical desktop
- Enable any customized settings you prefer at this stage. In the example case we changed the localization to en_US.UTF-8 UTF-8
- Reboot

At this point in the process, you should have both a functional X session and a functional touch response. Calibration issues are likely, and in some cases X or Y may be reversed. To calibrate the touch screen: 

9.  Open the evdev configuration file in your text editor. of choice. In the example case we use vi:  /usr/share/X11/xorg.conf.d/10-evdev.conf

At the end of the file is this section:

 Section "InputClass"
       Identifier "USBest touchscreen catchall"  
       MatchVendor "USBest_Technology"  
       MatchDevicePath "/dev/input/event*"  
      Driver "evdev"  
       Option "Calibration" "18 4084 20 4045"  
      Option "EmulateThirdButton" "1"  
       Option "EmulateThirdButtonTimeout" "750"  
       Option "EmulateThirdButtonMoveThreshold" "30"  
EndSection

We began with the files that were developed for the Mimo Magic Touch. As the touch controller is different, the Vendor and Identifier must also change.

       Change the line: Identifier "USBest touchscreen catchall"  
       to read: Identifier "eGalax touchscreen catchall"  
       and change the line: MatchVendor "USBest_Technology"  
       to read: MatchVendor "eGalax_Inc"   

Additionally, we must set some parameters that instruct the driver how to “stretch” the touch screen input across the available screen area. Download a simple utility called evtest. You can use the Debian Advanced Package Tool (Apt) to download this utility.

10.  Call the command 'sudo apt-get install evtest' to download and install the “evtest” package downloaded at the end of step 9.

11.  Run evtest.

12. evtest will display a list of the input devices currently attached. Select the number of the device that corresponds to the eGalax_Inc. Touch Interface (in the example system, this was device #3)

13.  evtest will display some configuration data then pause, awaiting input.

14. Touch the uppermost left corner of the touch screen with your finger or a stylus. Evtest will scroll a series of data outputs with both ABS_X and ABS_Y lines and the following numeric values: 

Event: time 1374175747.420998, type 3 (EV_ABS), code 0 (ABS_X), value 48
Event: time 1374175747.421011, type 3 (EV_ABS), code 1 (ABS_Y), value 3364

15. Write down the lowest observed ABS_X value and the highest observed ABS_Y value that you see.

16. Repeat the process in the lowermost right corner of the screen. In this instance, you will need to write down the highest observed ABS_X value and lowest ABS_Y value.

17. Now open the 10-evdev.conf file we used in the previous steps and change the: Option "Calibration" "18 4084 20 4045". The numbers are: "minX maxX minY maxY". Substitute the placeholder values written here for the observed values from steps 15 and 16. 

18. Are the X values swapped? If so, insert the line: Option "InvertX" "true”. If the Y values are reversed, add the line: Option "InvertY" "true". Each screen is different and this step may or may not apply.

19. Save the file and reboot. The cursor should now follow your finger or stylus very closely.

The rest of the section is to enable 'Hold-For Right Click'. If you press your finger or stylus on the screen and hold, the right click menu will run etc.

 

Calibration procedure is adapted from the instructions here: (http://news.hopeindustrial.com/2013/using-a-raspberry-pi-with-a-hope-industrial-systems-touch-screen-part-ii-touch-screen-setup/)