Update plant.ino - #1
Open
wmurphy41 wants to merge 9 commits into
Open
Conversation
Owner
|
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. |
Author
|
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 |
Author
|
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 <notifications@github.com>
Sent: Wednesday, April 1, 2020 1:00 PM
To: jonathanrjpereira/Automatic-Plant-Watering-System-using-Arduino <Automatic-Plant-Watering-System-using-Arduino@noreply.github.com>
Cc: William A. Murphy <wmurphy41@aol.com>; Author <author@noreply.github.com>
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.