Flowmeter?
Current sensing transformer? Maybe?
Seen somebody use that to sense when a pump is turned on.
OOOOH maybe. Good idea!
Maybe, good idea. Strange it just wont pick up the value when I set it to true, huh. Even at the start of the if/then block for pump being triggered
What are you now using to sense when the pump is on?
You set a sensor pin to true?
Try restating that in different words, those don't make any sense.
I just watch it fill my fish pond, pretty low tech.
no I set the IOT bool to true but it never sees it. However, it changes in the serial monitor
Please note: message attached
Return-Path: incoming+verp-3471dbbe34c2efc8ac9bacd5f64c4286@arduino.discoursemail.com
Received: from mx07.vgs.untd.com (mx07.vgs.untd.com [10.181.44.37])
by maildeliver08.dca.untd.com with SMTP id AABUJ2MW5A4W2SPS
for constanley@juno.com (sender incoming+verp-3471dbbe34c2efc8ac9bacd5f64c4286@arduino.discoursemail.com);
Fri, 16 Jun 2023 02:42:52 -0700 (PDT)
Authentication-Results: mx07.vgs.untd.com; DKIM=PASS
Received-SPF: Pass
Received: from mx-out-01b.dub1.discourse.cloud (mx-out-01b.dub1.discourse.cloud [184.104.202.122])
by mx07.vgs.untd.com with SMTP id AABUJ2MW5ALFCLA2
for constanley@juno.com (sender incoming+verp-3471dbbe34c2efc8ac9bacd5f64c4286@arduino.discoursemail.com);
Fri, 16 Jun 2023 02:42:51 -0700 (PDT)
Received: from localhost.localdomain (unknown [IPv6:2602:fd3f:1:107:0:242:ac11:14])
by mx-out-01b.dub1.discourse.cloud (Postfix) with ESMTP id 984E681516
for constanley@juno.com; Fri, 16 Jun 2023 09:42:49 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=discoursemail.com;
s=dub1; t=1686908569;
bh=HsDKv7wRrhAs5zA0xsBICmMB2H/Sq0UdwABJ1v0PxAo=;
h=Date:From:Reply-To:To:In-Reply-To:References:Subject:
List-Unsubscribe:List-ID:List-Archive;
b=OCTGzdcvAeYGxiiqtJpZQZ3dZuC8s0PWNoywQutREm05zVndURunWi06YGmDNrRiq
Qs1Ra0CqOi7lPGtEjofkvV5zsL2VPt+2Jzh7qf6izOyaBgMKNT7NFt1+tZVucd4EGP
sL6EQccHhMMRNSG6dBSnVzhkmyhpFRPi3rOcaKvY4zfzEiVD+K09A4DoKG1rDbDh4o
7ulR7b6KXyIgg7s5G06KfasZhvtOsuRsxKswYTSk7HVFZNZrKIBcGNO5dZj3RS6puo
NAhUHzpBX79rs1BSpNmQQzKo4xQyvjZhWWD0E525SsAbmXKxd4qq2Je9f0ppgGAxCR
3SyYOquXKaffg==
Maybe manually setting pull ups?
I would not have any idea how to do that. I will focus on flowmeter or monitored check valve. Thanks so much
Flowing water should be able to move a switch, the meter gives more info though.
I could not make sense of those words only. The nonsense isn't real, it was just me not able to understand the words.
I bought a flowmeter and will hook it up soon. Thanks!!
There should be example sketches for the flowmeter. That lets you test the hardware, a possible source of problem to eliminate from question.
Reducing unknowns cuts on debug time.
I looked but this is all pretty new to me. I did find some helpful videos. Here is one:
How to Use Water Flow Sensor (Make Water Meter with Arduino or ESP8266) - YouTube Thanks for helping me. My wife loves your screen name as do I. I like tinkering with Arduino but me real job is GIS. We are short GIS technicians, any interest? Have a great day!
I don't have the kind of energy I did before 2000. I try to pass some ideas along is all, I wrote solid data collection that single-pass compiled analysis into the log as well.
Go for smoke is the chant that EE's do when trying to eliminate hairline traces from cheap reject PCB's using a 12V linear supply good for 5A. Ground one trace and give another near it the 12 and hairline traces become overloaded filaments that burn the exopy underf them to smoke. The big hope is that once you get them all, you have a working board.
My first Z80 board had to mounted on uneven posts. It only worked when twisted a little. Only $75 in 85.
You sound well aged like me. Anyway you're head and shoulders above me. I did get the flowmeter connected and working thru the app BUT when the pump auto-dumps the reading freezes. Make some sense because I used delay. I used delay in the push button switch so I couldn't over dump. I took out the push button and the delay and added a slider but this slider acts as a momentary switch. I'll keep fighting the good fight but it's confusing. Thanks again.
So you did get the flowmeter to run then just skipped over to use it in the code you're not sure of?
If I have one button or many, I have a timer function that reads the pin twice a milli and updates one byte that always holds the last eight reads.
The binary value 0b10000000 as pin read history: the oldest read (1) was BUTTON UP and the next 7 (0's) are BUTTON DOWN, enough to regard as stable for 3.5 ms after the last change of the bounce. Contact switches all bounce on change.
One void loop() function that only runs occasionally keeps button status up to "now" and the next function detects a button press (and stabilize) if (history == 128) and that's all it takes to turn real into decision-worthy abstraction.
127 (0b01111111) is button release, 0 (all 0's) is button held down and 255 (all 1's) is button left up. All the rest show bouncing over 4 ms.
One function to handle the nasty real world stuff and make a number for the clean simple logic in other functions and they don't have to delay.
You get the capability to run multiple functions effectively at the same time, each by itself to handle just one part of a virtual machine that has no do it all part. Each piece can be debugged alone, it saves work!
Nick Gammon's Intro Tutorial to Arduino timing.
It is mostly about not getting in your own way, the how-to takes practice.
Long-term knowing ANYTHING takes practice. Thinking about how hard something -must be- is a time and imagination waste, simple starts with humble goals are hard enough to satisfy. This path can take you far but you get many places along the way. It's not a dead end and you don't have to build a robot.
Once you can merge functions and have your own hardware drivers you get to keep them and hone them and use them all over, your own tools.
You are quite wise. I will watch the tutorial and hope if I have questions I can ask. Thanks Conrad