-
Notifications
You must be signed in to change notification settings - Fork 10
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
Update plant.ino #1
base: master
Are you sure you want to change the base?
Conversation
Hey William, |
- Updates to customization values o Lowered upper moisture limit to 1000 - Cleaned up use of constants. They are now used in the initialization of global objects, not in the object definitions themselves - Changes to control loop: o Added logic for when pump is in timeout mode o Added logic so that when when the moisture sensor is triggered, it waits an hour before being triggered again Pump: - Added function to tell if pump is in timeout mode - Added function to tell if pump is currently running -
- Added safeMillis function to Pump to allow for Arduino clock rollover - Added some more status messages to the Check function to show clock rollovers and to show when moisture sensor is offline.
This version replaced the resistance moisture sensor with a capacitative sensor and added terminal connectors to the board for the moisture sensor, power, and pump.
Changed the timeout code to be based on stopping the pump once the reservoir is depleted.
Thanks for getting back to me, I since checked on your profile and it seems you have the same project with your updated coding? If this is the case I can use the code you produced on top of Jonathan’s original work. |
That's the case. You're welcome to it. Hope it's useful. |
Hi, I am going to be using this code for my own project. However I am using the Arduino UNO. Are they only changes required for the analogue input and TX/RX pins? Thanks |
I believe so. I think you can route the Tx/Rx to any two digital pins and the temp line to any analog pin. Just update the constant. Let me know if you run into any issues.
That reminds me I need to go rescue my planter from my office. The Quarantine has outlasted the reservoir.
Bill
…________________
William Murphy
From: Rhys Slater <[email protected]>
Sent: Wednesday, April 1, 2020 1:00 PM
To: jonathanrjpereira/Automatic-Plant-Watering-System-using-Arduino <[email protected]>
Cc: William A. Murphy <[email protected]>; Author <[email protected]>
Subject: Re: [jonathanrjpereira/Automatic-Plant-Watering-System-using-Arduino] Update plant.ino (#1)
Hi, I am going to be using this code for my own project. However I am using the Arduino UNO. Are they only changes required for the analogue input and TX/RX pins? Thanks
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#1 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AFMGWOEVORRQHRYWDL5MDLDRKNXIHANCNFSM4H6OHMGA> . <https://github.com/notifications/beacon/AFMGWOHD3IORY44BUL5K3STRKNXIHA5CNFSM4H6OHMGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEQZ33VA.gif>
|
- Minor cleanups to messages - Increase baseline resevoir timeout to 90 seconds
New physical design acts as enclosure for electronics and water reservoir for use with any potted plant.
No other changes.
This is the code that I used in my version of the automatic plant watering system. Main changes:
Used SoftwareSerial.h library to access the bluetooth module through pins 3 (TX) and 2 (RX). This change fixed a problem where I could not load programs while the module was active. Seemed to be a conflict on the serial bus.
Added a timeout feature so that the pump would turn off after 10 continual seconds so that it would not burn out when the reservoir runs dry.
Added additional commands for controlling the pump. In addition to starting and stopping the pump, you can now adjust the moisture limit up and down, check the moisture limit, pulse the pump for 2 seconds, and reset the pump after the timeout.
Also moved code to C++ from C.