Hi,
I'm completely new to python, and have a small problem.
I have a program which constantly reads from the serial port.
The read function is within a while(1) loop and save the received data to a mysql database.
This part is working perfect.
Now I want to add a buzzer, which is on for 0.5 sec each time I receive some data on the serial port.
Right now I'm simple setting the GPIO output to True, sleep for 0.5 sec and set the GPIO to False.
This is working, but it will unfortunately stop the reading from the serial port in the meantime.
Is there a way to put the buzzer function in a function and run it parallel with the reading function?