From cadd905cc8513dde0dd09f51693812f1c46ea7e7 Mon Sep 17 00:00:00 2001 From: John Janus Date: Fri, 6 Oct 2017 09:32:53 +0200 Subject: [PATCH] test with pulldown resistors --- simple_try.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/simple_try.c b/simple_try.c index 528b643..50d6ba4 100644 --- a/simple_try.c +++ b/simple_try.c @@ -97,11 +97,11 @@ int main(void) { pinMode(CHNL2BTN, INPUT); pinMode(INTROBTN, INPUT); pinMode(HORNBTN, INPUT); - pullUpDnControl(PWRBTN, PUD_UP); - pullUpDnControl(CHNL1BTN, PUD_UP); - pullUpDnControl(CHNL2BTN, PUD_UP); - pullUpDnControl(INTROBTN, PUD_UP); - pullUpDnControl(HORNBTN, PUD_UP); + pullUpDnControl(PWRBTN, PUD_DOWN); + pullUpDnControl(CHNL1BTN, PUD_DOWN); + pullUpDnControl(CHNL2BTN, PUD_DOWN); + pullUpDnControl(INTROBTN, PUD_DOWN); + pullUpDnControl(HORNBTN, PUD_DOWN); if (wiringPiISR(PWRBTN, INT_EDGE_RISING, pwrBtn)) printf("failed to initialize pwrBtn\n"); if (wiringPiISR(CHNL1BTN, INT_EDGE_RISING, chnl1Btn)) printf("failed to initialize chnl1Btn\n"); if (wiringPiISR(CHNL2BTN, INT_EDGE_RISING, chnl2Btn)) printf("failed to initialize chnl2Btn\n"); @@ -172,9 +172,9 @@ int main(void) { digitalWrite(CHNL1LED, HIGH); digitalWrite(CHNL2LED, HIGH); digitalWrite(INTROLED, HIGH); - pullUpDnControl(PWRBTN, PUD_DOWN); - pullUpDnControl(CHNL1BTN, PUD_DOWN); - pullUpDnControl(CHNL2BTN, PUD_DOWN); - pullUpDnControl(INTROBTN, PUD_DOWN); + pullUpDnControl(PWRBTN, PUD_OFF); + pullUpDnControl(CHNL1BTN, PUD_OFF); + pullUpDnControl(CHNL2BTN, PUD_OFF); + pullUpDnControl(INTROBTN, PUD_OFF); } -- 2.47.1