Small python app on Raspberry Pi to record time button pushed
$30-250 USD
已完成
已发布超过 8 年前
$30-250 USD
货到付款
I would like to monitor the operation of a piece of industrial equipment. It's operated with a foot pedal, and I basically want to count each time the pedal was pushed, and record that time stamp in a database.
The end goal is going able to query and report on how many times the machine was cycled in an hour, day, etc.
I have experience with databases, and don't need help there, but I need help collecting the data.
The machine has an extra set of terminals on a relay switch. There's no voltage on these terminals, it just opens and closes a switch as the foot pedal is depressed.
I'm been playing around with a raspberry pi and was able to create this: [login to view URL]
Instead of the pushing the button on the breadboard that webpage, I wired it to the above relay terminals and I'm able to watch the other color LED turn on when the pedal is pushed.
MySQL is installed on the PI. I think modifying the above python code to insert a record into a table will get me what I'm I'm looking for. But this can be done in whatever way is most efficient if I'm not on the right track.
I'd also like to have a small GUI window where there's a button that says Start.
After pushing that button on the screen then every time the machine's foot pedal is pushed it inserts [login to view URL] into table with the name of the raspberry pi and a time stamp. Each pedal push would be at a minimum several seconds apart.
A counter on the screen shows how many times the foot pedal has been pushed since the Start button on the screen was pressed.
There's a stop button on the screen to push when you're done, and after pushing that then no more pedal pushes are recorded until you press start again.
Each time you press start the on screen counter starts back at zero.
The only thing I want for sure (because I have physically already have it) is to use a raspberry pi. Everything else can be changed if there's an easier way.
i am Assistant Technical manager of Sublime Enterprise . i am working on raspberry pi from last 3 years & i have 5 year experience to work on microcontroller, PLC ,arduino e.t.c , i also design a raspberry pi based industrial product . i have design 400+ raspberry based product . i have strong grip on raspbeery pi & interfacing peripheral with it . I can do it easily without any problem.