From eb380c12306adeba915b05ab1ddff3396e2a1909 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 12 Jun 2024 12:23:47 -0400 Subject: [PATCH] Update main.c moved pigpiod and added & --- main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 2040c155..40fc204d 100644 --- a/main.c +++ b/main.c @@ -98,8 +98,8 @@ int main(int argc, char * argv[]) { fprintf(stderr, "HAB mode is ON\n"); } - FILE * gpiod = popen("sudo pigpiod", "r"); // start gpiod - pclose(gpiod); +// FILE * gpiod = popen("sudo pigpiod", "r"); // start gpiod +// pclose(gpiod); // // sleep(2); // @@ -554,6 +554,9 @@ int main(int argc, char * argv[]) { other_max[i] = -1000.0; } + FILE * gpiod = popen("sudo pigpiod &", "r"); // start gpiod + pclose(gpiod); + sleep(2); // moved to later in startup FILE * pigs = popen("pigs m 12 0 &", "r"); // set PWM audio utput to GPIO 12 (pin 32)