20150307_2038141.jpg (1863621Bytes)
So I go to school at ITT Tech and after turning in our project I now get to mess with the remnants of what we built. Now what I have built and will put a picture in of is a basic water sensor and arduino package. This worked fine and the teacher liked it but I have always been worried that the LED was so dim when it turned on that we could barely see it. The teacher said it was fine and let us go. I on the other hand am not happy. I want that LED to work dang it. Plus, I would also like to make the LED a dc motor instead. Of course when we plugged it in in a demo to my wife it didnt work besides a tiny tiny little rumble inside the case. I personally think it is the code that is the problem but I do not have near enough expertise with coding to modify it much more then what I have already done. Here is the code at the bottom. And i will try my best to put a picture of my small project too. Thanks a lot in advance for any insight into my problem.
const int VAL_PROBE = 0; // Analog pin 0
const int MOISTURE_LEVEL = 450; // Analog pin 0 value after LED goes on
void setup(){
Serial.begin(9600); // Set baud rate
}
void LedState(int state){
digitalWrite(13, state); // Assign pin 13 to the LED
}
void loop(){
int moisture = analogRead(VAL_PROBE); // Sets moisture to equal the value of the analog pin 0
Serial.println(moisture);
if(moisture > MOISTURE_LEVEL){
LedState(HIGH);
} else {
LedState(LOW);
}
delay(100);
}