Files
c5-addon-example/4ch_fet/main.c
2025-04-24 11:51:10 +09:00

23 lines
413 B
C

#include <wiringPi.h>
#define PIN_CH0 8 // PIN 3
#define PIN_CH1 9 // PIN 5
#define PIN_CH2 7 // PIN 7
#define PIN_CH3 15 // PIN 8
static int pins[] = {PIN_CH0, PIN_CH1, PIN_CH2, PIN_CH3};
static int pins_len = 4;
int main(void){
wiringPiSetup();
for(int i = 0; i < pins_len; i++) {
pinMode(pins[i], OUTPUT);
digitalWrite(pins[i], LOW);
delay(1000);
digitalWrite(pins[i], HIGH);
}
return 0;
}