Intro and Raspberry Pi Setup

Greetings! I will be using this blog to keep track of all of the interesting things that I am working on.

I recently acquired a Raspberry Pi. I will show an overview of how to set it up, as well as a few details that I found useful that other instructional resources online did not include. I will also show how to setup the 7" touchscreen, install a touchscreen keyboard, and how to take screenshots.

The model I have is a Raspberry Pi 3 Model B V1.2.

Raspberry Pi Setup:

Step 1: Install the appropriate software on the SD card

Connect your mini SD card to your computer. You may need an adapter.

Visit this website and select the NOOBS (New Out Of the Box Software). Then, download the ZIP file of NOOBS, not NOOBS Lite. Unzip the file and move its contents onto the SD card. Eject the SD card from your computer and insert it into the Raspberry Pi.

Step 2: First time setup

Here is the function of all the different parts of the Raspberry Pi:

Plug the Pi into a power source. Then attach a USB keyboard, USB mouse, and an HDMI monitor.


If prompted for an option between Raspbian and Data Partition, choose Raspbian. The graphical desktop should now boot up!

Mini Project:

As a test to see if the Raspberry Pi was actually functional, I decided to complete one of the starter projects Raspberry Pi has online, called Where is the Space Station? The goal is to use Python to determine the current location of the Space Station relative to a world map.

The project involved writing Python code in an online text editor to get various information about the Space Station (i.e. current astronauts) and display the location of the ISS relative to a world map. The code can be found here. Below is a picture of the project.

Touchscreen Setup:

I also acquired a touchscreen for the Pi found here. Setting up the touchscreen required a bit of wiring and hardware setup. Here are the steps:

Step 1: Attach the green adapter board to the display by inserting the black ribbon.

The green adapter board handles power, signal, and touch input conversion.


Note that to insert the ribbon, the small black handles on either side of the port must be pulled up (left picture). Once the pin is inserted, push down on the small black handles (right picture).


Step 2: Attach the smaller ribbon cable as shown in the picture.

Step 3: Screw in the 4 stand-offs as shown below


Step 4: Insert the blue and white DSI ribbon cable

I found that the orientation of the white and blue ribbon when inserted did not matter.


The other end of the cable goes into the main Raspberry Pi unit. We can then insert the 4 screws into the stand-offs to firmly attach the Raspberry Pi to the adapter board.

Step 5: Attach the two wires.

Attach the power input and the screen should start to boot up.




Touchscreen Keyboard Setup:

Now that the touchscreen works, you can essentially replace your monitor and mouse because  touching the screen acts as the mouse. However, the keyboard was still required for typing. There is a package online that can be downloaded that places a keyboard window on the screen.To download it, open up terminal on the Pi and enter in the following commands to the prompt.

sudo apt-get update
sudo apt-get upgrade

Those are required to make sure your machine is up to date. Now we install the actual package:

sudo apt-get install matchbox-keyboard

Then we reboot the system:

sudo reboot

Now, to access the keyboard, select Menu -> Accessories -> Keyboard.


The buttons on the keyboard are a on the small side and it gets annoying to have to switch between the keyboard and other applications but we are now keyboard-independent.

Screen Capture:

Taking a screenshot requires downloading a package. Open up terminal and type in the following command:

sudo apt-get install scrot

There are two ways to take a screen shot.

Method 1:

In the terminal, simply type scrot. The screenshot will save itself in "/home/pi".

Method 2:

Since the first method involves having terminal in the way of your screenshot, there is a way to take a delayed screenshot. The command is "scrot -d <n>" where n is the number of seconds you want to delay the shot being taken.

It might also be useful to change the location that scrot saves screenshots to. The default is /home/pi.
To change it, type "scrot <location>/<name>.png" into terminal. The name is the name you give the screenshot.

Future work:

In the future I plan to work on some more interesting projects with the Raspberry Pi, such as turning the Pi into a TOR router, or creating a NAS (network attached storage). In addition, I will be trying to figure out how to write a window snap tool for Raspberry Pi.

Comments

Popular posts from this blog

board2board - collaborative whiteboard using object detection

Perceptron in Python and C++