-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3bcd9de
commit 2ab120d
Showing
1 changed file
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,43 @@ | ||
# RS485-UART-EchoTest | ||
This sketch is useful for debugging and testing RS485/UART wirings. | ||
|
||
Version: 1.0 | ||
Date: 2020-12-15 | ||
|
||
This sketch is useful for debugging and testing RS485/UART wirings. | ||
Often the remote device is mounted somewhere on a rooftop or another | ||
inconvenient place. That's where this tool comes in and offers you a | ||
simulation for your lab. | ||
|
||
It was intentionally made for the wind direction sensor: | ||
https://github.com/AndreasExner/iobroker-IoT-WindSensor | ||
|
||
But it can be used for different purposes as well. | ||
|
||
|
||
|
||
#### Configuration | ||
|
||
```c++ | ||
byte windSensorFrame[] = {0x01, 0x03, 0x04, 0x00, 0x5A, 0x00, 0x00, 0x00, 0x00}; // default answer frame for the wind sensor DO NOT CHANGE | ||
byte customFrame[] = {0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; // your custom answer frame (CRC will be calculated automatically) | ||
|
||
bool useWindSensorFrame = true; // echos a random wind direction if true, a custom frame or a copy of the incoming frame if false | ||
bool useCustomFrame = false; // echos the custom frame if true, a copy of the incoming frame if false | ||
``` | ||
#### Tested environment | ||
- Software | ||
- Arduino IDE 1.8.13 (Windows) | ||
- EspSoftwareSerial 6.10.0 [plerup/espsoftwareserial: Implementation of the Arduino software serial for ESP8266 (github.com)](https://github.com/plerup/espsoftwareserial) | ||
- Hardware | ||
- NodeMCU Lolin V3 (ESP8266MOD 12-F) | ||
- NodeMCU D1 Mini (ESP8266MOD 12-F) | ||
- 5 V MAX485 / RS485 Modul TTL to RS-485 MCU | ||
#### Wiring | ||