New Client
functions
Write (and Read) consistent bit into the CPU via WriteBit() function.
With this function is possible to write a single bit without affecting
the others into the same byte.
Into the previous release you had to read the
byte, set the bit and finally rewrite the byte.
That’s was not “consistent” because the bits could had change in
meantime.
New Helper functions
SetXXXAt() family were implemented, just like Snap7:
SetBitAt()
SetByteAt()
SetWordAt()
SetDWordAt()
SetFloatAt()
SetIntegerAt()
SetDintAt()
StringAt()
SetStringAt()
Please don’t confuse SetBitAt() with WriteBit(), the first only
sets a bit into a byte of a specified buffer.
New Platform supported
From this release you can use all ESP8266 family and all ESP32 family.
Unluckily there is not possible to have a compatibility transparent
layer, because many of them use custom Ethernet libraries.
So, if you want to use V2.0.0 you need to modify
platform.h before compile your project.
That’s a not good practice, since Settimino is a library, but I didn’t find another way to
integrate different Ethernet libraries.
Another solution could be to treat Settimino as
project files and copy them in your sketch folder (but you will not have the
colored keywords).
Make your choice, both the methods work.
Compatibility break (see the examples)
Major
EthernetInit (uint8_t *mac, IPAddress ip)
must be used instead of Ethernet.begin(uint8_t *mac, IPAddress ip).
Esp8266 references (includes and so on) must
be deleted from your sketches (see Platform.h)
Minor
S7Client constructor does not accept
parameters, wired or wifi is automatically set into
Settimino.cpp. However you can still use the old way
but it’s deprecated.
This is an
extracted of platform.h
//*********************************************************************
// PLATFORM AND MEDIA DEFINITION
//
// Chose your platform and uncomment the
related define
// *ONLY* one line must be uncommented
//*********************************************************************
// ARDUINO_LAN
//
Arduino UNO R3 + Ethernet Shield R3 or Ethernet Shield 2
//
Arduino MEGA 2560 R3 + Ethernet Shield R3 or Ethernet Shield 2
// ESP8266_FAMILY (WiFi)
// NodeMCU
// Wemos
// Lolin V3
//
(Other 7 modules based onto ESP8266 chip)
// ESP32_WIFI
//
ESP32-WROOM-32 / 32D
//
ESP32 DevModule
// M5STACK_WIFI (only core)
//
Basic, Gray, Red
// M5STACK_LAN
//
Core + LAN MODULE (W5500)
//
//*********************************************************************
// Notes of external libraries needed.
// If you already use that boards, you
should have already installed
//*********************************************************************
// ESP8266_FAMILY
// https://github.com/esp8266/Arduino
// ESP32
// https://github.com/espressif/arduino-esp32
// M5STACK (*)
//
https://docs.m5stack.com/#/en/quick_start/m5core/m5stack_core_get_started_Arduino_Windows
// https://github.com/m5stack/M5Stack
//
// (*) Need also to install Ethernet2
library to use the LAN MODULE.
//
Use the Arduino IDE Library Manager.
//
//*********************************************************************