-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #84 from RaspberryPiFoundation/dev
v 0.4.0
- Loading branch information
Showing
11 changed files
with
838 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
# Potentiometer connected to ADC0, GND and 3V | ||
# Potentiometer connected to GP26 (ADC0), GND and 3V | ||
|
||
from time import sleep | ||
from pico import Pot | ||
|
||
pot = Pot(0) | ||
pot = Pot(26) | ||
|
||
while True: | ||
print(pot.value, pot.voltage, pot.percent) | ||
print(pot.value, pot.voltage) | ||
sleep(0.1) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from picozero import Servo | ||
from time import sleep | ||
|
||
servo = Servo(1) | ||
|
||
servo.min() | ||
sleep(1) | ||
|
||
servo.mid() | ||
sleep(1) | ||
|
||
servo.max() | ||
sleep(1) | ||
|
||
servo.off() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from picozero import Servo | ||
|
||
servo = Servo(1) | ||
|
||
servo.pulse() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from picozero import Servo | ||
from time import sleep | ||
|
||
servo = Servo(1) | ||
|
||
for i in range(0, 100): | ||
servo.value = i / 100 | ||
sleep(0.1) | ||
|
||
servo.off() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ | |
RGBLED, | ||
Motor, | ||
Robot, | ||
Servo, | ||
|
||
DigitalInputDevice, | ||
Switch, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters