Skip to content

Commit b8167c0

Browse files
committed
v1.0.12
1 parent 41fd18a commit b8167c0

File tree

13 files changed

+427
-411
lines changed

13 files changed

+427
-411
lines changed

.vscode/arduino.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2-
"board": "esp32:esp32:esp32doit-devkit-v1",
3-
"sketch": "examples\\RS485Passthrough\\RS485Passthrough.ino",
4-
"configuration": "FlashFreq=80,UploadSpeed=921600,DebugLevel=none,EraseFlash=none",
2+
"board": "arduino:avr:uno",
3+
"sketch": "examples\\RS485_Sender\\RS485_Sender.ino",
54
"port": "COM24"
65
}

.vscode/c_cpp_properties.json

Lines changed: 341 additions & 382 deletions
Large diffs are not rendered by default.

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

Changes.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
#
3+
### **+05:30 03:04:59 PM 28-01-2024, Sunday**
4+
5+
* Added fix for SoftwareSerial port not supporting custom serial frame configuration on AVR platform.
6+
* Added `ARDUINO_ARCH_AVR` platform check.
7+
* Added Changes.md file.
8+
* Updated API.md.
9+
* Updated Readme.md.
10+
* New version 🆕 `v1.0.12`
11+

README.adoc

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,37 @@
11
:repository-owner: CIRCUITSTATE
22
:repository-name: CSE_ArduinoRS485
3-
:repository-version: 1.0.11
3+
:repository-version: 1.0.12
44

55
= {repository-name} Library for Arduino =
66

77
This Arduino library allows you to send and receive data using the **RS-485** interface standard. Supported by all Arduino-compatible boards such as ESP32, STM32, RP2040, AVR, SAMD, ESP8266, etc. You can use both hardware and software serial ports for communication. This library supports the Maxim Integrated **MAX485** and equivalent transceivers.
88

9+
== Installation ==
10+
11+
This library is available from the official **Arduino Library Manager**. Open the Arduino IDE, search for **{repository-name}** and install the latest version of the library.
12+
13+
Additionally, you can download the latest release package from the GitHub repository and install it manually. To do so, open the Arduino IDE, go to **Sketch > Include Library > Add .ZIP Library...** and select the downloaded file.
14+
15+
Another method is to clone the GitHub repository directly into your **libraries** folder. The development branch will have the latest features, bug fixes and other changes. To do so, navigate to your **libraries** folder (usually located at **Documents/Arduino/libraries** on Windows and **~/Documents/Arduino/libraries** on macOS) and execute the following command:
16+
17+
[source,bash]
18+
----
19+
git clone https://github.com/CIRCUITSTATE/CSE_ArduinoRS485.git
20+
----
21+
22+
== Examples ==
923
Three examples are included with this library:
1024

1125
* **RS485_Sender** - Sends data to a connected receiver.
1226
* **RS485_Receiver** - Receives data from a connected sender.
1327
* **RS485_Passthrough** - Sends and receives data between the RS-485 port and the default serial port.
1428

29+
== API Reference ==
30+
31+
You can find the complete API reference for this library at link:docs/api.md[API.md].
32+
33+
== Reference ==
34+
1535
This library is a fork of the **ArduinoRS485** library by Arduino, and is maintained by **CIRCUITSTATE Electronics**.
1636

1737
* https://github.com/arduino-libraries/ArduinoRS485[ArduinoRS485 Library by Arduino]

docs/api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CSE_ArduinoRS485 library
22

3-
Version 1.0.11, +05:30 03:54:10 PM 30-10-2023, Monday
3+
Version 1.0.12, +05:30 03:16:49 PM 28-01-2024, Sunday, Monday
44

55
### Index
66

@@ -48,7 +48,7 @@ RS485Class RS485 (auto serial, int dePin, int rePin, int txPin);
4848
4949
### `begin()`
5050
51-
Initializes the RS485 object. The baudrate can be left empty to make it `0`. This will prevent the serial port from being initialized by the RS485 library. You have to then manually initialize the serial port before calling any RS485 library function. If the baudrate is non-zero, the user can also specify the UART configuration, for example `SERIAL_8N1`. It is also possible to set pre and post delays in milliseconds for each communication.
51+
Initializes the RS485 object. The baudrate can be left empty to make it `0`. This will prevent the serial port from being initialized by the RS485 library. You have to then manually initialize the serial port before calling any RS485 library functions. If the baudrate is non-zero, the user can also specify the UART configuration, for example `SERIAL_8N1`. Custom UART configurations are not supported by all platforms, especially when using Software Serial ports. Currently, custom UART frame configurations are ignored when using software serial ports on the AVR platform. It is also possible to set pre and post delays in milliseconds for each communication.
5252
5353
#### Syntax
5454

examples/RS485_Receiver/RS485_Receiver.ino

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,12 @@
1212
#include <CSE_ArduinoRS485.h>
1313

1414
// Declare the RS485 interface here with a hardware serial port.
15-
RS485Class RS485 (Serial1, 2, 3, 4); // DE, RE, TX
15+
// RS485Class RS485 (Serial1, 2, 3, 4); // DE, RE, TX
1616

17-
/* // If you want to use a software serial port, declare it here,
17+
// If you want to use a software serial port, declare it here,
1818
// comment out the previous declaration, and uncomment this section.
19-
#include <SoftwareSerial.h>
20-
21-
SoftwareSerial mySerial (10, 11); // RX, TX
22-
RS485Class RS485 (mySerial, 2, 3, 4); // DE, RE, TX */
19+
SoftwareSerial Serial1 (10, 11); // RX, TX
20+
RS485Class RS485 (Serial1, 2, 3, 4); // DE, RE, TX
2321

2422
void setup() {
2523
Serial.begin (9600);

examples/RS485_Sender/RS485_Sender.ino

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,12 @@
1414
int counter = 0;
1515

1616
// Declare the RS485 interface here with a hardware serial port.
17-
RS485Class RS485 (Serial1, 2, 3, 4); // DE, RE, TX
17+
// RS485Class RS485 (Serial1, 2, 3, 4); // DE, RE, TX
1818

19-
/* // If you want to use a software serial port, declare it here,
19+
// If you want to use a software serial port, declare it here,
2020
// comment out the previous declaration, and uncomment this section.
21-
#include <SoftwareSerial.h>
22-
23-
SoftwareSerial mySerial (10, 11); // RX, TX
24-
RS485Class RS485 (mySerial, 2, 3, 4); // DE, RE, TX */
21+
SoftwareSerial Serial1 (10, 11); // RX, TX
22+
RS485Class RS485 (Serial1, 2, 3, 4); // DE, RE, TX
2523

2624
void setup() {
2725
// Initialize the RS485 interface

keywords.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ peek KEYWORD2
1818
read KEYWORD2
1919
flush KEYWORD2
2020
write KEYWORD2
21+
available KEYWORD2
2122

2223
beginTransmission KEYWORD2
2324
endTransmission KEYWORD2

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"url": "https://github.com/CIRCUITSTATE",
1414
"maintainer": true
1515
},
16-
"version": "1.0.11",
16+
"version": "1.0.12",
1717
"license": "LGPL-2.1",
1818
"frameworks": "arduino",
1919
"platforms": "*"

0 commit comments

Comments
 (0)