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");
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);
}