Toll-Free Customer Support 24/7

4-20mA Current Loop Transmitter XTR116U

#include <MCP4725.h>
MCP4725 dac(SDA, SCL);
void setup(void) 
{
dac.begin();
Serial.begin(9600);
}
void loop(void) 
{
float ampout;
for (float v = 80; v <= 400 ; v++)
{
float k=v/100;
dac.setVoltage(k);
ampout=map(v,80,400,40,200);
ampout=ampout/10;
Serial.println(ampout,1);delay(300);
v++;
}
}

Back to top