With Instructables you can share what you make with the world, and tap into an ever-growing community of creative experts.
Tell us about yourself!
Ooops!! You are so right! We have an error in our example, it should read: (A) instead of if(soilMoisture.read() > 400) use if(soilMoisture.read() < 600). (B) also: Serial.println("High moisture detected"); should be changed to: Serial.println("Low moisture detected"); We're sorryyy! and will fix the guide accordingly. Thanks for letting us know.
The transistor amplifies the signal coming out of the Arduino, to get louder sounds from the speaker.The diode is a "fly-back" diode, meant to protect the circuit from reverse currents, but in most cases this diode will not be necessary with piezo speakers, but more important with regular (coil) speakers.
Let your inbox help you discover our best projects, classes, and contests. Instructables will help you learn how to make anything!
© 2016 Autodesk, Inc.