Bonjour,
J’ai un problème de modbus sur la ligne mb.config le message d’erreur est : ‘class ModbusIP’ has no member named ‘config’
Merci d’avance
Voici le programme
#include <Modbus.h>
#include <ModbusIP_ESP8266.h>
#include <EtherCard.h>
const int SENSOR_IREG=50;
const int sensorAnalog =A0;
ModbusIP mb;
void setup() {
Serial.begin(9600);
byte mac[] = {0x90, 0xA2, 0xDA, 0x00, 0x51, 0x06};
byte ip [] = {192, 168, 1, 120 };
mb.config (mac,ip);
mb.addIreg(SENSOR_IREG);
}
void loop() {
mb.task();
mb.Ireg(SENSOR_IREG, analogRead(sensorAnalog));
Serial.println(analogRead(sensorAnalog));
}