Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arduino - 광 선세 개발 #38

Closed
jongkwang opened this issue Nov 18, 2017 · 5 comments
Closed

Arduino - 광 선세 개발 #38

jongkwang opened this issue Nov 18, 2017 · 5 comments

Comments

@jongkwang
Copy link
Member

jongkwang commented Nov 18, 2017

Arduino - 광 선세 개발 + 문서화

Arduino - 광 선세 개발

  • 광량 측정

문서화

@ssunhj2
Copy link
Contributor

ssunhj2 commented Nov 19, 2017

조도센서

code

int lightPin = 0;
int threshold = 250;

void setup()
{

Serial.begin(9600);
pinMode(13, OUTPUT);

}

void loop()
{

Serial.println(analogRead(lightPin)); 
if(analogRead(lightPin) > threshold ){    
    digitalWrite(13, HIGH);
    Serial.println("high"); 
}else{
    digitalWrite(13, LOW);
    Serial.println("low"); 
}
delay(1000);

}

회로도

image

@ssunhj2
Copy link
Contributor

ssunhj2 commented Nov 20, 2017

조도센서 (node mcu 버전)

결과

빛 공급받을때 수치

turnon

빛을 차단했을때 수치

turnoff

code

void setup()
{

Serial.begin(9600);  // 시리얼 통신을 시작. 속도는 9600 으로 설정

}

void loop()
{

int sensorValue = analogRead(A0);  // 아날로그값을 저장

float voltage = sensorValue * (5.0 / 1023.0);  // 아날로그 값을 변환

Serial.println(voltage);  // 저장된 값을 출력

    delay(1000);  // 1초 delay

}

회로도

nodemcu

@jongkwang
Copy link
Member Author

.md 파일과 .ino 파일을
이곳 말고 해당 위치에 넣어 주세요 ^^
screen_shot_2017-11-20_at_10_12_31_pm

@jongkwang
Copy link
Member Author

그리고 가급적, 회로도를 이쁘게 그려주세요
선이 너무 꼬였어요~

센서의 위치를 옮기면 점퍼 케이블이 깔끔하게 정리 되겠습니다.

@jongkwang
Copy link
Member Author

Pull Request #51 #52 에서 처리되어 Close 합니다.
수고하셨어요 ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants