티스토리 뷰
[본 아티클은 FabLab 서울에서 2017년 하반기에 참여한 메이커 아카데미 수업 및 프로젝트 진행 사항에 대한 글입니다.]
참고자료:
color LED:
http://www.toptechboy.com/arduino/lesson-13-controlling-rgb-led-with-arduino/
potentiometer:
https://www.arduino.cc/en/tutorial/potentiometer
문제: 칼라 LED가 캐소드 방식이라고 함
아두이노의 5v 핀과 LED의 common ground핀을 연결해야 한다.
회로도

회로 연결 그림:

source:
int colorRed = 9;
int colorGreen = 10;
int colorBlue = 11;
int rValue = 0;
int gValue = 0;
void setup() {
Serial.begin(9600);
pinMode(colorRed, OUTPUT);
pinMode(colorGreen, OUTPUT);
pinMode(colorBlue, OUTPUT);
}
void loop() {
rValue = analogRead(A0);
gValue = analogRead(A1);
Serial.print(rValue);
Serial.print(",");
Serial.println(gValue);
rValue = 255 - rValue / 1023.0 * 100;
gValue = 255 - gValue / 1023.0 * 100;
analogWrite(colorRed,rValue);
analogWrite(colorGreen,gValue);
analogWrite(colorBlue,255 - 100);
delay(100);
}
동작사례 비디오:

'Making > maker academy' 카테고리의 다른 글
[메이커 아카데미] Final Project 사진들 (0) | 2019.03.29 |
---|---|
[메이커 아카데미] CNC 실습 (0) | 2019.03.29 |
[메이커 아카데미] 레이저 커터 실습 (0) | 2019.03.29 |
[메이커 아카데미] 레이저 커터 테스트 (0) | 2019.03.29 |
[메이커 아카데미] 레이저 커터(Kerf 찾기) (0) | 2019.03.29 |
- Total
- Today
- Yesterday
- 한글
- WSL
- ssh
- vscode
- 우분투
- 파이썬
- docker
- 단축키
- Stable Diffusion
- Maker
- comfyUI
- tensorflow
- cura
- MicroBit
- nodejs
- Arduino
- CAD
- conda
- Linux
- opencv
- vvvv
- 메이커
- fablab
- Python
- 3d프린터
- nvidia
- Fusion360
- ubuntu
- Streamlit
- git
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |