I am using an Atlas Scientific peristaltic pump to deliver about 2L of a basic solution to a tank per day. I’ve wired the pump to the Arduino as shown in this diagram. My code is as follows:
#include <Wire.h> //enable I2C.
#define address 103 //default I2C ID number for EZO-PMP Embedded Dosing Pump.
void setup() //runs once, at startup
delay(2000); //wait 2 seconds
Serial.begin(9600); //enable serial port.
Wire.begin(); //enable I2C port.
Wire.write(“Plock,1”); //lock protocol to I2C. Seeing issue where protocol is switching between UART and I2C. This will stop pump from pumping
Wire.write(“DC,1.39,*”); //Tell the pump to pump continuously at 1.39ml/min indefintitely, which is roughly 2L per day
// required, doesn’t do anything tho
This seems to work while testing, but I came in this morning (about 16 hours later) and the pump was no longer pumping. I unplugged the pump and the chip and replugged both back in. This didn’t fix the issue. I tried doing this a few more times, and eventually the pump began to rotate again.
Are there any obvious errors with my code?