diff --git a/HW5_GPIO/README.md b/HW5_GPIO/README.md new file mode 100644 index 0000000000000000000000000000000000000000..4909460d43bcbe2a452c04c936569b760e1f50b0 --- /dev/null +++ b/HW5_GPIO/README.md @@ -0,0 +1,34 @@ +# 실전코딩 2 + +# HW5_GPIO 연결 + +## HW 사진1 +-  + +## HW 사진2 +-  + +## HW 사진3 +-  + +## HW GPIO 연결 코드 + +```C code +#include <stdio.h> +#include <wiringPi.h> + +int main(){ + int i; + if(wiringPiSetup()== -1) return -1; + pinMode(29,OUTPUT); + + for(i=0 ; i<5; i++){ + digitalWrite(29,1); + delay(500); + digitalWrite(29,0); + delay(500); + } + + return 0; +} +``` diff --git a/HW5_GPIO/image/1.jpg b/HW5_GPIO/image/1.jpg new file mode 100644 index 0000000000000000000000000000000000000000..4c1e9cef5494b541a813bd58325449a5ecb731ca Binary files /dev/null and b/HW5_GPIO/image/1.jpg differ diff --git a/HW5_GPIO/image/2.jpg b/HW5_GPIO/image/2.jpg new file mode 100644 index 0000000000000000000000000000000000000000..29edd085ee83a95c215f9e7557456de20fdd6495 Binary files /dev/null and b/HW5_GPIO/image/2.jpg differ diff --git a/HW5_GPIO/image/3.jpg b/HW5_GPIO/image/3.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1efa6de91142a4e4fb2b276eb02bc271913c7bc1 Binary files /dev/null and b/HW5_GPIO/image/3.jpg differ diff --git a/HW5_GPIO/image/test.c b/HW5_GPIO/image/test.c new file mode 100644 index 0000000000000000000000000000000000000000..abe38d7651aeb1dab322f4bf66d33377ed23190c --- /dev/null +++ b/HW5_GPIO/image/test.c @@ -0,0 +1,17 @@ +#include <stdio.h> +#include <wiringPi.h> + +int main(){ + int i; + if(wiringPiSetup()== -1) return -1; + pinMode(29,OUTPUT); + + for(i=0 ; i<5; i++){ + digitalWrite(29,1); + delay(500); + digitalWrite(29,0); + delay(500); + } + + return 0; +} \ No newline at end of file