Engineering and technology
10 Bike Hacks for MTB & Beyond!
Expanding Arduino Serial Port Buffer Size
Software Serial Buffer Expansion
The change for software serial ports require a simple modification of the file:
<base Arduino folder>\hardware\arduino\avr\libraries\SoftwareSerial\SoftwareSerial.h
Change:
__#define _SS_MAX_RX_BUFF 64 // RX buffer size
To:
__#define _SS_MAX_RX_BUFF 256 // RX buffer size
Hardware Serial Buffer Expansion
The change for hardware serial ports require a simple modification of the file:
<base Arduino folder>\hardware\arduino\avr\cores\arduino\HardwareSerial.h
Change:
__#define SERIAL_TX_BUFFER_SIZE 64
__#define SERIAL_RX_BUFFER_SIZE 64
To:
__#define SERIAL_TX_BUFFER_SIZE 256
__#define SERIAL_RX_BUFFER_SIZE 256
Btw, you can copy the SoftwareSerial.cpp and h files from the Arduino directory in to your project directory and then include it with “(quotation marks) instead of the < (pointy brackets). If you do this, make sure to also change the #include <SoftwareSerial.h> in your copy of SoftwareSerial.cpp to “SoftwareSerial.h”.
~you use <pointy brackets> to include files from arduino libraries and
“quotes” to include from project directory.
Source: Internet of Home Things » Expanding Arduino Serial Port Buffer Size
Why Serial.write() instead of Serial.print()
Serial.write() just sends raw bytes of data.
Serial.print() converts and displays data in human readable forms (ASCII).
How to determine the capacity of the JsonDocument? | ArduinoJson 6
What is Watchdog Timer ?
How are floating point values converted in Schneider Electric energy meters?
The architecture of this number format is the following:
| S | E | F |
| 0 | 1_______8 | 9_______________________31 |
S: sign
E: exponent
F: faction (also referred to as the mantissa or significand)
calculation would be = (-1)^S * 2^(E [dec format]-127) * (1.F)[Base 10]
Source: How are floating point values converted in Schneider Electric energy meters?
ModBus Tools
Free Modbus Slave Simulator and Test Tool
RS-485 MODBUS Serial Communication with Arduino as Master
List of Star Wars planets and moons – Wikipedia
Free Modbus Master Simulator and Test Tool
Download archive into a folder. Then unpack the tarball:
tar xzf modpoll.tgz
The tarball contains multiple binaries for different CPU architectures. Add the version matching your system architecture to the path. Example for ARM platforms like Raspberry Pi:
export PATH=$PWD/modpoll/linux_arm-eabihf:$PATH
Then run modpoll:
modpoll -h