Skip to content

Commit 4a5310d

Browse files
committed
Updated ESP8266 examples
- Added target specific example folders for ESP32, ESP8266 and RP2040. - Updated ESP8266 examples. - Updated `ModbusRTU_Server_LED` and `ModbusRTU_Client_LED` examples.
1 parent 68b1219 commit 4a5310d

24 files changed

Lines changed: 1025 additions & 42 deletions

File tree

.vscode/arduino.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"board": "rp2040:rp2040:rpipico",
3-
"sketch": "test\\ModbusRTU_Server_Test\\ModbusRTU_Server_Test.ino",
4-
"port": "COM18",
2+
"board": "esp8266:esp8266:generic",
3+
"sketch": "examples\\ESP8266\\ModbusRTU_Server_LED\\ModbusRTU_Server_LED.ino",
4+
"port": "COM3",
55
"output": "build",
6-
"configuration": "flash=2097152_0,freq=133,opt=Small,rtti=Disabled,stackprotect=Disabled,exceptions=Disabled,dbgport=Disabled,dbglvl=None,usbstack=picosdk,ipbtstack=ipv4only,uploadmethod=default"
6+
"configuration": "xtal=80,vt=flash,exception=disabled,stacksmash=disabled,ssl=all,mmu=3232,non32xfer=fast,ResetMethod=nodemcu,CrystalFreq=26,FlashFreq=40,FlashMode=dout,eesz=1M64,led=2,sdk=nonosdk_190703,ip=lm2f,dbg=Disabled,lvl=None____,wipe=none,baud=115200"
77
}

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343
"stdexcept": "cpp",
4444
"streambuf": "cpp",
4545
"cinttypes": "cpp",
46-
"typeinfo": "cpp"
46+
"typeinfo": "cpp",
47+
"ranges": "cpp"
4748
},
4849
"asciidoc.antora.enableAntoraSupport": false
4950
}

Changes.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
Change log for `CSE_ModbusRTU` library. Latest entries are at the top.
55

66

7+
#
8+
### **+05:30 10:39:16 PM 27-10-2024, Sunday**
9+
10+
- Added target specific example folders for ESP32, ESP8266 and RP2040.
11+
- Updated ESP8266 examples.
12+
- Updated `ModbusRTU_Server_LED` and `ModbusRTU_Client_LED` examples.
13+
714
#
815
### **+05:30 10:35:29 AM 27-10-2024, Sunday**
916

build/build.options.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"additionalFiles": "",
2+
"additionalFiles": "..\\..",
33
"compiler.optimization_flags": "",
44
"customBuildProperties": "build.warn_data_percentage=75",
5-
"fqbn": "rp2040:rp2040:rpipico:flash=2097152_0,freq=133,opt=Small,rtti=Disabled,stackprotect=Disabled,exceptions=Disabled,dbgport=Disabled,dbglvl=None,usbstack=picosdk,ipbtstack=ipv4only,uploadmethod=default",
5+
"fqbn": "esp8266:esp8266:generic:xtal=80,vt=flash,exception=disabled,stacksmash=disabled,ssl=all,mmu=3232,non32xfer=fast,ResetMethod=nodemcu,CrystalFreq=26,FlashFreq=40,FlashMode=dout,eesz=1M64,led=2,sdk=nonosdk_190703,ip=lm2f,dbg=Disabled,lvl=None____,wipe=none,baud=115200",
66
"hardwareFolders": "C:\\Users\\vishn\\AppData\\Local\\Arduino15\\packages",
77
"otherLibrariesFolders": "D:\\Code\\Arduino\\libraries",
8-
"sketchLocation": "D:\\Code\\Arduino\\libraries\\CSE_ModbusRTU\\test\\ModbusRTU_Server_Test"
8+
"sketchLocation": "D:\\Code\\Arduino\\libraries\\CSE_ModbusRTU\\examples\\ESP8266\\ModbusRTU_Server_LED"
99
}

build/includes.cache

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,30 @@
22
{
33
"Sourcefile": null,
44
"Include": "",
5-
"Includepath": "C:\\Users\\vishn\\AppData\\Local\\Arduino15\\packages\\rp2040\\hardware\\rp2040\\3.9.4\\cores\\rp2040"
5+
"Includepath": "C:\\Users\\vishn\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.1.2\\cores\\esp8266"
66
},
77
{
88
"Sourcefile": null,
99
"Include": "",
10-
"Includepath": "C:\\Users\\vishn\\AppData\\Local\\Arduino15\\packages\\rp2040\\hardware\\rp2040\\3.9.4\\variants\\rpipico"
10+
"Includepath": "C:\\Users\\vishn\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.1.2\\variants\\generic"
1111
},
1212
{
13-
"Sourcefile": "D:\\Code\\Arduino\\libraries\\CSE_ModbusRTU\\build\\sketch\\ModbusRTU_Server_Test.ino.cpp",
13+
"Sourcefile": "D:\\Code\\Arduino\\libraries\\CSE_ModbusRTU\\build\\sketch\\ModbusRTU_Server_LED.ino.cpp",
1414
"Include": "CSE_ArduinoRS485.h",
1515
"Includepath": "D:\\Code\\Arduino\\libraries\\CSE_ArduinoRS485\\src"
1616
},
1717
{
18-
"Sourcefile": "D:\\Code\\Arduino\\libraries\\CSE_ModbusRTU\\build\\sketch\\ModbusRTU_Server_Test.ino.cpp",
18+
"Sourcefile": "D:\\Code\\Arduino\\libraries\\CSE_ModbusRTU\\build\\sketch\\ModbusRTU_Server_LED.ino.cpp",
19+
"Include": "SoftwareSerial.h",
20+
"Includepath": "C:\\Users\\vishn\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.1.2\\libraries\\SoftwareSerial\\src"
21+
},
22+
{
23+
"Sourcefile": "D:\\Code\\Arduino\\libraries\\CSE_ModbusRTU\\build\\sketch\\ModbusRTU_Server_LED.ino.cpp",
1924
"Include": "CSE_ModbusRTU.h",
2025
"Includepath": "D:\\Code\\Arduino\\libraries\\CSE_ModbusRTU\\src"
2126
},
2227
{
23-
"Sourcefile": "D:\\Code\\Arduino\\libraries\\CSE_ModbusRTU\\build\\sketch\\ModbusRTU_Server_Test.ino.cpp",
28+
"Sourcefile": "D:\\Code\\Arduino\\libraries\\CSE_ModbusRTU\\build\\sketch\\ModbusRTU_Server_LED.ino.cpp",
2429
"Include": "",
2530
"Includepath": null
2631
},
@@ -29,6 +34,11 @@
2934
"Include": "",
3035
"Includepath": null
3136
},
37+
{
38+
"Sourcefile": "C:\\Users\\vishn\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.1.2\\libraries\\SoftwareSerial\\src\\SoftwareSerial.cpp",
39+
"Include": "",
40+
"Includepath": null
41+
},
3242
{
3343
"Sourcefile": "D:\\Code\\Arduino\\libraries\\CSE_ModbusRTU\\src\\CSE_ModbusRTU.cpp",
3444
"Include": "",

build/libraries.cache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
["C:\\Users\\vishn\\AppData\\Local\\Arduino15\\packages\\rp2040\\hardware\\rp2040\\3.9.4\\cores\\rp2040","C:\\Users\\vishn\\AppData\\Local\\Arduino15\\packages\\rp2040\\hardware\\rp2040\\3.9.4\\variants\\rpipico","D:\\Code\\Arduino\\libraries\\CSE_ArduinoRS485\\src","D:\\Code\\Arduino\\libraries\\CSE_ModbusRTU\\src"]
1+
["C:\\Users\\vishn\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.1.2\\cores\\esp8266","C:\\Users\\vishn\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.1.2\\variants\\generic","D:\\Code\\Arduino\\libraries\\CSE_ArduinoRS485\\src","C:\\Users\\vishn\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\3.1.2\\libraries\\SoftwareSerial\\src","D:\\Code\\Arduino\\libraries\\CSE_ModbusRTU\\src"]

docs/API.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1679,7 +1679,7 @@ client.readInputRegister (uint16_t address, uint8_t count, uint16_t* inputRegis
16791679

16801680
### `readHoldingRegister()`
16811681

1682-
Read one or more holding registers from the remote server. This function form the `request` message, sends it to the server and wait for a response. The response from the server is saved to the `response` ADU. The `response` ADU is checked for its type and the original function code is returned if the operation is successful. If the response ADU is an exception, the exception code is returned. If the operation fails for other reasons, `-1` returned.
1682+
Read one or more holding registers from the remote server. This function forms the `request` message, sends it to the server and wait for a response. The response from the server is saved to the `response` ADU. The `response` ADU is checked for its type and the original function code is returned if the operation is successful. If the response ADU is an exception, the exception code is returned. If the operation fails for other reasons, `-1` returned.
16831683

16841684
#### Syntax
16851685

examples/ModbusRTU_AVR_Client_LED/ModbusRTU_AVR_Client_LED.ino renamed to examples/ESP32/ModbusRTU_AVR_Client_LED/ModbusRTU_AVR_Client_LED.ino

File renamed without changes.

examples/ModbusRTU_AVR_Server_LED/ModbusRTU_AVR_Server_LED.ino renamed to examples/ESP32/ModbusRTU_AVR_Server_LED/ModbusRTU_AVR_Server_LED.ino

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)