+ 2

Im using raspberry pi 2 model B. How can I turn on an LED in 6 a.m. and off in 6:45 a.m. with python.

12th May 2018, 5:49 AM
Vishnu Ram M
Vishnu Ram M - avatar
14 Réponses
+ 1
Work you way through (part of) this titorial and you should be able to solve your problem and more. https://projects.raspberrypi.org/en/projects/physical-computing
12th May 2018, 6:46 AM
davy hermans
davy hermans - avatar
+ 6
You have to install this module first: http://gpiozero.readthedocs.io/en/stable/installing.html
12th May 2018, 7:58 AM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 1
ok I'll try it thanks
13th May 2018, 4:08 AM
Vishnu Ram M
Vishnu Ram M - avatar
0
Thanks I'll try it.
12th May 2018, 6:48 AM
Vishnu Ram M
Vishnu Ram M - avatar
0
you are welcome.
12th May 2018, 6:49 AM
davy hermans
davy hermans - avatar
0
It doesn't work. It says Import error : no module named gpiozero
12th May 2018, 6:54 AM
Vishnu Ram M
Vishnu Ram M - avatar
0
I need some ideas and suggestions
12th May 2018, 7:09 AM
Vishnu Ram M
Vishnu Ram M - avatar
0
it says apt command not found
12th May 2018, 8:07 AM
Vishnu Ram M
Vishnu Ram M - avatar
0
first, open command prompt then, enter: sudo apt-get update (press enter) sudo apt-get upgrade (press enter)
12th May 2018, 9:19 PM
davy hermans
davy hermans - avatar
0
it takes long time for apt get-upgrade
13th May 2018, 7:09 AM
Vishnu Ram M
Vishnu Ram M - avatar
0
yes it completed but it still says apt command not found
13th May 2018, 7:11 AM
Vishnu Ram M
Vishnu Ram M - avatar
0
don't use the apt command in your code, only in the command prompt to update and upgrade your RPi
13th May 2018, 7:28 AM
davy hermans
davy hermans - avatar
0
You will probably benefit from reading this aswell. (use free download button) https://www.raspberrypi.org/magpi/issues/49/
13th May 2018, 8:15 AM
davy hermans
davy hermans - avatar
0
I'm using in lxterminal only
13th May 2018, 8:17 AM
Vishnu Ram M
Vishnu Ram M - avatar