Quickly create an environment where you can play with Raspberry Pi 4 (target 1 hour)

Purpose of the article

It is not an advanced version. I want to program AI with Ptyhon, or I want to connect a device to study IoT and play with it. AFAP (as soon as possible) creates an environment where you can do various things for Atana and me. The memorandum.

If you agree with the idea of ​​making 2021 a habit of taking notes like this, please LGTM.

1. Buy

I will write from where I buy it. Procured by Amazon. I mean, it's impossible for an hour to enter here. ・ Main body Raspberry Pi 4 8GB * It is unknown that it needs to be 8GB https://www.amazon.co.jp/gp/product/B0891RC99L/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1

・ Case, power cable, fan https://www.amazon.co.jp/gp/product/B07H2WKYBF/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1

-HDMI conversion cable * There was an HDML compatible display and cable. https://www.amazon.co.jp/gp/product/B07QBZ667V/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1

In addition, I had a MicroSD card, a USB keyboard, and a USB mouse.

2. OS setup

While waiting for arrival, write the OS (Raspbian) for Raspberry Pi to MicrosSD. It takes time, so I let it rest overnight.

For download and installation, I referred to the following by ITmedia. https://www.itmedia.co.jp/news/articles/2006/05/news031.html

3. Assembly & initial setup

Set up the display, mouse, keyboard and MicrosSD while looking at the instructions Finally, connect the power supply and start Gundam!

First input the initial settings according to the guidance of the OS It's English, but I think it's okay. The most important thing is to connect to Wifi.

4. SSH or VNC connection

** Once this is done, you will be able to operate from Windwos or Mac connected to the same Wifi, so you can disconnect the keyboard, mouse and display cable and it will be refreshing **

・ Refer to the following site to allow SSH and VNC on the Raspberry Pi side, install VNC software, and connect. https://dev.classmethod.jp/articles/raspberry-pi-4-ssh-vnc-remote/

-If you don't have SSH in Windows, Windwos Terminal is recommended because it is easy to use, which is not like Microsoft. https://www.microsoft.com/ja-jp/p/windows-terminal/9n0dx20hk701

If you can confirm the connection, let's take the cable!

5. Editor (Vi) preferences

It was a little difficult to use with the initial settings. I can't use the arrow keys or backspace. ・ Sudo vi ~/.vimrc ・ Sudo vi /root/.vimrc Execute the two, write the following in both and save.

set nocompatible
set number
set backspace=indent,eol,start
set autoindent
set smartindent
set tabstop=4
set shiftwidth=4

Normally, the user looks at the upper file, and SUDO seems to look at the settings in the lower file, so create both.

We are still practicing vi input, so let's practice together. https://prev.net-newbie.com/linux/commands/vi.html

6. Fixed IP address

If the IP address is dynamic, SSH and VNC cannot connect, I will have to take out the cable again next time, so Set up the IP assigned to the Raspberry Pi to use again next time.

https://mugeek.hatenablog.com/entry/2019/05/27/230256

You only need to change three places, but since the setting value changes depending on the home environment, sample values ​​are not listed here. Please respond while checking.

7. Software update

Let's do it somehow Connect to SSH and execute the following

sudo apt-get update
sudo apt-get upgrade -y

8. Raise tension with Hollywood

It is a story app that can display a hacker-like screen and make a sloppy face. The tension will rise, so let's set one goal.

sudo apt install hollywood
hollywood

(・ ´ ー ・ `) Doya

9. End!

It arrived in 10 minutes with Amazon Prime, so it ended in 1 hour. I think that the working environment is now complete, but I haven't done much like Raspberry Pi so far, so I'd like to play with it from here.

You can connect the sensor to get it and upload it to Google Spreadsheet, https://qiita.com/c60evaporator/items/283d0569eba58830f86e

Try setting up a proxy server to monitor various communications https://qiita.com/mascii/items/400a0ecab61d885ac2a8

Install Django and try developing various things on a simple web server https://qiita.com/Taro_man/items/19613663ef7bb3c57d4f

Please do a lot of interesting things and share them on Qiita. If I make something, I would like to upload it.

Recommended Posts

Quickly create an environment where you can play with Raspberry Pi 4 (target 1 hour)
Create an environment with virtualenv
Create an LCD (16x2) game with Raspberry Pi and Python
Build an environment on windows10 where you can try MXNet
I tried to create an environment where you can have a fun Zoom meeting with Linux (Ubuntu) + Zoom + OBS Studio + sound effects
Build a Tensorflow environment with Raspberry Pi [2020]
Quickly create an excel file with Python #python
Create a socket with an Ethernet interface (eth0, eth1) (Linux, C, Raspberry Pi)
[Python] Quickly create an API with Flask
Operate an oscilloscope with a Raspberry Pi
Create a car meter with raspberry pi
I tried to build an environment of Ubuntu 20.04 LTS + ROS2 with Raspberry Pi 4
You can easily create a GUI with Python
Play with your Ubuntu desktop on your Raspberry Pi 4
Create an API server quickly with Python + Falcon
Build an Arch Linux environment on Raspberry Pi
You can create an interactive web application with Python alone [Strength finder dashboard creation]
Build an OpenCV4 environment on Raspberry Pi using Poetry
Make an umbrella reminder with Raspberry Pi Zero W
Create an OpenAI Gym environment with bash on Windows 10
Create an environment for test automation with AirtestIDE (Tips)
GPGPU with Raspberry Pi
DigitalSignage with Raspberry Pi
Play with the Raspberry Pi Zero WH camera module Part 1
Create a web surveillance camera with Raspberry Pi and OpenCV
Create an environment for "Deep Learning from scratch" with Docker
Minimum Makefile and buildout.cfg to create an environment with buildout
SSD 1306 OLED can be used with Raspberry Pi + python (Note)
Create a Todo app with Django ① Build an environment with Docker