Setting up the Raspberry Pi with a 7-inch touchscreen

Overview


In this tutorial, I will show steps for setting up the Raspberry Pi 3B with a 7-inch touchscreen. Later, I will add a dual camera support. As usual, I am doing most of the work on the MacBook Pro, but the steps will easily translate to another operating system (Windows, or Linux).

I have ordered the touchscreen display a while ago and it's been sitting on my bench, but right now I am working on the image recognition in my car (a separate tutorial) and I would like to see what I am capturing, also to be able to start and to stop the process from a touchscreen.

I have ordered the case for the setup, but I have to see how it would work for me as I need a stereo (or rather dual) cameras that will require an additional pair of Raspberry Pi boards. I do not believe that Pi Zero will do, as I will do a heavy pre-processing of the images before sending them to the Machine Learning model.



There is also a 10.1-inch (1280x800) capacitive touchscreen available, but this might be for the next stage of the project.

The products mentioned are shown below:


Raspberry Pi 3B 7-inch touchscreen 7-inch case 10.1 touchscreen Infrared camera





Download SD Card Formatter for Mac


https://www.sdcard.org/downloads/formatter_4/eula_mac/index.html


Format the SD card




Download Raspbian with Desktop


https://www.raspberrypi.org/downloads/raspbian/


UZip the Rasbian OS and you get .img

2018-10-09-raspbian-stretch.zip
2018-10-09-raspbian-stretch.img

Check where is your SD Card mounted

$ diskutil list
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *15.9 GB disk2
1: Windows_FAT_32 PI3_RASBIAN 15.9 GB disk2s1

Unmount your SD Card




$ sudo diskutil unmountDisk /dev/disk2
Password:
Unmount of all volumes on disk2 was successful

 Put the image on the SD Card


$ sudo dd bs=1m if=/Users/uki/Downloads/2018-10-09-raspbian-stretch.img of=/dev/disk2
3944+0 records in
3944+0 records out

4135583744 bytes transferred in 3019.441172 secs (1369652 bytes/sec)

Wait a long time with no feedback.

Eject the SD Card


$ sudo diskutil eject /dev/disk2
Password:

Disk /dev/disk2 ejected

Insert the SD Card into the Raspberry Pi

Make sure you insert the SD Card correctly, the slot is under the Display ribbon.

Connect pins


  • --- RED 5V
  • --- BLACK Ground
  • --- GREEN (serial data) - SDA1 I/O I2C bus
  • --- YELLOW(system clock) - SCL1 I2C bus

The pin layout for Raspberry 2 and 3 is the same.







References: