Timeline for Can I use a GPIO and do multiple things with it at the same time?
Current License: CC BY-SA 4.0
10 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Mar 9, 2020 at 12:57 | vote | accept | George | ||
| Feb 16, 2020 at 19:28 | comment | added | George | To improve, maybe checking if the process is alive, then checking if the wave signal is high takes too long and maybe an event of when it's high that triggers the adc reads is more efficient. | |
| Feb 16, 2020 at 19:18 | comment | added | George | Just added the code | |
| Feb 16, 2020 at 18:22 | comment | added | joan | What code are you using? Perhaps add a short script which shows the problem. | |
| Feb 16, 2020 at 17:19 | comment | added | George | I meant to read, while it's generating the PWM at the same time, i.e while it's outputing the PWM signal, I can read if it's high or low. | |
| Feb 16, 2020 at 17:19 | comment | added | George | that's weird, when I tried to do a read() it stopped the PWM functionality. | |
| Feb 16, 2020 at 8:45 | comment | added | joan | If you are using pigpio you can read any GPIO regardless of its mode. Just call the read() function. There is no need to set the GPIO as an input (because if you do so that stops the GPIO acting as an output). | |
| Feb 16, 2020 at 8:42 | history | edited | joan | CC BY-SA 4.0 | added 45 characters in body |
| Feb 16, 2020 at 7:55 | history | answered | joan | CC BY-SA 4.0 | |
| Feb 15, 2020 at 23:59 | comment | added | George | No this won't work. I just tried, and when you try reading it stops the operation of the PWM. |