Skip to content

mb.config(mac, ip) mb does not name type #40

Open
@esfx14

Description

@esfx14

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions