Yet Another Automated Plant box project. Please help me refine my code

I still cant seem to get Ph to graph in a historical graph.

Thank you for your help, You told me I had several HW Serial requests on line 38 and 48, I commented line 38 out and now I receive stable readings of pH and no longer see 55.55, Thank you very much.

1 Like

I was able to graph pH at one point when i first started working on the project,

Make your void loop simple. Just run blynk command. Use simple timer to call subroutines especially for virualwrite. So your code will be much more clean and smooth.

Will you send me an example of how i would write in simple timer?

Blynk.virtualWrite(V15, sensorstring() / 1000);

?

There is a very nice short and understandable example called “pushdata” in the Arduino library. I see you al ready added simpletimer somewhere, but I didn’t notice you used it anywhere.

Anyway, the first thing I would do is step away from it all (VERY important step!), create a blank sketch (with a new version number, so you won’t get confused :wink: ) and then get a piece of paper or some drawing software and start making a flow chart with all elements and how you want them to interact, little example:

This way you get everything in order and make it very clear for yourself to what you need and what you can get rid of. Often I find that starting over works really well. This is a kind of “rubber duck” method as they call it. When you get stuck with your program try to explain how it works in laments term to a rubber duck (or any stuffed animal on your desk, lol). Usually you will come to very nice insights where things are going wrong.

2 Likes

Haha! I talk to my cat all the time, as she is always interested in observing the clicky buzzy noises, and stealing the wires I use, when breadboarding projects… OK not quite the same, but then as my beleaguered CIS teacher discovered… I do almost everything on-the-fly (including coding)… so… ah… probably not as supportive a comment as could be in this context… hmmm, er… just carry on :stuck_out_tongue:

Hello, I would love to learn more about your project. I am designing multiple systems for hydroponic controlled environments.

I’m very active with this group called the Open Agriculture Initiative, we are focused specifically on open source plant science. I have built my own V2 “Food Computer” and am now developing the Minimum Viable Product version and looking at using Blynk for the interface.

Short video explaining OpenAg: https://www.youtube.com/watch?v=n7q9mbXVssg&t=8s

Longer video by founder Caleb Harper: https://www.youtube.com/watch?v=sZpPEuL0OFo&t=1s

Let me know if you wanna chat/share ideas.

Thanks,
Peter.

1 Like