Go to advanced search

by marcc70
Tue Apr 23, 2019 12:54 pm
Forum: Python
Topic: Threading serial read in python GUI
Replies: 15
Views: 589

Re: Threading serial read in python GUI

Alright so my program is almost finished, I made alot of progress today.

The only thing what I need to accomplish is to change the text of a label in function def processIncoming(self):

The label is made in function: def __init__(self, master, queue, endCommand):
by marcc70
Tue Apr 23, 2019 10:54 am
Forum: Python
Topic: Threading serial read in python GUI
Replies: 15
Views: 589

Re: Threading serial read in python GUI

import tkinter as Tkinter import time import threading import random import queue as Queue import serial import RPi.GPIO as GPIO ser = serial.Serial('/dev/ttyACM0', 9600) GPIO.setmode(GPIO.BOARD) GPIO.setup(33, GPIO.OUT) GPIO.output(33, GPIO.HIGH) def ledON5(): print("LED BUTTON PRESSED") if GPIO.i...
by marcc70
Tue Apr 23, 2019 9:27 am
Forum: Python
Topic: Threading serial read in python GUI
Replies: 15
Views: 589

Re: Threading serial read in python GUI

Found some places explaining solutions to the problem: https://scorython.wordpress.com/2016/06/27/multithreading-with-tkinter/ https://www.oreilly.com/library/view/python-cookbook/0596001673/ch09s07.html I saw that the last link is very very similar to my problem, but I can't get the code to work. ...
by marcc70
Mon Apr 22, 2019 1:22 pm
Forum: Python
Topic: Threading serial read in python GUI
Replies: 15
Views: 589

Re: Threading serial read in python GUI

Alright then, Well maybe I am going back to c#. I have got a windowsform app working with the serial data displaying etc. The only thing I couldn't accomplish back then was the control over GPIO in c#. Now I am reading something about making a application in mono c# or .net or something. And they ar...
by marcc70
Mon Apr 22, 2019 8:53 am
Forum: Python
Topic: Threading serial read in python GUI
Replies: 15
Views: 589

Re: Threading serial read in python GUI

Apperently, the library Queue doesn't works with a GUI..
by marcc70
Mon Apr 22, 2019 8:12 am
Forum: Python
Topic: Threading serial read in python GUI
Replies: 15
Views: 589

Re: Threading serial read in python GUI

Hi Andyroo, Thank you, I got your example working. I ripped up a bit of your code and added the serial part, it is working now in a python shell. Now what I need to do is add this in to a GUI somehow =P. Here is my code working in a python shell: from threading import Thread from queue import Queue ...
by marcc70
Sun Apr 21, 2019 7:13 pm
Forum: Python
Topic: Threading serial read in python GUI
Replies: 15
Views: 589

Re: Threading serial read in python GUI

Sounds very logic to me, and this is how threading was explained to me before.

But still I have no clue how to code this in my program..
by marcc70
Sun Apr 21, 2019 3:09 pm
Forum: Python
Topic: Threading serial read in python GUI
Replies: 15
Views: 589

Re: Threading serial read in python GUI

Hi Andyroo, Thank you for your reply. I implemented your thread example in my code. It is half way working.. In run1 I have my serial read and then I print it to my terminal. In run 2, everything of my GUI. The problem is now, the GUI works still how it should. But the program only loops 1 time trou...
by marcc70
Sun Apr 21, 2019 9:05 am
Forum: Python
Topic: Threading serial read in python GUI
Replies: 15
Views: 589

Threading serial read in python GUI

Hello there, I have a problem with a GUI I want to make, for now a have a GUI with control buttons over the GPIO. That works fine, but I want to implement serial read and view the data in my GUI. I know that in c# you can use a serial port in combination with the background worker. But in python the...
by marcc70
Thu Mar 28, 2019 8:24 am
Forum: Windows 10 for IoT
Topic: WiringPi c# visual studio 2017
Replies: 3
Views: 874

Re: WiringPi c# visual studio 2017

Well I am back,

I found another easy solution, I made a GUI in Python 3 and from there on it is easy to control the GPIO of the Raspberry Pi 3B+.
Somehow it should be possible I guess with visual studio, but I have no time at the moment to discover that out.
by marcc70
Mon Mar 18, 2019 9:30 am
Forum: Windows 10 for IoT
Topic: WiringPi c# visual studio 2017
Replies: 3
Views: 874

Re: WiringPi c# visual studio 2017

Hi there,

I was wondering if anyone has a solution for this?
Really want to get this working.
by marcc70
Mon Mar 11, 2019 3:27 pm
Forum: Other programming languages
Topic: C# WiringPi - unable to load libwiringPi.so
Replies: 11
Views: 3374

Re: C# WiringPi - unable to load libwiringPi.so

Hi There boybanyas,

Did you resolve this problem?
Because at the moment I am stuck with exactly the same problem as yours.

Would appreciate it if you have time to response.

Thanks and regards,

Marc
by marcc70
Fri Mar 08, 2019 8:36 am
Forum: Windows 10 for IoT
Topic: WiringPi c# visual studio 2017
Replies: 3
Views: 874

WiringPi c# visual studio 2017

Hi there, I have got this error if I am debugging my c# application: System.DllNotFoundException: can not load DLL libwiringPi.so n: (HRESULT: 0x8007007E)' What I want is to set outputs on my raspberry Pi high and low with a button, and maybe expand it after that. What I did is, I added a refrence l...

Go to advanced search