Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Un Raspberry Pi pour bidouiller

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on. →

Un Raspberry Pi pour bidouiller

présentation des différentes variantes du Raspberry Pi, comment faire nos premiers pas pour l’exploiter et il nous montrera les différentes possibilités d’usage qui s’offre à nous (jeux, multimédia, domotique, serveur, bidouillage…). Nous verrons ensuite comment relier le Raspberry Pi à différents composants électroniques à travers les connexions GPIO

Avatar for Francois BAYART

Francois BAYART

March 17, 2016

More Decks by Francois BAYART

Other Decks in Technology

Transcript

  1. FRANCOIS BAYART SYSTEM ADMINISTRATOR @frbayart • utilisateur Linux 1996 •

    co-organisateur Jeudis du Libre • co-organisateur Makers Lab Mons
  2. 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€)
  3. PI 0 1 2 3 DIFFERENCES • 256Mo à 1Go

    • 0,5 W à 4W • USB ( 0 à 4) • Wireless & Bluetooth • CPU (1 à 4 cores)
  4. 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
  5. CONSOLE RETRO-GAMING RETROPIE • émulateur de jeux • Nintendo, Sega,

    PC, Amiga, NeoGeo, Sinclair ZX Spectrum • manettes en USB
  6. 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/
  7. 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
  8. 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')
  9. GPIO HAT PIFACE • 2 Commutateur Relays • 8 Collecteur

    ouvert Sorties • 4 Bouttons • 8 Entrées Digital • 8 LEDs • Python / Scratch
  10. 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()
  11. SAMEDI PROCHAIN - BOUSSU LOLIGRUB: MAÎTRISEZ VOS CAMÉRAS DE SURVEILLANCE

    ! • atelier autour de motionEye • http://www.loligrub.be/