Skip to content

Commit 47be939

Browse files
committed
first initial
1 parent 03c5331 commit 47be939

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,48 +65,50 @@ void setup() {
6565
void loop() {
6666
modbus.update();
6767
}
68+
```
6869

69-
70-
Modbus Commands
70+
### Modbus Commands
7171
Turn LED ON: Send 01 06 00 05 00 01 [CRC] (writes 1 to register 5).
7272

7373
Turn LED OFF: Send 01 06 00 05 00 00 [CRC] (writes 0 to register 5).
7474

7575
Read Registers: Send 01 03 00 00 00 0A [CRC] (reads 10 registers starting from 0).
7676

77-
Customization
77+
### Customization
7878
You can adjust settings at runtime:
7979

80+
```cpp
8081
modbus.setSlaveAddress(0x02); // Change slave address to 0x02
8182
modbus.setLedPin(12); // Change LED pin to 12
8283
modbus.setLedRegisterIndex(7); // Use register 7 for LED control
8384
modbus.setModbusBaudRate(115200); // Change baud rate to 115200
85+
```
8486

85-
Hardware Requirements
87+
## Hardware Requirements
8688
Any Arduino-compatible board with a serial interface (e.g., Uno, Mega, Nano).
8789

8890
An LED connected to the specified pin (default: pin 13, onboard LED on most Arduino boards).
8991

9092
A Modbus master device or software (e.g., Modbus Poll, QModMaster) for testing.
9193

92-
Dependencies
94+
## Dependencies
9395
None (uses only the Arduino core library).
9496

95-
Contributing
97+
## Contributing
9698
Contributions are welcome! Feel free to:
9799
Fork this repository.
98100

99101
Create a new branch for your feature or bug fix.
100102

101103
Submit a pull request with a clear description of your changes.
102104

103-
License
105+
## License
104106
This project is licensed under the MIT License. See the LICENSE file for details.
105107
Acknowledgments
106108
Developed with assistance from Grok, created by xAI.
107109

108110
Inspired by the need for a simple Modbus RTU slave implementation on Arduino.
109111

110-
Contact
112+
## Contact
111113
For questions or support, open an issue on this repository or reach out to [[email protected] (mailto:[email protected])].
112114

0 commit comments

Comments
 (0)