Interfacing the Raspberry Pi to the World

Interfacing the Raspberry Pi
        to the World
Up close and personal with P1 (and P5!)


    @OmerK | OSHCAMP 2012 | 15 Sep 2012
omer.kilic.name
Agenda
●   Mechanical Details
●   Electrical Details
●   Software Details
●   Tips for headless operation
●   Questions
Mechanical
●   Standard 100mil (2.54mm) spacing
    –   P1 → 2x13 way
    –   P5 → 2x4 way
M/F Jumper Cables
M/F Jumper Cables
IDC Cable




Re-use old floppy cables!
http://www.raspberrypi.org/archives/1404
“Breakout” boards




 Pi Cobbler from Adafruit
Slice of Pi from Ciseco




      Pi Plate from Adafruit



More at: http://elinux.org/RPi_Expansion_Boards
Electrical
●   P1
    ●  Power
       ● 3.3V (max I: ~50mA)

       ● 5V (max I: Power Supply - 700mA)

    ● 17 GPIO Pins, multiplexed with:

       ● UART

       ● I2C

       ● SPI

       ● PWM

●   P5
    ● 4 extra GPIO pins

    ● Power

●   More signals broken out to S2 and S5 (Camera and
    flat panel connectors)
    ● Fiddly!




http://elinux.org/RPi_Low-level_peripherals
Revision 2 – Changes
●   Fuses protecting the USB outputs have been removed
    –   Power the board via back-feeding hub
●   JTAG on P1
●   I2C peripherals swapped
●   P5 – New header: 4 more GPIO + Power
●   P6 – Reset Jumper
●   Mounting holes!!!!!!!!!!!!


          http://www.raspberrypi.org/archives/1929
Revision 2
Power (5V)
Electrical




             3.3V!
3.3V
http://www.flickr.com/photos/56601859@N00/3064468115
Use protection
●   Level Shifting
    –   Logic buffers (74HCT242)
    –   Birectional translators (TXB0108)
    –   Discrete shifters (FETs + Rs)
●   Current limiting R
Recommended Distro




                      Occidentalis by Adafruit
http://learn.adafruit.com/adafruit-raspberry-pi-educational-linux-distro/overview
Software
●   Peripherals are memory mapped
    –   Access via /dev/mem
        ●   Faster, needs root, hacky, dangerous!
    –   Use kernel modules/sysfs
        ●   /sys/class/gpio/gpioX/value etc.
        ●   Slower, doesn't need root, easier, (relatively) safer
Software – GPIO
●   /sys/class/gpio/ (export|direction|value|interrupt|unexport)
●   Example:
    –   echo 17 > /sys/class/gpio/export
    –   echo “out” > /sys/class/gpio/gpio17/direction
    –   echo “1” > /sys/class/gpio/gpio17/value
●   Interrupt support
    –   Use poll() on /value
Software – I2C
●   /dev/i2c-0 and /dev/i2c-1
●   Install the i2c-utils package
    –   i2cdetect, i2cdump, i2cget, i2cset
●   Support for kernel hardware modules:
    –   echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-
        0/new_device
●   i2c-dev details:
    –   http://kernel.org/doc/Documentation/i2c/dev-interface
Software – SPI
●   /dev/spidev0.0 and /dev/spidev0.1
    –   Chip select pins
●   Support for kernel hardware modules:
    –   Need to rebuild kernel!
●   spidev details:
    –   http://kernel.org/doc/Documentation/spi/spidev
Software – PWM
●   No kernel module (or libgpio) support, memory
    mapped voodoo necessary.
●   WiringPi example:
    –   pinMode(1, PWM_OUTPUT);
    –   PwmWrite(500);
Libraries
●   Python
    –   Quick2wire, Rpi.GPIO
●   C
    –   WiringPi, pihwm
●   Bindings also available for Java(!), Ruby, Erlang
Tips for headless operation
●   Use 240/16 (CPU/GPU) RAM split
    –   No need for graphical stuff
●   Setup avahi/zeroconf
    –   No need to remember IP address
        ●   ssh raspberrypi.local
●   Setup mosh
    –   Great for intermittent networking
Questions?
1 of 27

Recommended

Raspberry Pi by
Raspberry Pi Raspberry Pi
Raspberry Pi Selvaraj Seerangan
2.9K views104 slides
Neural Networks: Introducton by
Neural Networks: IntroductonNeural Networks: Introducton
Neural Networks: IntroductonMostafa G. M. Mostafa
4.8K views51 slides
Graphics processing unit ppt by
Graphics processing unit pptGraphics processing unit ppt
Graphics processing unit pptSandeep Singh
27.6K views19 slides
Raspberry Pi (Introduction) by
Raspberry Pi (Introduction)Raspberry Pi (Introduction)
Raspberry Pi (Introduction)Mandeesh Singh
39.6K views47 slides
Raspberry pi ppt by
Raspberry pi pptRaspberry pi ppt
Raspberry pi pptPavanKumar3601
334 views22 slides
Raspberry pi by
Raspberry pi Raspberry pi
Raspberry pi Shubham singh
496 views35 slides

More Related Content

What's hot

Mother Board by
Mother BoardMother Board
Mother BoardLokesh Kumar N
1.9K views20 slides
Arduino by
ArduinoArduino
Arduinovipin7vj
57.6K views18 slides
FPGA Hardware Accelerator for Machine Learning by
FPGA Hardware Accelerator for Machine Learning FPGA Hardware Accelerator for Machine Learning
FPGA Hardware Accelerator for Machine Learning Dr. Swaminathan Kathirvel
739 views45 slides
Introducing the Arduino by
Introducing the ArduinoIntroducing the Arduino
Introducing the ArduinoCharles A B Jr
2.1K views49 slides
Raspberry Pi Presentation by
Raspberry Pi PresentationRaspberry Pi Presentation
Raspberry Pi PresentationGeekizer
31.1K views22 slides
Presentation on Raspberry pi by
Presentation on Raspberry piPresentation on Raspberry pi
Presentation on Raspberry piOpenDev
19.8K views18 slides

What's hot(20)

Arduino by vipin7vj
ArduinoArduino
Arduino
vipin7vj57.6K views
Raspberry Pi Presentation by Geekizer
Raspberry Pi PresentationRaspberry Pi Presentation
Raspberry Pi Presentation
Geekizer31.1K views
Presentation on Raspberry pi by OpenDev
Presentation on Raspberry piPresentation on Raspberry pi
Presentation on Raspberry pi
OpenDev19.8K views
Fpga(field programmable gate array) by Iffat Anjum
Fpga(field programmable gate array) Fpga(field programmable gate array)
Fpga(field programmable gate array)
Iffat Anjum6.7K views
Raspberry pi by Anija Nair
Raspberry pi Raspberry pi
Raspberry pi
Anija Nair124.4K views
System On Chip (SOC) by Shivam Gupta
System On Chip (SOC)System On Chip (SOC)
System On Chip (SOC)
Shivam Gupta15.1K views
Introduction to raspberry pi by praveen_23
Introduction to raspberry piIntroduction to raspberry pi
Introduction to raspberry pi
praveen_2323K views
Building Blocks for IoT Devices by Anil Gorthy
Building Blocks for IoT DevicesBuilding Blocks for IoT Devices
Building Blocks for IoT Devices
Anil Gorthy5.6K views
Introduction to Arduino by Omer Kilic
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
Omer Kilic13.3K views
Raspberry Pi Technology by Ravi Basil
Raspberry Pi TechnologyRaspberry Pi Technology
Raspberry Pi Technology
Ravi Basil1.1K views

Similar to Interfacing the Raspberry Pi to the World

Aewin network security appliance network management platform_scb6982 by
Aewin network security appliance network management platform_scb6982Aewin network security appliance network management platform_scb6982
Aewin network security appliance network management platform_scb6982Sirena Cheng
194 views2 slides
Getting started with Intel IoT Developer Kit by
Getting started with Intel IoT Developer KitGetting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer KitSulamita Garcia
17.8K views67 slides
Raspberry Pi - HW/SW Application Development by
Raspberry Pi - HW/SW Application DevelopmentRaspberry Pi - HW/SW Application Development
Raspberry Pi - HW/SW Application DevelopmentCorley S.r.l.
4.2K views37 slides
Raspberry Pi with Java by
Raspberry Pi with JavaRaspberry Pi with Java
Raspberry Pi with Javakoji lin
3.5K views35 slides
Raspberry Pi GPIO Tutorial - Make Your Own Game Console by
Raspberry Pi GPIO Tutorial - Make Your Own Game ConsoleRaspberry Pi GPIO Tutorial - Make Your Own Game Console
Raspberry Pi GPIO Tutorial - Make Your Own Game ConsoleRICELEEIO
151 views226 slides
Raspberry Pi and Amateur Radio - 2020 update by
Raspberry Pi and Amateur Radio - 2020 updateRaspberry Pi and Amateur Radio - 2020 update
Raspberry Pi and Amateur Radio - 2020 updateKevin Hooke
167 views35 slides

Similar to Interfacing the Raspberry Pi to the World(20)

Aewin network security appliance network management platform_scb6982 by Sirena Cheng
Aewin network security appliance network management platform_scb6982Aewin network security appliance network management platform_scb6982
Aewin network security appliance network management platform_scb6982
Sirena Cheng194 views
Getting started with Intel IoT Developer Kit by Sulamita Garcia
Getting started with Intel IoT Developer KitGetting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer Kit
Sulamita Garcia17.8K views
Raspberry Pi - HW/SW Application Development by Corley S.r.l.
Raspberry Pi - HW/SW Application DevelopmentRaspberry Pi - HW/SW Application Development
Raspberry Pi - HW/SW Application Development
Corley S.r.l.4.2K views
Raspberry Pi with Java by koji lin
Raspberry Pi with JavaRaspberry Pi with Java
Raspberry Pi with Java
koji lin3.5K views
Raspberry Pi GPIO Tutorial - Make Your Own Game Console by RICELEEIO
Raspberry Pi GPIO Tutorial - Make Your Own Game ConsoleRaspberry Pi GPIO Tutorial - Make Your Own Game Console
Raspberry Pi GPIO Tutorial - Make Your Own Game Console
RICELEEIO151 views
Raspberry Pi and Amateur Radio - 2020 update by Kevin Hooke
Raspberry Pi and Amateur Radio - 2020 updateRaspberry Pi and Amateur Radio - 2020 update
Raspberry Pi and Amateur Radio - 2020 update
Kevin Hooke167 views
Ls catalog thiet bi tu dong gm e_0908_dienhathe.vn by Dien Ha The
Ls catalog thiet bi tu dong gm e_0908_dienhathe.vnLs catalog thiet bi tu dong gm e_0908_dienhathe.vn
Ls catalog thiet bi tu dong gm e_0908_dienhathe.vn
Dien Ha The300 views
Ls catalog thiet bi tu dong gm e_0908 by Dien Ha The
Ls catalog thiet bi tu dong gm e_0908Ls catalog thiet bi tu dong gm e_0908
Ls catalog thiet bi tu dong gm e_0908
Dien Ha The221 views
Ins and Outs of GPIO Programming by ICS
Ins and Outs of GPIO ProgrammingIns and Outs of GPIO Programming
Ins and Outs of GPIO Programming
ICS1.4K views
Android Things Linux Day 2017 by Stefano Sanna
Android Things Linux Day 2017 Android Things Linux Day 2017
Android Things Linux Day 2017
Stefano Sanna536 views
[OpenStack Day in Korea 2015] Track 1-6 - 갈라파고스의 이구아나, 인프라에 오픈소스를 올리다. 그래서 보이... by OpenStack Korea Community
[OpenStack Day in Korea 2015] Track 1-6 - 갈라파고스의 이구아나, 인프라에 오픈소스를 올리다. 그래서 보이...[OpenStack Day in Korea 2015] Track 1-6 - 갈라파고스의 이구아나, 인프라에 오픈소스를 올리다. 그래서 보이...
[OpenStack Day in Korea 2015] Track 1-6 - 갈라파고스의 이구아나, 인프라에 오픈소스를 올리다. 그래서 보이...
NodeMCU ESP8266 workshop 1 by Andy Gelme
NodeMCU ESP8266 workshop 1NodeMCU ESP8266 workshop 1
NodeMCU ESP8266 workshop 1
Andy Gelme34.3K views
FPGAs for Supercomputing: The Why and How by DESMOND YUEN
FPGAs for Supercomputing: The Why and HowFPGAs for Supercomputing: The Why and How
FPGAs for Supercomputing: The Why and How
DESMOND YUEN394 views
Raspberry Pi Introduction by Michal Sedlak
Raspberry Pi IntroductionRaspberry Pi Introduction
Raspberry Pi Introduction
Michal Sedlak1.2K views
lesson2 - Nodemcu course - NodeMCU dev Board by Elaf A.Saeed
 lesson2 - Nodemcu course - NodeMCU dev Board lesson2 - Nodemcu course - NodeMCU dev Board
lesson2 - Nodemcu course - NodeMCU dev Board
Elaf A.Saeed217 views
Aewin network security appliance network management platform_scb7982 by Sirena Cheng
Aewin network security appliance network management platform_scb7982Aewin network security appliance network management platform_scb7982
Aewin network security appliance network management platform_scb7982
Sirena Cheng199 views

More from Omer Kilic

Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems by
Bare Metal from a Hardware Perspective: Embedded Frameworks & Build SystemsBare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems
Bare Metal from a Hardware Perspective: Embedded Frameworks & Build SystemsOmer Kilic
288 views33 slides
Gearing up for Volume Manufacturing by
Gearing up for Volume ManufacturingGearing up for Volume Manufacturing
Gearing up for Volume ManufacturingOmer Kilic
539 views41 slides
The Process of Shipping Hardware Products by
The Process of Shipping Hardware ProductsThe Process of Shipping Hardware Products
The Process of Shipping Hardware ProductsOmer Kilic
607 views51 slides
Confusion of Things — The IoT Hardware Kerfuffle by
Confusion of Things — The IoT Hardware KerfuffleConfusion of Things — The IoT Hardware Kerfuffle
Confusion of Things — The IoT Hardware KerfuffleOmer Kilic
1.6K views26 slides
Fast and Furious: Overclocking chips for fun and profit by
Fast and Furious: Overclocking chips for fun and profitFast and Furious: Overclocking chips for fun and profit
Fast and Furious: Overclocking chips for fun and profitOmer Kilic
1.3K views24 slides
Cloud, Distributed, Embedded: Erlang in the Heterogeneous Computing World by
Cloud, Distributed, Embedded: Erlang in the Heterogeneous Computing WorldCloud, Distributed, Embedded: Erlang in the Heterogeneous Computing World
Cloud, Distributed, Embedded: Erlang in the Heterogeneous Computing WorldOmer Kilic
2.3K views46 slides

More from Omer Kilic(17)

Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems by Omer Kilic
Bare Metal from a Hardware Perspective: Embedded Frameworks & Build SystemsBare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems
Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems
Omer Kilic288 views
Gearing up for Volume Manufacturing by Omer Kilic
Gearing up for Volume ManufacturingGearing up for Volume Manufacturing
Gearing up for Volume Manufacturing
Omer Kilic539 views
The Process of Shipping Hardware Products by Omer Kilic
The Process of Shipping Hardware ProductsThe Process of Shipping Hardware Products
The Process of Shipping Hardware Products
Omer Kilic607 views
Confusion of Things — The IoT Hardware Kerfuffle by Omer Kilic
Confusion of Things — The IoT Hardware KerfuffleConfusion of Things — The IoT Hardware Kerfuffle
Confusion of Things — The IoT Hardware Kerfuffle
Omer Kilic1.6K views
Fast and Furious: Overclocking chips for fun and profit by Omer Kilic
Fast and Furious: Overclocking chips for fun and profitFast and Furious: Overclocking chips for fun and profit
Fast and Furious: Overclocking chips for fun and profit
Omer Kilic1.3K views
Cloud, Distributed, Embedded: Erlang in the Heterogeneous Computing World by Omer Kilic
Cloud, Distributed, Embedded: Erlang in the Heterogeneous Computing WorldCloud, Distributed, Embedded: Erlang in the Heterogeneous Computing World
Cloud, Distributed, Embedded: Erlang in the Heterogeneous Computing World
Omer Kilic2.3K views
Taking Back Embedded: The Erlang Embedded Framework by Omer Kilic
Taking Back Embedded: The Erlang Embedded FrameworkTaking Back Embedded: The Erlang Embedded Framework
Taking Back Embedded: The Erlang Embedded Framework
Omer Kilic1.8K views
Erlang Embedded — Concurrent Blinkenlights and More! by Omer Kilic
Erlang Embedded — Concurrent Blinkenlights and More!Erlang Embedded — Concurrent Blinkenlights and More!
Erlang Embedded — Concurrent Blinkenlights and More!
Omer Kilic1.6K views
The Actor Model applied to the Raspberry Pi and the Embedded Domain by Omer Kilic
The Actor Model applied to the Raspberry Pi and the Embedded DomainThe Actor Model applied to the Raspberry Pi and the Embedded Domain
The Actor Model applied to the Raspberry Pi and the Embedded Domain
Omer Kilic4.6K views
From Breadboard to Finished Product by Omer Kilic
From Breadboard to Finished ProductFrom Breadboard to Finished Product
From Breadboard to Finished Product
Omer Kilic2.3K views
A Quick Introduction to Programmable Logic by Omer Kilic
A Quick Introduction to Programmable LogicA Quick Introduction to Programmable Logic
A Quick Introduction to Programmable Logic
Omer Kilic3.5K views
concurrency.cc OSHUG #3 by Omer Kilic
concurrency.cc OSHUG #3concurrency.cc OSHUG #3
concurrency.cc OSHUG #3
Omer Kilic1.3K views
BURO Arduino Workshop by Omer Kilic
BURO Arduino WorkshopBURO Arduino Workshop
BURO Arduino Workshop
Omer Kilic3.8K views
Interfacing with Arduino by Omer Kilic
Interfacing with ArduinoInterfacing with Arduino
Interfacing with Arduino
Omer Kilic3K views
Introduction to XMOS Software Defined Silicon Technology by Omer Kilic
Introduction to XMOS Software Defined Silicon TechnologyIntroduction to XMOS Software Defined Silicon Technology
Introduction to XMOS Software Defined Silicon Technology
Omer Kilic1.2K views
TinkerSoc Electronics 101 by Omer Kilic
TinkerSoc Electronics 101TinkerSoc Electronics 101
TinkerSoc Electronics 101
Omer Kilic741 views
Beer Bottle Night Lamp by Omer Kilic
Beer Bottle Night LampBeer Bottle Night Lamp
Beer Bottle Night Lamp
Omer Kilic1.1K views

Recently uploaded

Webinar : Desperately Seeking Transformation - Part 2: Insights from leading... by
Webinar : Desperately Seeking Transformation - Part 2:  Insights from leading...Webinar : Desperately Seeking Transformation - Part 2:  Insights from leading...
Webinar : Desperately Seeking Transformation - Part 2: Insights from leading...The Digital Insurer
90 views52 slides
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ... by
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...ShapeBlue
126 views10 slides
Business Analyst Series 2023 - Week 4 Session 8 by
Business Analyst Series 2023 -  Week 4 Session 8Business Analyst Series 2023 -  Week 4 Session 8
Business Analyst Series 2023 - Week 4 Session 8DianaGray10
123 views13 slides
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue by
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueCloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueShapeBlue
138 views15 slides
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue by
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlueWhat’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlueShapeBlue
263 views23 slides
Why and How CloudStack at weSystems - Stephan Bienek - weSystems by
Why and How CloudStack at weSystems - Stephan Bienek - weSystemsWhy and How CloudStack at weSystems - Stephan Bienek - weSystems
Why and How CloudStack at weSystems - Stephan Bienek - weSystemsShapeBlue
238 views13 slides

Recently uploaded(20)

Webinar : Desperately Seeking Transformation - Part 2: Insights from leading... by The Digital Insurer
Webinar : Desperately Seeking Transformation - Part 2:  Insights from leading...Webinar : Desperately Seeking Transformation - Part 2:  Insights from leading...
Webinar : Desperately Seeking Transformation - Part 2: Insights from leading...
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ... by ShapeBlue
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
ShapeBlue126 views
Business Analyst Series 2023 - Week 4 Session 8 by DianaGray10
Business Analyst Series 2023 -  Week 4 Session 8Business Analyst Series 2023 -  Week 4 Session 8
Business Analyst Series 2023 - Week 4 Session 8
DianaGray10123 views
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue by ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueCloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
ShapeBlue138 views
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue by ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlueWhat’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
ShapeBlue263 views
Why and How CloudStack at weSystems - Stephan Bienek - weSystems by ShapeBlue
Why and How CloudStack at weSystems - Stephan Bienek - weSystemsWhy and How CloudStack at weSystems - Stephan Bienek - weSystems
Why and How CloudStack at weSystems - Stephan Bienek - weSystems
ShapeBlue238 views
Transcript: Redefining the book supply chain: A glimpse into the future - Tec... by BookNet Canada
Transcript: Redefining the book supply chain: A glimpse into the future - Tec...Transcript: Redefining the book supply chain: A glimpse into the future - Tec...
Transcript: Redefining the book supply chain: A glimpse into the future - Tec...
BookNet Canada41 views
"Package management in monorepos", Zoltan Kochan by Fwdays
"Package management in monorepos", Zoltan Kochan"Package management in monorepos", Zoltan Kochan
"Package management in monorepos", Zoltan Kochan
Fwdays33 views
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue by ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueCloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
ShapeBlue135 views
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And... by ShapeBlue
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...
Enabling DPU Hardware Accelerators in XCP-ng Cloud Platform Environment - And...
ShapeBlue106 views
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or... by ShapeBlue
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
ShapeBlue198 views
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ... by ShapeBlue
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
ShapeBlue166 views
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online by ShapeBlue
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineKVM Security Groups Under the Hood - Wido den Hollander - Your.Online
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online
ShapeBlue221 views
Initiating and Advancing Your Strategic GIS Governance Strategy by Safe Software
Initiating and Advancing Your Strategic GIS Governance StrategyInitiating and Advancing Your Strategic GIS Governance Strategy
Initiating and Advancing Your Strategic GIS Governance Strategy
Safe Software176 views
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue by ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
ShapeBlue147 views
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha... by ShapeBlue
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
ShapeBlue180 views

Interfacing the Raspberry Pi to the World

  • 1. Interfacing the Raspberry Pi to the World Up close and personal with P1 (and P5!) @OmerK | OSHCAMP 2012 | 15 Sep 2012
  • 3. Agenda ● Mechanical Details ● Electrical Details ● Software Details ● Tips for headless operation ● Questions
  • 4. Mechanical ● Standard 100mil (2.54mm) spacing – P1 → 2x13 way – P5 → 2x4 way
  • 7. IDC Cable Re-use old floppy cables!
  • 9. “Breakout” boards Pi Cobbler from Adafruit
  • 10. Slice of Pi from Ciseco Pi Plate from Adafruit More at: http://elinux.org/RPi_Expansion_Boards
  • 11. Electrical ● P1 ● Power ● 3.3V (max I: ~50mA) ● 5V (max I: Power Supply - 700mA) ● 17 GPIO Pins, multiplexed with: ● UART ● I2C ● SPI ● PWM ● P5 ● 4 extra GPIO pins ● Power ● More signals broken out to S2 and S5 (Camera and flat panel connectors) ● Fiddly! http://elinux.org/RPi_Low-level_peripherals
  • 12. Revision 2 – Changes ● Fuses protecting the USB outputs have been removed – Power the board via back-feeding hub ● JTAG on P1 ● I2C peripherals swapped ● P5 – New header: 4 more GPIO + Power ● P6 – Reset Jumper ● Mounting holes!!!!!!!!!!!! http://www.raspberrypi.org/archives/1929
  • 15. Electrical 3.3V!
  • 16. 3.3V
  • 18. Use protection ● Level Shifting – Logic buffers (74HCT242) – Birectional translators (TXB0108) – Discrete shifters (FETs + Rs) ● Current limiting R
  • 19. Recommended Distro Occidentalis by Adafruit http://learn.adafruit.com/adafruit-raspberry-pi-educational-linux-distro/overview
  • 20. Software ● Peripherals are memory mapped – Access via /dev/mem ● Faster, needs root, hacky, dangerous! – Use kernel modules/sysfs ● /sys/class/gpio/gpioX/value etc. ● Slower, doesn't need root, easier, (relatively) safer
  • 21. Software – GPIO ● /sys/class/gpio/ (export|direction|value|interrupt|unexport) ● Example: – echo 17 > /sys/class/gpio/export – echo “out” > /sys/class/gpio/gpio17/direction – echo “1” > /sys/class/gpio/gpio17/value ● Interrupt support – Use poll() on /value
  • 22. Software – I2C ● /dev/i2c-0 and /dev/i2c-1 ● Install the i2c-utils package – i2cdetect, i2cdump, i2cget, i2cset ● Support for kernel hardware modules: – echo ds1307 0x68 > /sys/class/i2c-adapter/i2c- 0/new_device ● i2c-dev details: – http://kernel.org/doc/Documentation/i2c/dev-interface
  • 23. Software – SPI ● /dev/spidev0.0 and /dev/spidev0.1 – Chip select pins ● Support for kernel hardware modules: – Need to rebuild kernel! ● spidev details: – http://kernel.org/doc/Documentation/spi/spidev
  • 24. Software – PWM ● No kernel module (or libgpio) support, memory mapped voodoo necessary. ● WiringPi example: – pinMode(1, PWM_OUTPUT); – PwmWrite(500);
  • 25. Libraries ● Python – Quick2wire, Rpi.GPIO ● C – WiringPi, pihwm ● Bindings also available for Java(!), Ruby, Erlang
  • 26. Tips for headless operation ● Use 240/16 (CPU/GPU) RAM split – No need for graphical stuff ● Setup avahi/zeroconf – No need to remember IP address ● ssh raspberrypi.local ● Setup mosh – Great for intermittent networking