메뉴 건너뛰기

정보자료게시판

장비/디자인/구조

[아두이노] 수위를 감지해 자동 급수

by 라키 posted Aug 10, 2018
?

단축키

Prev이전 문서

Next다음 문서

ESC닫기

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

ESC닫기

크게 작게 위로 아래로 댓글로 가기 인쇄

아두이노릴레이연결

int relay=10;

void setup() {

  // put your setup code here, to run once:

  pinMode(relay,OUTPUT);

}

 

void loop() {

  // put your main code here, to run repeatedly:

  digitalWrite(relay,HIGH);

  delay(5000);

  digitalWrite(relay,LOW);

  delay(5000);

}

http://makeshare.org/bbs/board.php?bo_table=arduinoetc&wr_id=14

수위감지센서연결

int relayPin=10;

int WSPin=0;

int val=0;

 

void setup() {

  // put your setup code here, to run once:

  pinMode(relayPin,OUTPUT);

  Serial.begin(9600);

}

 

void loop() {

  // put your main code here, to run repeatedly:

  val=analogRead(WSPin);

  

  if(val>100) digitalWrite(relayPin,HIGH);

  else digitalWrite(relayPin,LOW);

 

  Serial.println(val);

  delay(500);

}

http://deneb21.tistory.com/223

우노전력소비량

 

http://blog.naver.com/PostView.nhn?blogId=twophase&logNo=220984878969&categoryNo=35&parentCategoryNo=0&viewDate=&currentPage=1&postListTopCurrentPage=1&from=search


위로