skleary
Posts: 4
Joined: Tue Nov 27, 2012 1:01 am

GPIO and Time

Tue Nov 27, 2012 7:57 pm

I am a little new at this but I am working on a project and was wondering how I could correspond time and the GPIO. I am hoping to turn on lights corresponding with the time of the day. I was wondering how to go about that.

pygmy_giant
Posts: 1562
Joined: Sun Mar 04, 2012 12:49 am

Re: GPIO and Time

Tue Nov 27, 2012 8:01 pm

You could use a real-time clock or a light sensor of some kind to tell when to switch them on.

The Pi has neither of these and so they would have to be added via the correct interface.

Have a look at this thread: http://www.raspberrypi.org/phpBB3/viewt ... DR#p222082

and this one:

http://www.raspberrypi.org/phpBB3/viewt ... dr#p219167

Personally if using an LDR I would google 'LDR' 'Transistor' 'Switch' and adapt a sipmle circuit using an LDR as part of a potential divider to interface with the GPIO.

Otherwise I would go to ebay and search for 'Real Time Clock' and 'Raspberry Pi'

skleary
Posts: 4
Joined: Tue Nov 27, 2012 1:01 am

Re: GPIO and Time

Tue Nov 27, 2012 10:03 pm

pygmy_giant wrote:You could use a real-time clock or a light sensor of some kind to tell when to switch them on.

The Pi has neither of these and so they would have to be added via the correct interface.

Have a look at this thread: http://www.raspberrypi.org/phpBB3/viewt ... DR#p222082

and this one:

http://www.raspberrypi.org/phpBB3/viewt ... dr#p219167



Personally if using an LDR I would google 'LDR' 'Transistor' 'Switch' and adapt a sipmle circuit using an LDR as part of a potential divider to interface with the GPIO.

Otherwise I would go to ebay and search for 'Real Time Clock' and 'Raspberry Pi'
-
-
-
Thanks a lot!

Return to “Automation, sensing and robotics”