In compliance with high industry standards

Browse our Blog. You will find multiple applications, solutions, code examples. Navigate using the tag cloud or search using specific criteria

Ethernet test on M-Duino PLUS version


In this post it is showed how to test Ethernet communication on M-Duino PLUS version


Ethernet PLC:           MDuino Family Products

Ethernet2 Library:             Arduino Ethernet2.h library


Connecting an M-Duino to a router through Ethernet and uploading the test sketch, the M-Duino is able to complete the test.  

Next is showed the code:

#include <Ethernet2.h>
#include <SPI.h>
byte _mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xEA };
byte _ip[] = {10, 20, 30, 15};
byte _server[] = {216, 58, 201, 132};

void setup() {
  Serial.println("mduino-plus Ethernet test started");
  Ethernet.begin(_mac, _ip);
  Serial.print("IP: ");

void loop() {
EthernetClient client;
if (client.connect(_server, 80)) {
  Serial.println("Ethernet OK");
} else {
  Serial.println("Ethernet FAIL");


See also:

Uploading a sketch to a PLC using ethernet (Part 1):   Uploading an sketch to a PLC using Ethernet - Step 1- Ariadne Bootloader

Uploading a sketch to a PLC using ethernet (Part 2):  Uploading a sketch to a PLC using Ethernet - Step 2 - binary file

Uploading a sketch to a PLC using ethernet (Part 3):  Uploading a sketch using Ethernet - step 3- TFTP CLIENT

Looking for your ideal PLC?

Take a look at this product comparison with other industrial controllers Arduino.

We are comparing inputs, outputs, communications and other features with the ones of the relevant brands.

Industrial PLC controller comparison >>

Do you want more information?

Just fill the form!

Tell me more!