Challenge - Extra Credit - using linux command line or Python code can you copy a file from your Raspberry Pi to your google drive? Can you copy one from your google drive to your Raspbeery Pi?
Instructables - Photo Booth
- Lecture/Presentation - Duration: 40 Min
- Link: https://www.instructables.com/class/Raspberry-Pi-Class/
- Instructions & Expectations: Listen and take notes in your Interactive Lab Book. If needed review the posted slide presentation
- Dig Deeper:
See Lesson 4 for Setting up the Video
https://www.instructables.com/lesson/Navigate-the-Raspberry-Pis-Software-Part-2/
run
sudo apt-get update
sudo apt-get install imagemagick
run the nano text editor
nano helloMe.shin the editor type
#!/bin/sh
raspistill -w 800 -h 600 -t 10000 -tl 2000 -o image%02d.jpg convert -delay 10 -loop 0 image*.jpg animateMe.gif
See lesson 5 for Setting up the Audio
https://www.instructables.com/lesson/Intro-to-Sonic-Pi-and-Playing-Media/
in the command shell run
amixer cset numid=3 1
then run
sudo apt-get install mpg321 -y
to paly a mp3 file run
mpg321 fileName.mp3
See lesson 6 for Scripting
https://www.instructables.com/lesson/Intro-to-Python/
The GPIO.BOARD option
specifies that you are referring to the pins by the number of the pin
the the plug - i.e the numbers printed on the board (e.g. P1) and in the
middle of the diagrams below.
The GPIO.BCM option
means that you are referring to the pins by the "Broadcom SOC channel"
number, these are the numbers after "GPIO" in the green rectangles
around the outside of the below diagrams:
Unfortunately the BCM numbers changed between versions of the Pi1 Model B, and you'll need to work out which one you have guide here. So it may be safer to use the BOARD numbers if you are going to use more than one Raspberry Pi in a project.
#GPIO
# 3.3v = 1,17, 5.0v =2,4 GND = 6,9,14,20,25,30,34,39
# my LED is on Pin 3 and Ground is on Pin 6
import RPi.GPIO as GPIO
from time import sleep # import time library
GPIO.setmode(GPIO.BOARD)
myOutLED = 3
myInputSwitch = 5
GPIO.setup(myOutLED, GPIO.OUT)
GPIO.setup(myInputSwitch, GPIO.IN)
while True :
inputState = GPIO.input(myInputSwitch)
print(inputState)
if inputState == False:
print('button pressed')
photoCounter=4
while (photoCounter > 0):
GPIO.output(myOutLED, True)
print(' LED ON')
sleep(1)
GPIO.output(myOutLED, False)
print(' LED OFF')
sleep(1)
photoCounter=photoCounter-1
GPIO.cleanup()
Open LAB and/or Robot Club # 3.3v = 1,17, 5.0v =2,4 GND = 6,9,14,20,25,30,34,39
# my LED is on Pin 3 and Ground is on Pin 6
import RPi.GPIO as GPIO
from time import sleep # import time library
GPIO.setmode(GPIO.BOARD)
myOutLED = 3
myInputSwitch = 5
GPIO.setup(myOutLED, GPIO.OUT)
GPIO.setup(myInputSwitch, GPIO.IN)
while True :
inputState = GPIO.input(myInputSwitch)
print(inputState)
if inputState == False:
print('button pressed')
photoCounter=4
while (photoCounter > 0):
GPIO.output(myOutLED, True)
print(' LED ON')
sleep(1)
GPIO.output(myOutLED, False)
print(' LED OFF')
sleep(1)
photoCounter=photoCounter-1
GPIO.cleanup()
- LAB - Duration: 60 Min
- Link: Robot Club Google Sites
- Instructions & Expectations: Connect with your Robot Club Team. You will either be working on your Robot Project or an Open Lab Project.
- You will need to account for your time. You will need to convince me by your form submission that you worked given the time allotted.
- If you or your Robot Club Team worked on the Robot Club project, you will make sure your Robot Project Status Google docs are updated.
- If you worked on an Open Lab Project, you will also need to tell me about what you accomplished and what you are planning next.
- How to Submit Assignment: Each Student needs to account for your time.
- Every One Do The Following: Turn in an Open Lab Blog Post
- If you also worked on your Robot Club Project, also UPDATE your Robot Project Status Google docs.
- Dig Deeper: Open Lab:
- Robot Club Google Sites
- Guest LED Lesson
- Printers - Work on taking the printers apart
- TinkerCAD
- Udemy - My Courses (specifically the Arduino Workshop and Electronics Engineering Technology class)
- Assignment - Duration: 2-10 Min
- Instructions & Expectations: Desk cleanup, put away all projects, find your assigned job
- How to Submit Assignment: When Complete, check yourself off on Sign Out Sheet - 2 Points
No comments:
Post a Comment