SmartLadder is a firmware for Arduino microcontrollers that facilitates the programming of programmable logic controllers (PLCs) using ladder diagrams. It allows users to create ladder programs through a web interface, which generates a string of instructions stored in the microcontroller's memory and continuously read to execute the programmed tasks.
- first: v1.0.0
- v1.0.1
- v1.0.2
- current: v1.0.3
-
Clone this repository or download the ZIP file and extract it to your Arduino libraries folder:
git clone https://github.com/lucweb/SmartLadderFirmware.git
-
Open the Arduino IDE and go to
Sketch->Include Library->Add .ZIP Library...and select theSmartLadderFirmwarefolder. -
Include the library in your sketch:
#include <SmartLadderArduino.h>
Here is a basic example of how to use the SmartLadderFirmware library in an Arduino sketch:
#include <SmartLadderArduino.h>
SmartLadderArduino smartLadder;
void setup() {
smartLadder.setup();
}
void loop() {
smartLadder.loop();
}Here is a basic example of how to use the SmartLadderFirmware library in an Arduino sketch:
#include <SmartLadderEsp32.h>
SmartLadderEsp32 smartLadder;
void setup() {
smartLadder.setup();
}
void loop() {}By default, Wi-Fi are enabled in the firmware esp32. If you need to modify these settings, or if you want to enable/disable Ethernet (LAN8720) support and I2C, you must configure the config.h file accordingly.
- USE_WIFI: Set to
1to enable Wi-Fi support, or0to disable it. - USE_I2C: Set to
1to enable I2C support, or0to disable it. - USE_ETH8720: Set to
1to enable Ethernet support (LAN8720), or0to disable it.
The configuration file config.h should be located in the same directory as your sketch or within the library's directory structure.
Example path:
../documents/Arduino/libraries/SmartLadderFirmware/config.h
Make sure to adjust these definitions to match your hardware setup and project requirements.