Go to advanced search

by soldat
Tue Jun 18, 2019 9:17 pm
Forum: Python
Topic: Setting real time priority level on python app
Replies: 5
Views: 260

Re: Setting real time priority level on python app

I modified my answer, I think the root cause is a problem w/ sudo and the python env. Of course any good launcher will stash the PID of a service somewhere in something like /var/run/progname.pid The shell variable "$!" contains the PID of the last launched process, so something as simple as python...
by soldat
Tue Jun 18, 2019 8:42 pm
Forum: Python
Topic: Setting real time priority level on python app
Replies: 5
Views: 260

Re: Setting real time priority level on python app

I modified my answer, I think the root cause is a problem w/ sudo and the python env. Of course any good launcher will stash the PID of a service somewhere in something like /var/run/progname.pid The shell variable "$!" contains the PID of the last launched process, so something as simple as python...
by soldat
Tue Jun 18, 2019 8:24 pm
Forum: Python
Topic: Setting real time priority level on python app
Replies: 5
Views: 260

Re: Setting real time priority level on python app

What if you launch the code and chrt its PID number instead? I haven't tried that yet but im sure that works, from all the examples I've seen thats how its done. The problem is my program automatically launches at startup so I don't want to have to manually go find the pid every time and do that. W...
by soldat
Tue Jun 18, 2019 8:11 pm
Forum: Python
Topic: Setting real time priority level on python app
Replies: 5
Views: 260

Setting real time priority level on python app

I'm trying to set a real time priority level for my application. I've tried the suggested approach of: sudo chrt --rr 50 python3 app.py But I'm having troubles with python modules not being able to be imported when attempting the above. ImportError: No module named 'sanic' The application runs fine ...
by soldat
Fri Jun 14, 2019 6:18 pm
Forum: General discussion
Topic: Disable right click raspberry pi 7" touch screen (enable button hold)
Replies: 1
Views: 187

Disable right click raspberry pi 7" touch screen (enable button hold)

So I have an application where I need to detect a long key press in a web interface and then do something if the user held the key down. My application works fine with the mouse but when I'm using the touch screen the long hold is never detected. I've determined that this is likely because when I ho...
by soldat
Fri Apr 26, 2019 9:02 pm
Forum: Python
Topic: Replicating an existing keypad interface
Replies: 4
Views: 270

Re: Replicating an existing keypad interface

Interesting project. Keyboards often have de-bounce hardware and software. Maybe your simulated signals are being filtered by that. Yea a good friend of mine (who's a real engineer :lol: ) gave me a heads up on that the other day. I believe I've got it coded up to handle that. Side note, I was able...
by soldat
Fri Apr 26, 2019 1:21 pm
Forum: Python
Topic: Replicating an existing keypad interface
Replies: 4
Views: 270

Re: Replicating an existing keypad interface

So further investigation has revealed that in fact the present implementation is a bit simpler than first thought. There's pullup resistors on the rows of the keypad and the columns are held low. When a row is brought low (key pushed thusly connected to a low column) some code is fired off to determ...
by soldat
Mon Apr 22, 2019 9:00 pm
Forum: Python
Topic: Replicating an existing keypad interface
Replies: 4
Views: 270

Replicating an existing keypad interface

So I'm trying to replicate an existing keypad interface that sits on top of a bigger solution. My goal is to replace the physical keypad with a touch screen. The existing keypad uses a simple button matrix that's connected up to a PIC (PIC18F458). Unfortunately the present implementation is not a si...

Go to advanced search