반응형
블로그 이미지
개발자로서 현장에서 일하면서 새로 접하는 기술들이나 알게된 정보 등을 정리하기 위한 블로그입니다. 운 좋게 미국에서 큰 회사들의 프로젝트에서 컬설턴트로 일하고 있어서 새로운 기술들을 접할 기회가 많이 있습니다. 미국의 IT 프로젝트에서 사용되는 툴들에 대해 많은 분들과 정보를 공유하고 싶습니다.
솔웅

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

글 보관함

카테고리


반응형

Automated Mung Bean Sprouts growing machine

(자동 콩나물 재배기)




※ How to grow mung bean sprouts


1. Rinse over beans and soak around for a day (24 hours)
2. Place net in pot and spread beans on the net and then cover the pot with something to make inside dark.
3. watering every 2 hours ==> Automate this step



※ Target : develop automated watering machine using Arduino



※  Components and Supplies



- Arduino Uno : $13.98



- 12V mini water pump  : $7.72



- 1 channel Relay : $3.37



- 12V Adapter + Barrel Jack : $5.3


- Small Breadboard and some jumper wires


- a piece of hose





※ Circuit




※ Source Code


/*
* For Automated Mung Bean Sprouts growing machine
*
* Watering every 2 hours
* play music when watering
*
 * Relay pin 12
* speaker pin 8
*
 * created 22 Jan 2017
*
 *by Douglas Changsoo Park
*
 */
 
#include <SimpleTimer.h>
#include "pitches.h"
 
int relay = 12;
 
SimpleTimer timer;
 
int melody[] = {
  NOTE_G4,
  NOTE_G4,
  NOTE_A4,
  NOTE_A4,
  NOTE_G4,
  NOTE_G4,
  NOTE_E4,
  NOTE_G4,
  NOTE_G4,
  NOTE_E4,
  NOTE_E4,
  NOTE_D4,
  0,
  NOTE_G4,
  NOTE_G4,
  NOTE_A4,
  NOTE_A4,
  NOTE_G4,
  NOTE_G4,
  NOTE_E4,
  NOTE_G4,
  NOTE_E4,
  NOTE_D4,
  NOTE_E4,
  NOTE_C4,
  0 };
 
  int noteDurations[] = {
  1,1,1,1,
  1,1,2,
  1,1,1,1,
  3,1,
  1,1,1,1,
  1,1,2,
  1,1,1,1,
  3,1
  };
 
void setup() {
  // put your setup code here, to run once:
  pinMode(relay, OUTPUT);
 digitalWrite(relay, HIGH);
  timer.setInterval(7200000, watering);

}
 
void loop() {
  // put your main code here, to run repeatedly:
  timer.run();
}
 
void watering() {
  digitalWrite(relay, LOW);
  music();

  music();

  digitalWrite(relay, HIGH);
  noTone(8);
}
 
void music() {
  for(int thisNote = 0; thisNote < 26; thisNote++) {
      int noteDuration = 250 * noteDurations[thisNote];
      tone(8, melody[thisNote], noteDuration);
      int pauseBetweenNotes = noteDuration * 1.30;
      delay(pauseBetweenNotes);
      noTone(8);
  }
}




※ Picture





※ Youtube



반응형