Raspberry Pi3 and Pi Foundation 7” touchscreen
I wanted to have an environment that was totally mobile, i.e. I wanted to control a Raspberry Pi crawler (tank?) from a Raspberry Pi that was untethered. I had used a laptop to long into the Pi2 on the crawler, configure pairing with a PS3 controller and launching the application for control. At this point I could now control the tank without any further need of the laptop. I will now accomplish the same functions as before but I have now replaced the laptop with a Pi3, with 7 inch touchscreen, and onboard power to supply the Pi3 and its connected touchscreen. I should be able to launch an application that will display two vertical slider bars for forward/reverse and left/right turns while also providing a small viewport for the crawler’s onboard camera.
What you need:
1. A Raspberry Pi (2 or 3). I am using a Pi3 because it supports onboard WIFI as well as bluetooth
2. An operating system for the Pi. I am using Ubuntu Mate 16. These instructions assume you will be using Ubuntu Mate 16. Rasparian seems to be the preferred OS but I have always had success with Ubuntu on all my Pi installations.
3. A 32 gig MicroSD card Class 10.
4. A 7 inch touch screen. I recommend Adafruit’s 7” touch screen seen below. This OS in this image is the Rasparian OS. As stated I use Ubuntu Mate 16 which will be shown later in this build process.
5. A 3D printer or access to one – a friend or local business.
This above link will send you to the Touchscreen case and the links following “by:” provide attribution to the individual who designed it. I downloaded and printed the case noted above but because it does not provide for battery power I could only use 2 of the files as originally designed. I had to modify one of the parts and generate a battery compartment and a battery compartment lid. If you are interested I can provide those parts (leave a comment – I will generate a download tar for the modified parts if there is interest) but it would require the use of the exact same battery since other batteries would not be accommodated by the case design.
8. A power bank capable of supply 5V 2.4A output. Many come with two or more outputs. Just be sure yours has the 2.4A option. If interested I am using a: RAVPOWER – Model RP-BP19 (16750mAh with two outputs: 2.4A and 2.1A.
Lets Get Started
A. Printing the parts.
The print consists of 5 parts.
case w/ SD hatch
SD hatch cover
Battery compartment lid
B. Assembling the 7” touchscreen and case.
Here is the 7” touch screen kit:
There are 3 parts: (1.) the actual screen with the screen driver board attached (this is now done in the later productions), (2.) a single flat ribbon cable, and (3.) 4 wires with female ends – you only need 2 wires the way I did it.
C. Software/Application changes:
- If your screen is upside down after booting do: vi /boot/config.txt and add “lcd_rotate = 2” to the end of the file
- To ease the login process on a touchscreen device add a “unique” user and enable that user to have “auto login”. To do this choose “add users” from the setting option and enable to auto login feature. If you don’t then you will need to use a virtual keyboard at the login in prompt to login.
- to enable a virtual keyboard: go into system setting –> univeral access –> typing and set “on screen keyboard” to “on”. The virtual keyboard will now appear. There is a 4 leaf clover icon in the top desktop title bar which will allow you to toggle it on/off.
At this point I was ready to boot the Pi3 with it 7” touch screen. Remember I am using Ubuntu 16 so I was not sure how any of this was going to work.
Here is how it looks:
Initially the image was upside down and I enabled the virtual keyboard both explained above but shown here. Not the “clover leaf” icon in the image below to the right of the bluetooth icon.
For now I am very pleased with this touch screen and with the quality of the 3D print provided provided by the original designer as noted in the CC license posted earlier in this page.