BCS Raspberry Pi Launch Events Getting started with Raspberry Pi

Similar documents
A Slice of Raspberry Pi

9 Output Devices: Buzzers

Gooligum Electronics 2015

RaRa Academy: Raspberry Pi. Karl Heinz Kremer - K5KHK

Adafruit's Raspberry Pi Lesson 1. Preparing an SD Card for your Raspberry Pi

TWO PLAYER REACTION GAME

Adafruit's Raspberry Pi Lesson 1. Preparing an SD Card for your Raspberry Pi

The Digital Revolution

Overview of the Raspberry Pi Models 3B & 2B

Getting Started Guide XC9010 Raspberry Pi Starter Kit

Raspberry Pi User Guide

University of Hull Department of Computer Science

SF Innovations Ltd. Custard Pi 3-8 Analogue input board for the Raspberry Pi GPIO. User Instructions (13th December 2016) Contents.

Experimental Procedure. Frequently Asked Questions (FAQ) Kit General Questions. Setting Up and Using Your Raspberry Pi Projects Kit

SF Innovations Ltd. User Instructions (5th January 2016) Contents. Introduction

Raspberry Pi User Guide, 2nd Edition

Uzebox JAMMA. Operation manual. (For Uzebox JAMMA Rev. C devices)

N A T H A N P R E N T I C E I 6 N T P

Cooking with Team 279

MultiJAMMA Switchboard Installation and User s Manual

Experiments 1 How to set up Raspberry Pi B+ The little computer you can cook into DIY tech projects

w w w. b a s e t r a i n i n g i n s t i t u t e. c o

Raspberry Pi Activity 2: My Binary Addiction...Reloaded

Raspberry Pi. Quick-Start Guide. Rev 1.0, Mar 2017

A Beginners Guide to Raspberry Pi

Raspberry Pi Workshop

TROUBLESHOOTING RASPBERRY PI USER GUIDE. Troubleshooting

PiRyte Mini ATX PSU Revision User Manual

RETROPIE INSTALLATION GUIDE

Intel Galileo gen 2 Board

PiRyte Mini ATX PSU Revision 1.0 User Manual

Raspberry Pi Introduction

Introduction to the Raspberry Pi AND LINUX FOR DUMMIES

Cabinet features. Display features. Picade X HAT features

Custard Pi 5 - Breakout board with protection for 8 digital I/O and stacking connector for the Raspberry Pi GPIO

A64-OLinuXino 64-bit open source embedded computer

LinkSprite Technologies,.Inc. pcduino V2

IOT HARDWARE SUBSTRUCTURE

Raspberry Pi 3 Model B

pcduino V3B XC4350 User Manual

A Low Cost Internet of Things Network for Contamination Detection in Drinking Water Systems Using Raspberry Pi

Contents. Please read and remember the following warnings before using the RELAYplate:

Grand Central Soundboard in Ten Minutes Created by Mike Barela. Last updated on :11:24 PM UTC

XLink Kai Raspberry Pi Beginners Tutorial

ARDUINO YÚN Code: A000008

CamJam EduKit Sensors Worksheet Five. Equipment Required. The Parts. The Passive Infrared Sensor

RASPBERRY PI EXAMPLES WITH CLICK BOARDS

Preassembled 40-pin Pi Wedge Hookup Guide

CSC 170 Introduction to Computers and Their Applications. Computers

OPi.GPIO Documentation

Basic Electronics and Raspberry Pi IO Programming

Programming Low-Cost Hardware Using Simulink Brian McKay MathWorks Technical Marketing

Tutorial 1: Software Setup

USER MANUAL FOR HARDWARE REV

Ding Dong, You've Got Mail! A Lab Activity for Teaching the Internet of Things

Beaglebone green User Manual

Raspberry Pi board. EB080

LCD Display. Other I/O. LCD display Flash ROM SPI EPROM Keyboard (PS/2) UART connectors DAC ADC. 2-line, 16 character LCD display

Starting from. An Introduction to Computing Science by Jeremy Scott LEARNER NOTES

Akshay Ravindra Bhasarkar 1, R. N. Mandavgane 2

mikropascal PRO for 8051

Java Programming on the Raspberry Pi with Pi4J. Rob Ratcliff

Advanced Embedded Systems

DESIGN OF LIGHTWEIGHT E- ATTENDANCE PROTOTYPE USING RASPBERRY PI

Computer Overview. A computer item you can physically see or touch. A computer program that tells computer hardware how to operate.

Adafruit Metro Mini. Created by lady ada. Last updated on :12:28 PM UTC

UM2375 User manual. Linux driver for the ST25R3911B/ST25R391x high performance NFC frontends. Introduction

Raspberry Pi Setup Tutorial

09/05/2014. Engaging electronics for the new D&T curriculum. Geoff Hampson Managing Director of Kitronik. Presentation overview

Programming the Raspberry Pi

Manual of ET-LCD SW HAT

参考資料. LinkSprite.com. pcduino V2

Raspberry Pi NTP Clock Setup Guide

ARDUINO YÚN MINI Code: A000108

Orange Pi 2 User Manual. <Version: V0.9 >

RPi General Purpose IO (GPIO) Pins

DevKit7000 Evaluation Kit

SEAS Computing Facility Raspberry Pi Workshop 2: I/O Camera & Motion Sensor. October 21, 2017

University of Hull Department of Computer Science C4DI Interfacing with Arduinos

So let s see if the MS Surface has given Apple Corp some ghostly shivers to worry about...

Grove Digital Extender 0059-GRVDE-DSBT/SF

Motherboard Central Processing Unit (CPU) Random access memory (RAM)

WHY APPLICATIONS ARE STILL DRAINING OUR BATTERIES and how we can help. Aaron Schulman & Sachin Katti

RASPBERRY PI. Using the GPIO port

Lab 0: Intro to running Jupyter Notebook on a Raspberry Pi

Windows 10 Automatic Backup

RaspiDigiHamClock. Raspberry Pi Amateur Radio Digital Clock. v WA4EFH R.Grokett

PDF created with pdffactory Pro trial version How Computer Memory Works by Jeff Tyson. Introduction to How Computer Memory Works

Boson Development Board <9hz Boson

MACCHIATO. S.T.E.M. Pack MINI DIGITAL SYNTHESIZER

Husarion CORE2. Husarion CORE2 is a development board for Internet-connected automation & robotic devices.

CS 326: Operating Systems. Lecture 1

revolution GETTING STARTED Appendix H - Frequently Asked Questions (FAQ). Section 1 92

I2C and SPI Foundation

Raspberry Pi Compute Development board

Creator Ci40 product brief

Raspberry Pi Setup. 5 HDMI NightScout Display Notes: Instructions to switch to chromium-browser highlighted in yellow.

Bluetooth Keyboard Setup Instructions

Atlys (Xilinx Spartan-6 LX45)

Pibrella & Python. What is it? Table of Contents

Transcription:

BCS Raspberry Pi Launch Events Getting started with Raspberry Pi Department of Computer Science 16 th & 17 th April 2013

Who are you? How many of you.. are teachers in STEM subjects in non STEM subjects have done some programming before own a Raspberry Pi

Roadmap Introduction to the Raspberry Pi device Deploying the Raspberry Pi What can you use a Raspberry Pi for? Getting started programming on the Pi Q & A

Raspberry Pi Introduction

What is the Raspberry Pi? The Raspberry Pi is a small computer system built onto a tiny circuit board It has around the same computing power as a modern Smartphone It runs a version of the Linux operating system (Debian)

What do I need to get started? You can buy a Pi for a very low price, but remember that you will need at least a case, keyboard, mouse, screen and power supply as well You can use the ones from your PC if you like The keyboard and the mouse must be USB The monitor must be HDMI (you can use composite but the quality is not very good) You will need a USB power supply and a micro-usb cable The Raspberry Pi can be a bit picky about some devices Best to seek out ones sold to work with the Pi

What can I connect a Raspberry Pi to? There are lots of connection options: USB peripherals HDMI monitor Wired network Stereo Audio You can even use input/output pins to link to electrical components

Data Storage on Raspberry Pi The Raspberry Pi has 256 or 512 Mbytes of RAM which is used for programs, data and graphics as it runs Instead of a hard disk it uses an SD card The SD card holds the operating system and data files used by programs You can buy an SD card pre-loaded with the operating system or you can use a PC to load an operating system onto an empty one

Running the Raspberry Pi When you turn the Raspberry Pi on it will go through a boot sequence This is just the same as any modern computer Once the system has booted you will log on to it Then you can start the X- Windows desktop for a windowed interface

Windows on Raspberry Pi The windowed interface on Raspberry Pi is quite familiar You can surf the web and there are also programs that are a bit like Microsoft Office that you can use But you must remember that you are using the same kind of processing power as you find in a Smartphone

Things worth knowing.. You can swap the SD card from one Raspberry Pi to another with no problems If you completely break the operating system on an SD card it is easy to copy a new version onto it The Raspberry Pi can update itself (and load lots of useful extra programs) via its network connection You can buy a WiFi adapter for a Raspberry Pi for around ten pounds You can emulate a Pi on a PC using the qemu emulator

Deploying the Raspberry Pi

Deploying Challenges There are some challenges that need to be addressed when you deploy the Raspberry Pi in an institution Some of this depends on your starting point, and some depends on how much disruption you are prepared to put up with to use the system We are going to look at a number of possible scenarios

Creating a Raspberry Pi powered computer lab For each system you will need: Monitor/TV with HDMI connection Keyboard and Mouse power source network connectivity (wired) Good idea if you: Don t want to have to change cables Don t want to have to carry too many peripherals around Have the space and cash to set the systems up Users can bring in their own SD cards with their Raspberry Pi on them

Using the Pi in an existing computer lab Use a Pi in place of/alongside an existing computer Can use existing keyboard, mouse and screen resources (as long as they work test this first) Will result in a lot of plugging and un-plugging which may not be ideal May result in problems with network configuration (and for best results a Raspberry Pi should be networked) Cost effective solution, will only need a power supply and the required cables to connect the Pi devices

Using the Pi in an existing computer lab Using a KVM (Keyboard, Video, Mouse) switch This is a box that switches the peripherals between the Raspberry Pi and the existing computer Users can move from the computer to the Pi and back again at the touch of a button This is a very nice solution, but a good KVM switch can be expensive (actually costing more than the Raspberry Pi itself) and you may have to buy some cables and adapters to connect everything together

Using an existing PC to control a Raspberry Pi Using Remote Desktop (RDP) or Virtual Network Computing (VNC) A program on a PC can connect to the Raspberry Pi and control it remotely Use existing keyboard, monitor and mouse Need to know internet protocol (IP) address of Pi (either static or DHCP) There will be lag when programs run Some specialist software won t work (e.g. games that drive the screen directly)

Challenges There are no neat answers You just have to find the one that works best for your situation However, do remember that because a Raspberry Pi can produce HDMI video (the kind that is used by modern TV sets) you could think about using the device in places where you presently have no computers, for example Media Suites

What is a Raspberry Pi good for?

The Raspberry Pi as a Computer The Raspberry Pi makes a fine computer It is not the fastest or the most powerful machine but it is perfectly capable of doing proper computing You can learn to program the device, use it to surf the internet, host web pages and generally use it anywhere you would use a Linux computer, because that is what it is You can have full administrative rights on the machine and if you make a mistake you only have to copy the software back onto your SD card

The Raspberry Pi as a Media Centre You can obtain versions of the operating system on SD card that make a Raspberry Pi into a dedicated media centre This turns the Pi into a means of accessing and viewing music and video stored on networked hard drives The low price of the Pi means that you can afford to dedicate one to this task

Embedded Device The Raspberry Pi can serve as an embedded device that is directly connected to external hardware It can then be used to remotely monitor or control the device via its network connection The low price of the device itself makes it very attractive in this role You can even use it to make your own arcade cabinet for playing retro arcade games

Programming on the Pi

Programming on the Pi Scratch Teaches programming concepts in a non-threatening environment Python is a good first language High level Emphasis on readability Interactive PyGame A set of tools to help make games Minecraft on the Raspberry Pi But with a Python API General Purpose Input Output Breaking out of the Raspberry Pi

Talking to the Hardware

Raspberry Pi Hardware Interfacing The Raspberry Pi provides a set of pins that can be used for direct hardware interfacing You can connect these to lights and switches, or to more complex digital devices

Raspberry Pi Hardware Interfacing I2C a serial connection SPI a different kind of serial connection UART the original serial connection In addition there are clock and Pulse Width Modulation outputs

Mild Health Warning Bad connections can cause damage to the device This is particularly true if you send 5Volt signals into input ports The Raspberry Pi runs on 3.3 volt levels and the higher voltage signals will destroy the input/output connections and possibly the entire device.. which cannot be repaired The good news is that the voltages cannot actually hurt you

Inputs and Outputs There is enough power in the output from the Pi to drive an LED If you want to switch large amounts of power you will have to add an amplifier of some kind The Pi can also sense digital inputs If you want to read from analogue devices you will need to add extra hardware

Interfacing Kit We are using an interfacing kit that is provided with some jumper cables, a breadboard and some switches and LEDs This can be the basis of some interesting experiments You could add other components if you wish http://www.skpang.co.uk/catalog/starter-kita-for-raspberry-pi-pi-not-include-p-1070.html

Hardware Interfacing with Python sudo Python A normal user is not allowed to interface directly with the hardware However the Supervisor user does have permission to do this This means that you must start the Python run time environment as a super user The command sudo is used for this

importing the libraries import RPi.GPIO as GPIO import time There are some libraries that make it very easy to connect to hardware from a Python program The program must import these We can also import the time library, which we can use to control our flashing light

Setting the pin numbering scheme GPIO.setmode(GPIO.BOARD) There are two ways that a program can refer to pins on the Raspberry Pi device Numbering based on the numbers assigned by the Broadcom chipset Numbering based on the numbers on the pins on the board We have to tell the GPIO library which scheme we are using The board numbering is much easier to use

Creating an output pin GPIO.setup(11,GPIO.OUT) This sets up pin 11 on the connector as an output pin Once we have done this we can set the output to be high or low in the software We can also set pins up as inputs

Writing to the output GPIO.output(11,True) This enables the output from the pin It will cause 3.3 volts to appear on the output connection We can also write False to turn the output signal off

A complete program import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BOARD) GPIO.setup(11,GPIO.OUT) while True: GPIO.output(11,False) time.sleep(1) GPIO.output(11,True) time.sleep(1) This sets up the output and then turns it on and off once per second

Creating an Input GPIO.setup(12, GPIO.IN) if GPIO.input(12): print("input high") Input pins are created in exactly the same way A program can read them to determine the state of the input signal Note that with this software we can only poll inputs, we do not have any support for interrupt driven inputs

Demos

Questions

Questions for you What can we do for you? What useful things can we do to help engage your students with computer science?

Links www.raspberrypi.org www.modmypi.com www.themagpi.com learn.adafruit.com/category/raspberry-pi scratch.mit.edu www.python.org www.pygame.org

HIVE tour