Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 21

Single Board

Computer
Programming
Single Board Computer
 A single-board computer (SBC) is a
complete computer built on a single circuit
board, with microprocessor(s), memory,
input/output (I/O) and other features
required of a functional computer.
 Single-board computers are commonly
made as demonstration or development
systems, for educational systems, or for use
as embedded computer controllers.
 Many types of home computers or portable
computers integrate all their functions onto
a single printed circuit board.
Common Specification

 Unlike a desktop personal computer, single board computers often do not rely on
expansion slots for peripheral functions or expansion.
 Single board computers have been built using a wide range of microprocessors.
Simple designs, such as those built by computer hobbyists, often use static RAM.
 Support Linux, Android or even Windows Operating System
 Built in several programming language, self compiling and code execution in the
machine itself.
 Supported Programming language depends on the host operating system
Common Specification

 Fixed capacity of RAM, usually 512 MB up to 4 GB


 Most use Micro SD card for main storage for operating system, files and others.
Some variants use flash memory with higher price but have faster read write
speed
 HDMI display to external LCD monitor, no VGA, no DVI
 Some USB Ports, 100 Mbps up to 1 Gbps Ethernet
 Some variants has embedded wifi, external USB wifi can be attached
 USB powered 5V 2A = 10 Watt power consumption
 Embedded GPIO for outside sensing and controlling
Raspberry Pi

 The current version is the Raspberry Pi Model


4 B, released in June 2019. Topline specs are a
1.5GHz 64-bit quad-core processor, Gigabit
LAN, Bluetooth 5.0/BLE, and Power-over-
Ethernet support (with separate PoE HAT). For
the first time, a Raspberry Pi comes with a
choice of 1, 2 or 4 GB of RAM.
Orange Pi
 The Orange Pi 3 features packs a H6 Quad-core 64-bit
1.8GHZ ARM Cortex-A53 CPU, 2GB DDR3 RAM, four
USB 3.0 ports, support for 4K displays via HDMI 2.0a,
Gigabit Ethernet, onboard mPCIe 2.0, and Bluetooth 5.0.
 It has been stated that the board officially supports
Android 7.0, Ubuntu and Debian images.
 You can use the Orange Pi 3 similarly to the Raspberry Pi
4 like building a computer, retro game console, media
center, etc.
 However, compared to the Raspberry Pi 4, it may have
poor driver support and missing software with unstable
versions of older operating systems. Similar to the
previous alternatives, if you are a beginner, it is not
recommended to get the alternatives but get a Raspberry
Pi 4 instead as you will have to debug and solve issues on
your own with a small and growing community of the
alternatives.
Banana Pi
Rock Pi
Odroid
Beagleboard
Latte Panda
 Latte Panda occupies a unique position as a
Raspberry Pi alternative; it’s the first single
board computer to run a full version of
Windows 10, which comes preinstalled. To
make such a thing possible, it boasts an Intel
Atom Cherry Trail Z8300 Quad Core 1.8GHz
processor with 2GB DDR3 RAM and Intel HD
Graphics GPU.
 It also has three USB ports, integrated WiFi and
Bluetooth 4.0, and an Arduino-compatible co-
processor that allows it to be used as an
Arduino board to control electronics attached to
its 20 GPIO pins. Elsewhere, there’s support for
HDMI and Fast Ethernet, and a microSD slot
that supports up to 32 GB storage.
Raspberry Pi GPIO
 A powerful feature of the Raspberry
Pi is the row of GPIO (general-
purpose input/output) pins along
the top edge of the board. A 40-pin
GPIO header is found on all current
Raspberry Pi boards (unpopulated
on Pi Zero and Pi Zero W). Prior to
the Pi 1 Model B+ (2014), boards
comprised a shorter 26-pin header.
 Any of the GPIO pins can be
designated (in software) as an input
or output pin and used for a wide
range of purposes.
 As well as simple input and output devices, the GPIO pins can be used with a variety of alternative
functions, some are available on all pins, others on specific pins.
 PWM (pulse-width modulation)
 Software PWM available on all pins
 Hardware PWM available on GPIO12, GPIO13, GPIO18, GPIO19
 SPI
 SPI0: MOSI (GPIO10); MISO (GPIO9); SCLK (GPIO11); CE0 (GPIO8), CE1 (GPIO7)
 SPI1: MOSI (GPIO20); MISO (GPIO19); SCLK (GPIO21); CE0 (GPIO18); CE1 (GPIO17); CE2 (GPIO16)
 I2C
 Data: (GPIO2); Clock (GPIO3)
 EEPROM Data: (GPIO0); EEPROM Clock (GPIO1)
 Serial
 TX (GPIO14); RX (GPIO15)
Programming with GPIO
 It is possible to control GPIO pins using a number of programming languages and tools. See the
following guides to get started:
 GPIO with Scratch 1.4
 GPIO with Scratch 2
 GPIO with Python
 GPIO with C/C++ using standard kernel interface via libgpiod
 GPIO with C/C++ using 3rd party library pigio
 GPIO with Processing3

 Warning: while connecting up simple components to the GPIO pins is perfectly safe, it's
important to be careful how you wire things up. LEDs should have resistors to limit the current
passing through them. Do not use 5V for 3V3 components. Do not connect motors directly to
the GPIO pins, instead use an H-bridge circuit or a motor controller board.
Real Application
 Cashier Machine
Real Application
 Multimedia Player / Media Center
for Smart TV
 XBMC
 KODI
Real Application – Programming
Language
 Web server Apache, Nginx
 Database : MySQL, Postgresql
 CMS : joomla, wordpress,
 Elearning : Mooddle
 PHP
 NodeJS
 GoLang
 Python
 etc
Real Application – CCTV Camera
Real Application – Home Automation
Real Application – Object Detection
Real Application – Game Console

You might also like