thanks for replying,my sensor is sfm 3000 not sfm 3300
the sensor reads constant value of flow without any change, have you get any ideas about why this is happening ?
#include <Wire.h>
#include <sfm3000wedo.h>
SFM3000wedo measflow(64);
int offset = 32000; // Offset for the sensor
float scale = 140.0; // Scale factor for Air and N2 is 140.0, O2 is 142.8
void setup() {
// put your setup code here, to run once:
Wire.begin();
Serial.begin(9600);
delay(500); // let serial console settle
// initialize the sesnor
measflow.init();
Serial.println("Sensor initialized!");
}
void loop() {
unsigned int result = measflow.getvalue();
float Flow = ((float)result - offset) / scale;
Serial.print("Flow: ");
if (result >= 0) {
Serial.print(" ");
}
Serial.print(Flow, 5);
Serial.print("\n");
delay(10);
}
I have a problem with using SFM 3000 flow meter sensor with arduino. the default code uses Wire library. Unfortunately, when i use the code bellow, the code shows no result on the serial. when i searched for the problem , i found that there is a problem with Wire library when dealing with I2C sensors which can be solved if WSWire librabry is used. Unfortuantely, when i use WSWire libraby, the serial show only one constant reading which is 239.53.hi T,
I have downloaded the d/s for 3000.
Do you have a circuit to post showing how the project is set up.?
Also a copy of the program Code.
E
yeah, it works well. Thanks alothi T,
Double check the 4 connections, your diagram and the d/s are different.
EView attachment 226795View attachment 226796
by Jake Hertz
by Duane Benson
by Aaron Carman