Skip to content

initiate french version #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added fr-FR/images/.keep
Empty file.
Binary file added fr-FR/images/ADC.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fr-FR/images/LDR_and_cap_wired.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fr-FR/images/Laser-tripwire_1-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fr-FR/images/Laser-tripwire_2-01.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fr-FR/images/Laser-tripwire_2-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fr-FR/images/Laser-tripwire_3-01.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fr-FR/images/Laser-tripwire_3-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fr-FR/images/analogue-digital.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fr-FR/images/battery-pack.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fr-FR/images/breadboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fr-FR/images/button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fr-FR/images/buzzer-circuit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fr-FR/images/camjam1wiring.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fr-FR/images/capacitor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fr-FR/images/complete.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fr-FR/images/complete.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fr-FR/images/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fr-FR/images/gpio-setup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fr-FR/images/h-bridge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fr-FR/images/jumper-female-to-female.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fr-FR/images/jumper-male-to-female.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fr-FR/images/jumper-male-to-male.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fr-FR/images/ldr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fr-FR/images/led-3v3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fr-FR/images/led-gpio17.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fr-FR/images/led.png
Binary file added fr-FR/images/mcb-wiring.png
Binary file added fr-FR/images/mcb.png
Binary file added fr-FR/images/mcp3008-2pots-led.png
Binary file added fr-FR/images/mcp3008-pot-led.png
Binary file added fr-FR/images/mcp3008-pot.png
Binary file added fr-FR/images/mcp3008.png
Binary file added fr-FR/images/motor-controller.png
Binary file added fr-FR/images/motor.png
Binary file added fr-FR/images/motor2.png
Binary file added fr-FR/images/piezo-buzzer.png
Binary file added fr-FR/images/pinout.png
Binary file added fr-FR/images/pir.png
Binary file added fr-FR/images/pir_module.png
Binary file added fr-FR/images/pir_potentiometers.png
Binary file added fr-FR/images/pir_pots.jpg
Binary file added fr-FR/images/pir_wiring.png
Binary file added fr-FR/images/potentiometer.png
Binary file added fr-FR/images/potentiometerA.jpg
Binary file added fr-FR/images/python3-app-menu.png
Binary file added fr-FR/images/raspio-ports.jpg
Binary file added fr-FR/images/rcgui.png
Binary file added fr-FR/images/resistor-330r.png
Binary file added fr-FR/images/resistor-470r.png
Binary file added fr-FR/images/tactile-push-button.png
Binary file added fr-FR/images/traffic-lights.png
Binary file added fr-FR/images/ultrasonic-distance-sensor.png
Binary file added fr-FR/images/wiring-uds.png
40 changes: 40 additions & 0 deletions fr-FR/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
title: Physical Computing with Python
hero_image: images/cover.png
subtitle: Getting started with physical computing
description: Get started with physical computing on the Raspberry Pi using Python.
original_url: https://www.raspberrypi.org/learning/physical-computing-with-python/
theme: green
duration: 2
copyedit: true
listed: true
ingredient: false
curriculum: 1, design-0, programming-1, phys-comp-1, manufacture-0, community-0
technologies: electronic-components, python
interests: ''
hardware: electronic-components
software: python
site_areas: projects
version: 3
last_tested: 2017-01-01
steps:
- title: Introduction
- title: GPIO pins
- title: Lighting an LED
completion:
- engaged
- title: Switching an LED on and off
- title: Flashing an LED
- title: Using buttons to get input
- title: Manually controlling the LED
- title: Making a switch
- title: Using a buzzer
- title: Making traffic lights
- title: Using a light-dependent resistor
- title: Using a PIR sensor
- title: Using an ultrasonic distance sensor
- title: Analogue inputs
- title: Using motors
completion:
- internal
- title: What next?
Empty file added fr-FR/resources/.keep
Empty file.
Empty file added fr-FR/solutions/.keep
Empty file.
5 changes: 5 additions & 0 deletions fr-FR/solutions/basic_button.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from gpiozero import Button
button = Button(2) ##The pin the button is wired to

button.wait_for_press()
print('You pushed me')
7 changes: 7 additions & 0 deletions fr-FR/solutions/basic_buzzer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from gpiozero import Buzzer
from time import sleep

buzzer = Buzzer(17)

while True:
buzzer.beep()
14 changes: 14 additions & 0 deletions fr-FR/solutions/buggy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from gpiozero import Robot
from time import sleep

robot = Robot((4, 14), (17, 27))

robot.forward()
sleep(5)
robot.right()
sleep(1)
robot.backward()
sleep(1)
robot.left()
sleep(1)
robot.stop()
10 changes: 10 additions & 0 deletions fr-FR/solutions/flash_led.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from gpiozero import LED
from time import sleep

led = LED(17)

while True:
led.on()
sleep(1)
led.off()
sleep(1)
10 changes: 10 additions & 0 deletions fr-FR/solutions/hold_to_light.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
rom gpiozero import LED, Button
from signal import pause

led = LED(17)
button = Button(2)

button.when_pressed = led.on
button.when_released = led.off

pause()
6 changes: 6 additions & 0 deletions fr-FR/solutions/ldr.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from gpiozero import LightSensor

ldr = LightSensor(4) # alter if using a different pin

while True:
print(ldr.value)
10 changes: 10 additions & 0 deletions fr-FR/solutions/led_button.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from gpiozero import LED, Button
from time import sleep

led = LED(17)
button = Button(2)

button.wait_for_press()
led.on()
sleep(3)
led.off()
6 changes: 6 additions & 0 deletions fr-FR/solutions/light_and_led.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from gpiozero import LED
led = LED(17) ##The pin the long leg is wired to

led.on()

#led.off() ##Uncomment this line and run to turn off the LED
10 changes: 10 additions & 0 deletions fr-FR/solutions/light_switch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from gpiozero import LED, Button
from time import sleep

led = LED(17)
button = Button(2)

while True:
button.wait_for_press()
led.toggle()
sleep(0.5)
13 changes: 13 additions & 0 deletions fr-FR/solutions/motors.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from gpiozero import Motor
from time import sleep

motor1 = Motor(4, 14)
motor2 = Motor(17, 27)

motor1.forward()
motor2.forward()

while True:
sleep(5)
motor1.reverse()
motor2.reverse()
8 changes: 8 additions & 0 deletions fr-FR/solutions/pir.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
rom gpiozero import MotionSensor

pir = MotionSensor(4)

while True:
pir.wait_for_motion()
print("You moved")
pir.wait_for_no_motion()
19 changes: 19 additions & 0 deletions fr-FR/solutions/traffic_lights.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from gpiozero import Button, TrafficLights, Buzzer
from time import sleep

button = Button(21)
lights = TrafficLights(25, 8, 7)
buzzer = Buzzer(15)

button.wait_for_press()


while True:
button.wait_for_press()
lights.green.on()
sleep(1)
lights.amber.on()
sleep(1)
lights.red.on()
sleep(1)
lights.off()
12 changes: 12 additions & 0 deletions fr-FR/solutions/uds.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from gpiozero import DistanceSensor

ultrasonic = DistanceSensor(echo=17, trigger=4, threshold_distance=0.5)

def hello():
print("Hello")

def bye():
print("Bye")

ultrasonic.when_in_range = hello
ultrasonic.when_out_of_range = bye
74 changes: 74 additions & 0 deletions fr-FR/step_1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
## Introduction

Apprendre à utiliser les ports GPIO de votre Raspberry Pi pour s'interfacer avec des composants électronique, comme des LEDs et des PIRs.

### Ce que vous allez faire

--- no-print ---
![Complete project example](images/complete.gif)
--- /no-print ---

--- print-only ---
![Complete project example](images/complete.png)
--- /print-only ---

--- collapse ---
---
title: Ce dont vous aurez besoin
---
## Ce dont vous aurez besoin

### Matériel

En plus d'un Raspberry Pi avec un carte SD et les périphériques habituels, vous aurez aussi besoin:

|1x Solderless breadboard | Male-to-female jumper leads | Female-to-female jumper leads | Male-to-male jumper leads |
|:--------:|:-------:|:--------:|:--------:|
| ![breadboard](images/breadboard.png) | ![m to f jumper leads](images/jumper-male-to-female.png) | ![f to f jumper leads](images/jumper-female-to-female.png) | ![m to m jumper leads](images/jumper-male-to-male.png) |

| 1x Bouton tactile | 3x LEDs | Ultrasonic distance sensor| Passive infrared motion sensor |
|:--------:|:-------:|:--------:|:--------:|
| ![tactile button](images/tactile-push-button.png) | ![LED](images/led.png) | ![ultrasonic distance sensor](images/ultrasonic-distance-sensor.png) | ![PIR sensor](images/pir.png) |

| Light Dependent Resistor | Moteur 5V | 3x Résistance 330Ω | 1x Résistance 470Ω |
|:--------:|:-------:|:--------:|:--------:|
| ![LDR](images/ldr.png) | ![motor](images/motor2.png) | ![330 resistor](images/resistor-330r.png) | ![470 resistor](images/resistor-470r.png) |

| 1x Capaciteur 1μF | 1x Buzzer | 1x Contrôleur de Moteur |
|:--------:|:-------:|:--------:|
| ![capacitor](images/capacitor.png) | ![buzzer](images/piezo-buzzer.png) | ![motor controller](images/motor-controller.png) |

| Battery Pack | 1x MCP3008 ADC | Potentiomètre |
|:--------:|:--------:|:-------:|
| ![battery pack](images/battery-pack.png) | ![ADC](images/ADC.png) | ![potentiometer](images/potentiometer.png) |

### Logiciels

Il n'y a pas de logiciels additionnels requis pour cette ressource en plus de ce qui est pré-installé sur l'image courante de Raspbian.

--- /collapse ---


--- collapse ---
---
title: Ce que vous allez apprendre
---

+ Apprendre comment câbler une variété de composants à un Raspberry Pi
+ Apprendre comment intéragir avec une variété de composants à l'aide de Python

--- /collapse ---

--- collapse ---
---
title: Additional information for educators
---

Si vous avez besoin d'imprimer ce projet, utilisez la [version compatible impression](https://projects.raspberrypi.org/fr/projects/physical-computing/print){:target="_blank"}.

You can [trouver la solution pour ce projet ici](http://rpf.io/p/en/physical-computing-get){:target="_blank"}.

--- /collapse ---



Loading