Go to advanced search

by kytkija
Fri Aug 30, 2019 1:58 pm
Forum: Advanced users
Topic: Wake from halt
Replies: 76
Views: 74082

Re: Wake from halt

Hi, I think in this thread is the best knowledge about waking up with GPIO3. I use it with relay NO contacts with another machine, to make Pi3B+ it's slave. When machine is on, relay is activated and pi is booted. Relay stays on as long as the machine is on. When machine is shut down, relay gets dea...
by kytkija
Thu Aug 29, 2019 1:00 pm
Forum: Troubleshooting
Topic: Unstable power on/off switch (actually relay) GPIO3-GND
Replies: 0
Views: 344

Unstable power on/off switch (actually relay) GPIO3-GND

Hello, I have a Rpi 3B+, counting output from a production machine. I want it to shut down and start in sync with the actual machine. I have wired a relay from production machine with No contact to Rpi, where it is connected to the GPIO3 and GND pins. They are the standard 'on/off' -switch pins. I d...
by kytkija
Thu Jun 06, 2019 9:20 pm
Forum: Advanced users
Topic: Multiple pi's raporting variables to mysql through one 'server' pi
Replies: 1
Views: 232

Multiple pi's raporting variables to mysql through one 'server' pi

Hello all, I am building an production data acquisition system with pi, that saves production volume and and downtime etc to mysql server. I have made a python program that does it well, User interface is built with tkinter. This is fine so far with machines that have only One operator. A PC with my...
by kytkija
Sat May 04, 2019 6:17 pm
Forum: Beginners
Topic: Reading several inputs for same counter
Replies: 6
Views: 409

Re: Reading several inputs for same counter

After first testings, with 600 signals generated by switches I got 0% loss. This solution seems to work, Thank you very much!

PIGPIO seems so interesting, so I start learning more about it.

Best regards
kytkija
by kytkija
Fri May 03, 2019 8:32 pm
Forum: Beginners
Topic: Reading several inputs for same counter
Replies: 6
Views: 409

Re: Reading several inputs for same counter

A pigpio method. #!/usr/bin/env python import pigpio import time GPIO=[7, 8, 9, 10, 11] cb_list=[] counter=0 def callback(g, l, t): global counter counter += 1 print(g, counter) pi = pigpio.pi() if not pi.connected: exit() for g in GPIO: cb_list.append(pi.callback(g, pigpio.RISING_EDGE, callback)) ...
by kytkija
Fri May 03, 2019 6:03 am
Forum: Beginners
Topic: Reading several inputs for same counter
Replies: 6
Views: 409

Re: Reading several inputs for same counter

In general, if you are dealing with multiple asynchronous events (your button presses in this case) and want to record each one without interference from any of the others, you would need to have a separate subprocess (not just a separate thread) for each event, to work around Python's limitation t...
by kytkija
Thu May 02, 2019 9:20 am
Forum: Beginners
Topic: Reading several inputs for same counter
Replies: 6
Views: 409

Re: Reading several inputs for same counter

And another question;

When I run the readbutton() function in second thread where I call the nested function increment( ), will the increment -function run on the parallel thread that was started before or will it pop up in the main thread?

Best regards
Kytkija
by kytkija
Thu May 02, 2019 7:34 am
Forum: Beginners
Topic: Reading several inputs for same counter
Replies: 6
Views: 409

Reading several inputs for same counter

Hello all, Could someone give me directions, advices or examples on following; I have created a Python program that is counting pulses from inputs and showing it to user via Tkinter GUI. Pulses are 1< sec long. The pulses should be increasing the same global counter. It is working for me now, howeve...
by kytkija
Mon Feb 25, 2019 2:47 pm
Forum: Python
Topic: GPIOZero, tkinter and is_pressed
Replies: 3
Views: 453

Re: GPIOZero, tkinter and is_pressed

Hm, not sure what I did but so far it works - I am following if I get the results that I hoped. I just started a new thread that calls for the button press -watch. As I couldn't call the function that is doing the increment from main thread, I moved the increment function under the function that run...
by kytkija
Mon Feb 25, 2019 2:00 pm
Forum: Python
Topic: GPIOZero, tkinter and is_pressed
Replies: 3
Views: 453

GPIOZero, tkinter and is_pressed

Hello, My simple question as total newbie - couldn't find an answer that I would understand. If I have button.is_pressed = myfunction statement in the mainloop() of tkinter, should it be registering button presses when ever they occur or only in that spesific phase of the program? My 'button' is a r...
by kytkija
Fri Feb 15, 2019 10:37 pm
Forum: General discussion
Topic: Raspbian with Read-only Root
Replies: 195
Views: 96723

Re: Raspbian with Read-only Root

Has anyone got the overlayfs working with 3B+? I am total beginner, but it would be crucial for my project. I cant find exact/fresh information anywhere. Is it possible with newest stretch, anyone got tips where to find script? It should be ready script or well documented, because i dont have much u...
by kytkija
Fri Feb 15, 2019 8:09 pm
Forum: Advanced users
Topic: Read-only fs (on purpose!), problems with ssl/time
Replies: 7
Views: 804

Re: Read-only fs (on purpose!), problems with ssl/time

Hi,

I am sorry for making off-topic, and I can't PM here so - you told you got overlayfs working in 3B+. I have been struggling with it and cant seem to find solution. Could you give me a tip where to start?
by kytkija
Fri Feb 15, 2019 1:54 pm
Forum: Raspbian
Topic: Readonly Root with OverlyFS
Replies: 45
Views: 20943

Re: Readonly Root with OverlyFS

Hello all! I am totally new with raspbian and raspberry, been learning Python for a week now. And it already seems good, writing&reading to MySQL etc. :) My app is just about to be ready. But it would be crucial for me to get the overlayFS working, as the raspbian will be connected to another machin...

Go to advanced search