Makeblock Raspberry Pi User manual

Raspberry Pi
QUICK START GUIDE

Setting up your Raspberry Pi
Congratulations on your purchase from OOB and welcome to the exciting world
of the Raspberry Pi !
To setup your Raspberry Pi, you will typically need the following items:
1. MicroSD card (pre-loaded with NOOBS*)
2. Set of heat sinks to keep the Raspberry Pi running cool
3. Case to hold and protect your Raspberry Pi. Fans will also keep the Raspberry
Pi cool
4. USB MicroSD card readerfor use on your PC or Mac in case you need to
re-program the MicroSD card.
5. Micro-HDMI cable
6. 5V/3A DC Output MicroUSB power adapter
7. USB keyboard and mouse [Not Inclued]
8. HDMI monitor [Not Inclued]
9. Ethernet cable for connection to a wired network [Not Inclued*]
• NOOBS is designed to make it easy to select and install operating systems
for the Raspberry Piwithout having to worry about manually imaging your
MicroSD card.
• Raspberry Pi 4 comes with Gigabit Ethernet, along with onboard wireless
networking and Bluetooth.
WELCOME

Setting up your Raspberry Pi
Step 1 Introduction
Step 2 Technical Specifications
Choice of RAM
More powerful
processor
USB - C
Power
supply
MICRO HDMI PORTS
Supporting 2 × 4K displays
Gigabit
Ethernet
USB 3
USB 2
2GB 4GB
The Raspberry Pi is a small computer ‒ a very small computer.
It consists of mostly the same parts as a standard desktop computer or
laptop. A central processing unit (CPU) acts as a brain, random access
memory (RAM) and long-term storage devices are used to hold data, a video
display shows you what is happening, and you interact with all of this using
mice,keyboards, joysticks, and other universal serial bus (USB) devices.
The Pi may be less powerful than your Windows PC or Macintosh, but it is still
impressive that it fits all of this on a board only slightly larger than a credit
card.

Setting up your Raspberry Pi
Step 3 Basic Setup
Fitting a Heat Sink
When the components in a computer
system work hard, they generate heat.
And above a certain level, this heat can
reduce the lifespan of the components
or even break them altogether.
A Heatsink Armor Case is a carefully
designed block of metal that takes the heat away from the electronic component
and then passes it into the air surrounding the device.
There are three chips on a Raspberry Pi that can get very hot if the device is working
hard. Using 3 pieces thermal pads to touch the shell body for dissipating heat.
﹢
﹣

Setting up your Raspberry Pi
In the next chapter, you will learn about Raspberry Pi operating systems (in par-
ticularly, Raspbian Linux) and how to install them onto an SD card. This will com-
plete the set-up of the Pi. Inserting and Removing SD Cards It is likely that you
will need a memory card with more than 2 GB capacity, if you are intending to
run an operating system on the Pi. MicroSD cards are widely available and gener-
ally very cost-effective.
To insert an SD card:
1. Shut down the Raspberry Pi from the button on the power cable.
2. Locate the SD card socket on the underside of the Pi's board.
3. When looking from above, the SD card's contacts should be facing up.
4. Gently, push the SD card into the socket.
Step 4 SD Cards
Connecting Power
Power is fed to the Pi through the Type-C socket or, if you have a suitable
connector, through the general purpose input output pins. However, provid-
ing power through the GPIO header pins bypasses the on-board protection cir-
cuitry that is designed to prevent damage to the device. For this reason, it
should only be attempted by people who are experienced in building electron-
ic circuits.
Connecting a Display
HDMI offers a high-quality video and audio signal, and is the preferred way
of connecting all models of Raspberry Pi to a modern television. To connect a
high-definition television: Plug one end of an HDMI cable into the Raspberry
Pi's HDMI socket, and the other end into an HDMI input on your TV.

Raspberry Pi - AI & IoT
To remove the SD card: Gently pull the card out.
When inserting and removing SD cards in other computers, it is not always nec-
essary to turn off the device. However, as the memory card contains its operat-
ing system, the Pi may access it at any time. Removing the card while the Pi is
accessing it can corrupt data and, in extreme cases, may stop the card working
at all.
Raspbian and linux
An operating system (OS) is a unique type of application that you run on your
computer. It is an environment in which many other applications can run at the
same time, with a consistent user interface and sharing the same resources.
Microsoft Windows and Apple's Mac OS X are probably the two most well-known
operating systems, but there are others.
Raspbian is a Linux distribution that is based on Debian, another popular ver-
sion of Linux. It is designed for the Raspberry Pi and is the OS recommended
by the Raspberry Pi Foundation. Once you are familiar with Raspbian, you will
find that you are able to use other varieties of Linux without much help.
Installing Raspbian

Raspberry Pi - AI & IoT
Installation of Raspbian with NOOBS
New out of Box Software (NOOBS) is a tool that you can run on your Raspberry
Pi, and it will help you install an OS. It stays on the SD card, even after the OS in-
stalled, and you can also use it to edit the Pi's main configuration file or replace
the installed OS. The SD card supplied with your Pi already contains NOOBS.
Installing Raspbian
To install Raspbian, you will need to connect a keyboard, mouse, and display
to your Pi. First, ensure the Pi is completely off and unplugged, and then insert
the SD card into the Pi's memory card socket. Reconnect the power to your Pi.
The Pi will start and load the NOOBS tool.
To install Raspbian:
1. Click the box next to Raspbian.
2. On the toolbar, click Install. When the installation is complete, the Raspberry
Pi restarts and loads the raspi-config tool.

Raspberry Pi - AI & IoT
Raspbian's Desktop Environment
Raspbian's desktop is similar to Microsoft Windows and many of the ways that
you use it are the same. To interact with icons and buttons, click them with the
mouse. If you right-click an icon, Raspbian displays a context menu. The options
in a context menu only apply to the item that you clicked.
The desktop takes up most of the screen. This is where your programs will
appear when you start them. And if you save files to the /home/pi/Desktop
directory then you can see links to these files appear on the desktop.

Raspberry Pi - AI & IoT
Using Raspberry Pi to learn Python Robotics Programming
AI & IoT with mBlock
mBlock is an all-in-one coding platform tailored to coding education.
With mBlock, you may easily create games, animations and program robots by
dragging and dropping blocks, or through writing Python. Moreover, mBlock
comes with AI, IoT, data science features for cutting-edge computer science
learning, making it the perfect helper for coding educators and learners.
mBlock is available in Raspbian.
Using Chromium to open https://ide.mblock.cc/#/?en-raspberry to program
online.

Raspberry Pi - AI & IoT
Scratch 3.0 based and enhanced
Program by dragging and dropping blocks.
• Import and edit Scratch 2.0 and Scratch 3.0 projects.
• Compatible with Scratch teaching resources.
• Enhanced with practical features like “Centering a costume”.
• More clear user interface by separating "Device" and "Sprite” coding section.
Center a costume

Raspberry Pi - AI & IoT
Code with PythonBlock-based Coding
Progress from block- to text-based coding
• Compare code and blocks side-by-side, making the transition from block- to
text-based programming intuitive and straightforward.
• Code with Python or Arduino C.
• Drive hardware with Python.
User Share: https://bit.ly/rpipython

Gather data via Codey
• Recognize speech, printed and written text; analyze age and emotion
from people's faces.
• Help students create interactive projects with the data models trained
via machine learning.
User Share:https://bit.ly/rpidata1
Official Guide:https://bit.ly/rpidata2
• Gather data via Codey Rocky and visual volume data. Work with Google
Sheet or data chart for data science education. Collect and visualize data
on the Internet.
Codey Rocky user case: https://bit.ly/rpidata3
Data chart user case: https://bit.ly/rpidata4
Practical AI and IoT features for data science education
Raspberry Pi - AI & IoT

•Code for all the Makeblock robots.
•Connect and code for open-source hardware, including Arduino and micro:bit,
and over 500 sensors.
•Bridge robots and the Internet through broadcasting in the cloud.
•Visualize the learning outcome via connecting code to real-life.
Code for robots and devices
Raspberry Pi - AI & IoT

•More than 500 ready-to-use block extensions (Over 400 extensions are contributed
by users).
• Customize coding blocks for existing devices or add new device to mBlock.
• Parameter settings and graphical UI reduce development efforts.
• Detailed developer documentation and rich case studies.
• https://bit.ly/rpimblockext
Help Document:
https://bit.ly/rpihelp
Customize mBlock with Extension Builder
Raspberry Pi - AI & IoT

Raspberry Pi - AI & IoT
Raspberry Pi Camera
1. Overview Raspberry Pi Camera uses Raspberry Pi 4 Model B and a
camera to capture, process and recognize images.
It allows you to obtain the geometric information of letters, like position, size,
and distance. Combined with NovaPi, the Raspberry Pi Camera can be used to
build a robot that can automatically recognize objects.
Raspberry Pi is powered by Power Shield, which has a Bluetooth Module port
and a cooler to draw heat away from the Raspberry Pi.
2. Components
Raspberry Pi
Model: Raspberry Pi 4 Model B
USB ports
Ethernet port
SD card

Raspberry Pi - AI & IoT
Raspberry Pi Camera
Ethernetport
SDcard
USBports
Output formats: MJPEG/YUV2 (YUYV)
Operating voltage: 5V
Lens: 6mm
Adjustable parameters: brightness, contrast, color saturation, brilliance,
gamma, white balance, backlight, exposure, flip
Max current: 4A
3. How to install
Done!
M2.5*6 mm
M2.5*6 mm
1 2 3
4

Raspberry Pi - AI & IoT
Raspberry Pi Camera
4. Set up the hardware
Note: Make sure the accompanying SD card is well inserted
into the Raspberry Pi.
NovaPi
Micro USB Cable
Raspberry Pi & Power Shield Assembly
USB Camera
Bluetooth
Module
XT60_XT30/DC One
with Three Power Cords XT60_XT30/DC One
with Three Power Cords
LI-PO Battery
5V General Cable
5V General Cable
Me Power
Management Module
USB NIC
Ethernet Cable
Connecting Computer
5. Connect to mBlock
(1) Open mBlock and add "Raspberry Pi Camera" from the Device Library.

Raspberry Pi - AI & IoT
(2) Check whether the browser blocks some content. If it does, click Load
unsafe scripts.
(3) Click Connect at the lower left to connect the device to mBlock.
(4) Test the Raspberry Pi Camera with the program below.Click Upload
when you finish the program.
(5) If a real-time camera preview appears on the stage, that means the
Raspberry Pi Camera is working.

Raspberry Pi - AI & IoT
6. Coding blocks
Event
This event is generated when the main program of the Raspberry
Pi Camera is executed. Place this block at the beginning of a
script.
Category Coding block Description
Image
This block turns on the camera.
This block turns off the camera.
This block detects a specified letter of a specified size. It also gath-
ers geometric information about the letter, such as center coordi-
nate X/Y, external rectangle width/height, area, distance to the
camera, and deflection angle.
7. Firmware updates
Click Setting → Update Firmware. In the pop-up window, click Update Guide.
Then follow the instructions to complete the firmware updates.
8. Example programs
Switch between modes
Description:
(1)Auto mode: the system first detects its distance to the letter "M"; if it's far
from the letter, it approaches the letter at a higher speed; if it's close to the
letter, it approaches the letter at a lower speed.
(2)Manual mode: the motor rotates only when you press button 1 on the Blue-
tooth Controller.

Raspberry Pi - AI & IoT
Center the letter
Description: the camera keeps moving left and right until the letter "M" appears
within the range of ±30 pixels around the center of the frame.
Note: The resolution is 640 x 480 pixels.
Table of contents
Other Makeblock Microcontroller manuals
Popular Microcontroller manuals by other brands

Digi
Digi XBee ZigBee Cloud Kit Getting started guide

Fujitsu
Fujitsu MB91460 SERIES Application note

Arcom
Arcom MERLIN (ROM-DOS/Sockets) Technical manual

Silicon Laboratories
Silicon Laboratories C8051F41 Series user guide

Holtek
Holtek HT32F54231 user manual

Thundercomm
Thundercomm TurboX C6490P quick start guide