SlideShare une entreprise Scribd logo
1  sur  53
Télécharger pour lire hors ligne
RASPBERRY PI
JEUDIS DU LIBRE 03/2016
FRANCOIS BAYART
SYSTEM ADMINISTRATOR
@frbayart
• utilisateur Linux 1996
• co-organisateur Jeudis du Libre
• co-organisateur Makers Lab Mons
KEZAKO ?
• nano ordinateur
• développé par la fondation RaspberryPi ( 2009 )
• s/hard disk/sd card/
• expérimenté l’électronique et la programmation
• 5$ à 35$ (9€ à 49€)
PI ZERO
512MO - 40GPIO - BCM2835 ARM - OUT OF STOCK
V1 A+
256MO - 40 GPIO - USB(1)
V1 B+
512MO - USB(4) - ETHERNET
V2 B
1GO - ARMV7
V3
WIRELESS - BLUETOOTH - ARMV8
PI 0 1 2 3
DIFFERENCES
• 256Mo à 1Go
• 0,5 W à 4W
• USB ( 0 à 4)
• Wireless & Bluetooth
• CPU (1 à 4 cores)
ARM != X86
ALTERNATIVES
BEAGLEBONE
HTTP://BEAGLEBOARD.ORG/BONE
BANANA PI
HTTP://WWW.BANANAPI.ORG/
PINE64
HTTPS://WWW.PINE64.COM/
PREMIERS PAS
LA CARTE SD
CREER UNE CARTE SD
• Linux / MacOSX
• dd
• dcdldd
• UNetbootin
• Windows
• UNetbootin
• Win32 Disk Imager
• HDD Raw Copy Tool
sudo dcfldd if=2016-02-26-raspbian-jessie-lite.img of=/dev/sdb 
bs=1M sizeprobe=if statusinterval=10
ECRAN +
CLAVIER
USB-TTL SERIE
• connecteur USB-Série
• Utilisation directement avec
“screen”
• Alimente directement le RPi
• !!! double alimentation
A QUOI ÇA SERT
MEDIA CENTER
KODI
• ancien nom “XBMC”
CONSOLE RETRO-GAMING
RETROPIE
• émulateur de jeux
• Nintendo, Sega, PC, Amiga,
NeoGeo, Sinclair ZX
Spectrum
• manettes en USB
DOMOTIQUE
JEEDOM / DOMOTICZ
• RFX433
• Z-WAVE
• public API
• GPIO
• …
STATION LINUX
RASPBIAN
• Epiphany
• Scratch
• Développer
• …
DOCKER
HYPRIOT
• Linux kernel 4.1.17
• Docker Engine 1.10.x
• Docker Compose 1.6.x
• Docker Swarm 1.1.3
• http://blog.hypriot.com/
MAKERS
BIDOUILLEURS
© http://computers.tutsplus.com/
BREADBOARD
platine d’expérimentation
GPIO
General Purpose Input Output
DIFFÉRENTS TYPES DE CONNEXION
GPIO
• Bus I2C

permet de connecter des composants avec seulement 2 fils
• entrée/sortie numérique

concept TOR « tout ou rien »
• Broches Rx / Tx

connexion en port série (USB-TTL)
• PWM (« Pulse Width Modulation »)

ou Modulation de largeur d'impulsion
• Interface SPI (Serial Peripheral Interface)

bus de données synchrone
GPIO | SHELL
LIGNE DE COMMANDE
gpio -g write 18 on
PYTHON - RPI.GPIO
SCALA
JAVA LIB - PI4J
SCRATCH GPIO
3.3V ! 5V
DEMO
BUTTON
SONDE DS18B20
CAPTEUR DE T°
• module 1wire
• /sys/bus/w1/devices/
OPTO-ISOLATORS
RELAY 220V
• photocoupleur
• coupleur optique
• optocoupler
• 1 à 16 relais
DONEC QUIS NUNC
NEOPIXEL
PI CAMERA
• Camera Serial Interface
• raspi-config
• raspivid
• raspistill
• Python / Scratch
import io
import time
import picamera
my_stream = io.BytesIO()
with picamera.PiCamera() as camera:
camera.start_preview()
time.sleep(2)
camera.capture(my_stream, 'jpeg')
GPIO HAT
PIFACE
• 2 Commutateur Relays
• 8 Collecteur ouvert Sorties
• 4 Bouttons
• 8 Entrées Digital
• 8 LEDs
• Python / Scratch
Allumer une sortie en fonction d'un entrée
import pifacedigitalio
def switch_pressed(event):
event.chip.output_pins[event.pin_num].turn_on()
def switch_unpressed(event):
event.chip.output_pins[event.pin_num].turn_off()
if __name__ == "__main__":
pifacedigital = pifacedigitalio.PiFaceDigital()
listener = pifacedigitalio.InputEventListener(chip=pifacedigital)
for i in range(4):
listener.register(i, pifacedigitalio.IODIR_ON, switch_pressed)
listener.register(i, pifacedigitalio.IODIR_OFF, switch_unpressed)
listener.activate()
PROCHAINS
EVENEMENTS
SAMEDI PROCHAIN - BOUSSU
LOLIGRUB: MAÎTRISEZ VOS CAMÉRAS DE SURVEILLANCE !
• atelier autour de motionEye
• http://www.loligrub.be/
UN SAMEDI PAR MOIS
MAKERS LAB MONS
• http://www.meetup.com/
Makers-Lab-Mons/
• 9 Avril
• 21 Mai
• 10H - 19h
MERCI.
• http://rebolt.co/debuter-en-electronique-par-ou-commencer/
• http://www.windtopik.fr/debuter-gpio/
• https://www.raspberrypi.org/documentation/usage/scratch/gpio/
README.md

Contenu connexe

Similaire à Un Raspberry Pi pour bidouiller

Hacking your Home @bdx.io
Hacking your Home @bdx.ioHacking your Home @bdx.io
Hacking your Home @bdx.iolaurenthuet
 
Net duino et le .net micro framework
Net duino et le .net micro frameworkNet duino et le .net micro framework
Net duino et le .net micro frameworkVincent Hubert
 
Présentation Arduino
Présentation ArduinoPrésentation Arduino
Présentation ArduinoArnaud Boudou
 
Kit de survie pour l'IoT façon DIY
Kit de survie pour l'IoT façon DIYKit de survie pour l'IoT façon DIY
Kit de survie pour l'IoT façon DIYlaurenthuet
 
Diapo zig bee_amin_jan11_final
Diapo zig bee_amin_jan11_finalDiapo zig bee_amin_jan11_final
Diapo zig bee_amin_jan11_finalAmin Ferjani
 
Arduino saison 1-20180526
Arduino saison 1-20180526Arduino saison 1-20180526
Arduino saison 1-20180526FrancisGILLET
 
Systemes d'explotation: Systèmes embarquées
Systemes d'explotation: Systèmes embarquéesSystemes d'explotation: Systèmes embarquées
Systemes d'explotation: Systèmes embarquéesAlexandru Radovici
 
Raspberry Pi: markets and applications of cheap micro computer
Raspberry Pi:  markets and applications of cheap micro computer Raspberry Pi:  markets and applications of cheap micro computer
Raspberry Pi: markets and applications of cheap micro computer Aiham Shoaib
 
Présentation de projet de fin d’études
Présentation de projet de fin d’étudesPrésentation de projet de fin d’études
Présentation de projet de fin d’étudesAimen Hajri
 
Mender 2.0 101: Bien démarrer avec les 'update modules'
Mender 2.0 101: Bien démarrer avec les 'update modules'Mender 2.0 101: Bien démarrer avec les 'update modules'
Mender 2.0 101: Bien démarrer avec les 'update modules'Pierre-jean Texier
 
Monter son pc pour les nuls
Monter son pc pour les nulsMonter son pc pour les nuls
Monter son pc pour les nulsYoussef Bensafi
 
Formation Bus de Terrain _Partie 2b _ HART
Formation Bus de Terrain _Partie 2b _ HARTFormation Bus de Terrain _Partie 2b _ HART
Formation Bus de Terrain _Partie 2b _ HARTWojciech GOMOLKA
 
BreizhCamp 2019 - IoT et open source hardware pour la collecte de timeseries
BreizhCamp 2019 - IoT et open source hardware pour la collecte de timeseriesBreizhCamp 2019 - IoT et open source hardware pour la collecte de timeseries
BreizhCamp 2019 - IoT et open source hardware pour la collecte de timeseriesXavier MARIN
 

Similaire à Un Raspberry Pi pour bidouiller (20)

Hacking your Home @bdx.io
Hacking your Home @bdx.ioHacking your Home @bdx.io
Hacking your Home @bdx.io
 
Plateformes Linux Embedded
Plateformes Linux EmbeddedPlateformes Linux Embedded
Plateformes Linux Embedded
 
Microcontroleur
MicrocontroleurMicrocontroleur
Microcontroleur
 
Net duino et le .net micro framework
Net duino et le .net micro frameworkNet duino et le .net micro framework
Net duino et le .net micro framework
 
Présentation Arduino
Présentation ArduinoPrésentation Arduino
Présentation Arduino
 
Kit de survie pour l'IoT façon DIY
Kit de survie pour l'IoT façon DIYKit de survie pour l'IoT façon DIY
Kit de survie pour l'IoT façon DIY
 
Diapo zig bee_amin_jan11_final
Diapo zig bee_amin_jan11_finalDiapo zig bee_amin_jan11_final
Diapo zig bee_amin_jan11_final
 
Pentest bus pirate
Pentest bus piratePentest bus pirate
Pentest bus pirate
 
SdE2 - Systèmes embarquées
SdE2 - Systèmes embarquéesSdE2 - Systèmes embarquées
SdE2 - Systèmes embarquées
 
Arduino saison 1-20180526
Arduino saison 1-20180526Arduino saison 1-20180526
Arduino saison 1-20180526
 
Systemes d'explotation: Systèmes embarquées
Systemes d'explotation: Systèmes embarquéesSystemes d'explotation: Systèmes embarquées
Systemes d'explotation: Systèmes embarquées
 
Raspberry Pi: markets and applications of cheap micro computer
Raspberry Pi:  markets and applications of cheap micro computer Raspberry Pi:  markets and applications of cheap micro computer
Raspberry Pi: markets and applications of cheap micro computer
 
Présentation de projet de fin d’études
Présentation de projet de fin d’étudesPrésentation de projet de fin d’études
Présentation de projet de fin d’études
 
Mender 2.0 101: Bien démarrer avec les 'update modules'
Mender 2.0 101: Bien démarrer avec les 'update modules'Mender 2.0 101: Bien démarrer avec les 'update modules'
Mender 2.0 101: Bien démarrer avec les 'update modules'
 
Monter son pc pour les nuls
Monter son pc pour les nulsMonter son pc pour les nuls
Monter son pc pour les nuls
 
Sigfox workshop
Sigfox workshopSigfox workshop
Sigfox workshop
 
SoC Hamdi -chap4
SoC Hamdi -chap4SoC Hamdi -chap4
SoC Hamdi -chap4
 
Formation Bus de Terrain _Partie 2b _ HART
Formation Bus de Terrain _Partie 2b _ HARTFormation Bus de Terrain _Partie 2b _ HART
Formation Bus de Terrain _Partie 2b _ HART
 
SDE 10 - Reseau
SDE 10 - ReseauSDE 10 - Reseau
SDE 10 - Reseau
 
BreizhCamp 2019 - IoT et open source hardware pour la collecte de timeseries
BreizhCamp 2019 - IoT et open source hardware pour la collecte de timeseriesBreizhCamp 2019 - IoT et open source hardware pour la collecte de timeseries
BreizhCamp 2019 - IoT et open source hardware pour la collecte de timeseries
 

Un Raspberry Pi pour bidouiller