Raspberry Pi Computer Architecture Essentials

 
 
Packt Publishing Limited
  • 1. Auflage
  • |
  • erschienen am 22. März 2016
  • |
  • 232 Seiten
 
E-Book | ePUB mit Adobe DRM | Systemvoraussetzungen
978-1-78439-860-6 (ISBN)
 
Explore Raspberry Pi's architecture through innovative and fun projectsAbout This BookExplore Raspberry Pi 2's hardware through the Assembly, C/C++, and Python programming languagesExperiment with connecting electronics up to your Raspberry Pi 2 and interacting with them through softwareLearn about the Raspberry Pi 2 architecture and Raspbian operating system through innovative projectsWho This Book Is ForRaspberry Pi Computer Architecture Essentials is for those who are new and those who are familiar with the Raspberry Pi. Each topic builds upon earlier ones to provide you with a guide to Raspberry Pi's architecture. From the novice to the expert, there is something for everyone. A basic knowledge of programming and Linux would be helpful but is not required.What You Will LearnSet up your Raspberry Pi 2 and learn about its hardwareWrite basic programs in Assembly Language to learn about the ARM architectureUse C and C++ to interact with electronic componentsFind out about the Python language and how to use it to build web applicationsInteract with third-party microcontrollersExperiment with graphics and audio programmingExpand Raspberry Pi 2's storage mechanism by using external devicesDiscover Raspberry Pi 2's GPIO pins and how to interact with themIn DetailWith the release of the Raspberry Pi 2, a new series of the popular compact computer is available for you to build cheap, exciting projects and learn about programming.In this book, we explore Raspberry Pi 2's hardware through a number of projects in a variety of programming languages. We will start by exploring the various hardware components in detail, which will provide a base for the programming projects and guide you through setting up the tools for Assembler, C/C++, and Python. We will then learn how to write multi-threaded applications and Raspberry Pi 2's multi-core processor. Moving on, you'll get hands on by expanding the storage options of the Raspberry Pi beyond the SD card and interacting with the graphics hardware. Furthermore, you will be introduced to the basics of sound programming while expanding upon your knowledge of Python to build a web server. Finally, you will learn to interact with the third-party microcontrollers.From writing your first Assembly Language application to programming graphics, this title guides you through the essentials.Style and approachThis book takes a step-by-step approach to exploring Raspberry Pi's architecture through projects that build upon each other. Each project provides you with new information on how to interact with an aspect of the Raspberry Pi and Raspbian operating system, providing a well-rounded guide.
  • Englisch
  • Birmingham
  • |
  • Großbritannien
978-1-78439-860-6 (9781784398606)
1784398608 (1784398608)
weitere Ausgaben werden ermittelt
Andrew K. Dennis is the manager of professional services software development at Prometheus Research. Prometheus Research is a leading provider of integrated data management for research and is the home of HTSQL, an open source navigational query language for RDBMS.
Andrew has a diploma in computing, a BSc in software engineering, and is currently studying for a second BSc in creative computing in his spare time.
He has over 12 years of experience working in the software industry in the UK, Canada, and the USA. This experience includes e-learning courseware development, custom CMS and LMS development, SCORM consultancy, web development in a variety of languages, open source application development, blogging about the integration of web technologies with electronics for home automation, and punching lots of Cat5 cables.
His interests include web development, e-learning, 3D printing, Linux, the Raspberry Pi and Arduino, open source projects, home automation and the use of web technology in this sphere, amateur electronics, home networking, and software engineering.
  • Cover
  • Copyright
  • Credits
  • About the Author
  • About the Reviewer
  • www.PacktPub.com
  • Table of Contents
  • Preface
  • Chapter 1: Introduction to the Raspberry Pi's Architecture and Setup
  • History and background of the Raspberry Pi
  • Raspberry Pi hardware specifications
  • Dimensions
  • System on Chip
  • CPU
  • GPU
  • SDRAM
  • 4 USB 2.0 ports and 1 SoC on-board USB
  • MicroSD card port
  • Ethernet port
  • Audio
  • GPIO pins
  • Video - analog TV out
  • Video - HDMI port
  • Basic hardware needed
  • The microSD card - the main storage and boot device of the Raspberry Pi 2
  • Preinstalled microSD card versus creating your own
  • The NOOBS operating system installation manager
  • Downloading the latest version of Raspbian
  • Setting up your microSD card and installing the Raspbian operating system
  • Raspbian installation wrap-up
  • Check SSH is running
  • RSA key generation for SSH
  • Assign a static IP to your Raspberry Pi 2
  • Installing Screen and Vim
  • Vim - an optional handy text editor
  • Running tests on the OS and configuration changes
  • Diagnostic tests
  • Over and underclocking the Raspberry Pi
  • Going further - testing the GPIO pins
  • Some handy Linux commands
  • Troubleshooting
  • Summary
  • Chapter 2: Programming on Raspbian
  • Which programming languages?
  • Assembly language
  • Assembling and linking
  • The C and C++ languages
  • C - a brief introduction
  • A quick look at C++
  • Our first C program
  • Geany - a handy text editor and development environment
  • Creating a new C program
  • C libraries - a trove of reusable code
  • The C (and C++) compiler
  • Compiling and running our application
  • The Python language
  • A simple Python program
  • Running a Python program from a file
  • Summary
  • Chapter 3: Low-Level Development with Assembly Language
  • Back to basics
  • Multiline comments
  • Directives
  • Single line comments
  • Registers
  • Branching
  • The assembler
  • The linker
  • Makefiles
  • Memory and addresses
  • The .data directive
  • The .balign directive
  • Words
  • Labels
  • The memory
  • The addresses
  • LDR and SUB
  • Running our program
  • Adding power to our program - control structures
  • If else statements
  • Iteration
  • Testing our control structures
  • Summary
  • Chapter 4: Multithreaded Applications with C/C++
  • What are threads?
  • Thread types
  • User level threads
  • Kernel level threads
  • Hybrid threads
  • POSIX threads
  • Steps involved in implementing threads
  • Creation and termination
  • Synchronization
  • Scheduling
  • An example in C
  • Trying out our program
  • A C++ equivalent
  • The g++ command
  • Going further - mutexes and joins
  • Compile and test
  • Summary
  • Chapter 5: Expanding on Storage Options
  • Booting up
  • Setting up the external HDD
  • Getting the disk name
  • Setting up the HDD
  • Modifying cmdline.txt
  • Network-attached storage (NAS)
  • Installing Samba
  • Testing the NAS
  • Mac
  • Linux
  • Windows
  • Summary
  • Chapter 6: Low-Level Graphics Programming
  • VideoCore IV GPU
  • Sample programs
  • Accessing the frame buffer
  • Check the display settings
  • Testing our C code
  • Filling the screen with a color
  • A C program to turn the screen red
  • Compile and run the C program
  • Drawing a line
  • Plotting pixels and drawing lines
  • Compile and run
  • Next steps - polygons
  • Summary
  • Chapter 7: Exploring the Raspberry Pi's GPIO Pins
  • Introduction to GPIO pins
  • Standard GPIO
  • I2C
  • Serial Rx and Tx
  • SPI
  • PWM and PPM
  • GPIO power voltages
  • Hardware choices
  • Prototyping shields and boards
  • Cooking Hacks Arduino bridge shield
  • Connecting directly to the GPIO pins
  • Switching an LED on and off
  • Setting up the hardware
  • C blinking LED program
  • Python blinking LED program
  • Reading data from the GPIO pins in Python
  • Summary
  • Chapter 8: Exploring Sound with the Raspberry Pi 2
  • Introduction to the Raspberry Pi's sound
  • Configuring the audio output
  • Setting the audio output
  • Interacting with audio through GPIO
  • Installing the audio drivers
  • Hardware setup
  • Loading drivers
  • Getting some drum tracks
  • Python drum machine
  • Audio shields for the Raspberry Pi
  • C and ALSA
  • ALSA examples
  • Introducing Sonic Pi
  • Setup
  • Experimenting with Sonic Pi
  • Summary
  • Chapter 9: Building a Web Server
  • Introduction to web servers
  • HTTP requests
  • HTML
  • Popular web servers available on the Raspberry Pi
  • Apache
  • NGINX
  • Building a Python web server
  • Python web server code
  • Adding an index page and a favicon
  • Adding database support
  • SQLite
  • SQL - a quick overview
  • Python program with SQLite support
  • Flask - displaying database data via Python
  • Next steps
  • Summary
  • Chapter 10: Integrating with Third-Party Microcontrollers
  • Genuino/Arduino microcontroller
  • Setting up the Arduino software
  • Installing the IDE on your Raspberry Pi 2
  • A quick guide to the Arduino IDE
  • Integration with Arduino
  • Serial communication over USB
  • Communication between the Arduino and Raspberry Pi via GPIO
  • Communication over I2C
  • Communication over the Web
  • Summary
  • Chapter 11: Final Project
  • Choose your storage mechanism
  • Building a Flask-based website
  • Adding a database
  • A basic website
  • Web forms
  • Add
  • Edit
  • Adding in an LED
  • Building the circuit - a recap
  • Integrating with our Python app
  • Extending the project further
  • Replace the LED with a screen
  • E-mail support
  • Playing a sound
  • Summary
  • Index

Dateiformat: EPUB
Kopierschutz: Adobe-DRM (Digital Rights Management)

Systemvoraussetzungen:

Computer (Windows; MacOS X; Linux): Installieren Sie bereits vor dem Download die kostenlose Software Adobe Digital Editions (siehe E-Book Hilfe).

Tablet/Smartphone (Android; iOS): Installieren Sie bereits vor dem Download die kostenlose App Adobe Digital Editions (siehe E-Book Hilfe).

E-Book-Reader: Bookeen, Kobo, Pocketbook, Sony, Tolino u.v.a.m. (nicht Kindle)

Das Dateiformat EPUB ist sehr gut für Romane und Sachbücher geeignet - also für "fließenden" Text ohne komplexes Layout. Bei E-Readern oder Smartphones passt sich der Zeilen- und Seitenumbruch automatisch den kleinen Displays an. Mit Adobe-DRM wird hier ein "harter" Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.

Weitere Informationen finden Sie in unserer E-Book Hilfe.


Download (sofort verfügbar)

32,73 €
inkl. 19% MwSt.
Download / Einzel-Lizenz
ePUB mit Adobe DRM
siehe Systemvoraussetzungen
E-Book bestellen

Unsere Web-Seiten verwenden Cookies. Mit der Nutzung dieser Web-Seiten erklären Sie sich damit einverstanden. Mehr Informationen finden Sie in unserem Datenschutzhinweis. Ok