Skip to content
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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Conversation

wmurphy41
Copy link

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.

@jonathanrjpereira
Copy link
Owner

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.

- 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.
@Slats24
Copy link

Slats24 commented Mar 31, 2020

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.

@wmurphy41
Copy link
Author

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

@Slats24
Copy link

Slats24 commented Apr 1, 2020

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

@wmurphy41
Copy link
Author

wmurphy41 commented Apr 4, 2020 via email

- 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants