Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
I'm looking to to send live flowrate data to the terminal window from a simple watermill flowmeter, giving 2500 pulses per litre. I thought I had it with a modification of the swissflow sf800 program, but I need to calibrate the flowrate as the viscosity in question changes daily. I created a simple means of adjusting the conversion factor from the keyboard to account for a measure test volume. All appeared to be working, start up the pump and the numbers go up to the region of the 800ml/min wanted. Adjust the count to get it as close as possible (it fluctuates a little as you would expect), turn it off and it drops to 0. But when I halved the pump power (and got a 400ml jug full in a minute) it picked up from zero and went straight to the region of 800ml again, everything looked to be working, accept that it kept coming to around that same set level. Any suggestions why the following code might do that? And I was looking to try a simpler implentation than the SF800 code, but I can't quite see how to employ the multitude of counter options. This must be simple for an mbed, but I'm new to all this! It's got a separate ATAN2 function going BTW