Automatic-Plant-Watering-System icon indicating copy to clipboard operation
Automatic-Plant-Watering-System copied to clipboard

Update plant.ino

Open wmurphy41 opened this issue 4 years ago • 5 comments

This is the code that I used in my version of the automatic plant watering system. Main changes:

  1. 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.

  2. 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.

  3. 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.

  4. Also moved code to C++ from C.

wmurphy41 avatar Jul 05 '19 21:07 wmurphy41

Hey William, Thanks for submitting these amazing changes and new features. I will merge this PR as soon as I make the necessary changes to the schematic & PCB files across all mediums.

jonathanrjpereira avatar Jul 06 '19 05:07 jonathanrjpereira

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.

RhysSlater avatar Mar 31 '20 01:03 RhysSlater

That's the case. You're welcome to it. Hope it's useful.

wmurphy41 avatar Mar 31 '20 11:03 wmurphy41

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

RhysSlater avatar Apr 01 '20 16:04 RhysSlater

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 https://github.com/jonathanrjpereira/Automatic-Plant-Watering-System-using-Arduino/pull/1#issuecomment-607370708 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AFMGWOEVORRQHRYWDL5MDLDRKNXIHANCNFSM4H6OHMGA . https://github.com/notifications/beacon/AFMGWOHD3IORY44BUL5K3STRKNXIHA5CNFSM4H6OHMGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEQZ33VA.gif

wmurphy41 avatar Apr 04 '20 16:04 wmurphy41