Go Down

Topic: pressure transducer (Read 444 times) previous topic - next topic

baskar0395

please send a program for 4 to 20 ma input and get 1 digital output for required valvues

jremington

Please read the "How to use this forum" post.

MorganS

"The problem is in the code you didn't post."

jremington


gwareloth

please send a program ....
please send money ...

4 to 20 ma input and get 1 digital output for required valvues
I'm pretty sure, although I've never used one, that you read a 4-20mA current as a voltage drop across a 220 ohm resistor on an analog pin.

The code will be pretty much just the same as this.


adwsystems

Code: [Select]

float mAreading;

void setup()
 {
 }

void loop()
 {
  mAreading=((float) analogRead(A0)) / 1024.0*16.0+4.0;
 }


That wasn't hard. Anymore and it would cost you.

Go Up