You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First take away the parenthesis from in front of the mb name for ModbusIP. Also use #include "Modbus.h" and #include "ModbusIP.h" instead of <> . Arduino doesn't like that and the error should go away.
Board: Adafruit ESP Feather with Ethernet FeatherWing
Upload Speed: 115200
Flash Frequency: 80 MHz
I would like to use this ModbusIP thing and tried first to do it like the example, but there is this error message, that mb does not name type.
#include <SPI.h>
#include <Arduino.h>
#include <Ethernet.h>
#include <Modbus.h>
#include <ModbusIP.h>
const int SWITCH_ISTS = 100;
ModbusIP mb();
byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
byte ip[] = {0,0,0,0};
mb.config (mac,ip);
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
sketch_jan17c:12:1: error: 'mb' does not name a type
mb.config (mac,ip);
^
exit status 1
'mb' does not name a type
The text was updated successfully, but these errors were encountered: