Add examples
This commit is contained in:
22
4ch_fet/main.c
Normal file
22
4ch_fet/main.c
Normal file
@@ -0,0 +1,22 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user