arvix
Posts: 6
Joined: Wed May 04, 2016 12:26 pm

Emplyee night shift control

Fri Aug 19, 2016 11:51 am

Hello!

Finally I get Raspberry PI on my heands.

For learning purposis I whant make simple employee control and minitoring system.

I need write code where randomly after some time led lights on. And employee have 20 seconds to push button. If emploee sleep at night shift of course he cannot see this. If after 20 employee dont push button triggered alarm email to some one...

At hardware side number of GPI is not important. So there will be two GPI occupide , one for led light second for button.

So meybe some one can help me make this code step by step ?

Regards an thx

User avatar
davef21370
Posts: 897
Joined: Fri Sep 21, 2012 4:13 pm
Location: Earth But Not Grounded

Re: Emplyee night shift control

Fri Aug 19, 2016 1:07 pm

Have a look at this article https://www.raspberrypi.org/blog/new-ma ... ectronics/ and download the PDF. That will sort out the hardware side of things. Google "send email using python" for the email side of it.
It's fairly easy stuff even for a beginner and a good way to learn.

Dave.
Apple say... Monkey do !!

User avatar
Burngate
Posts: 6313
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Emplyee night shift control

Fri Aug 19, 2016 5:26 pm

arvix wrote:... simple employee control and monitoring system.
... randomly after some time led lights on. And employee have 20 seconds to push button. If employee sleep at night shift of course he cannot see this. If after 20 employee don't push button triggered alarm email to some one...
This does look like a good starting point ... as davef21370 says, follow the Magpi Essentials book for the hardware and you should have no problem, and the Python code could be relatively easy ...



My only gripe would be as your nightshift employee ... having spent several years on nightshift, do you really think, with the workload you pile on me, I've got time to sleep, never mind press silly buttons?
On the other hand, having been employed by you as the only guy in the workshop, in charge of the whole billion-dollar site, I assume you're aware that I'm capable of building a Pi Zero into a small pocket device that watches for a LED and after a short delay smashes a hammer on a button. Then I sleep.

Return to “Python”