michaeljonker / hardwareserialrs485 Goto Github PK
View Code? Open in Web Editor NEWArduino Software for RS485 support with collision detection and message handling capabilities
License: MIT License
Arduino Software for RS485 support with collision detection and message handling capabilities
License: MIT License
Any chance of implementing the DMX protocol over this library?
(Note here is the use case where a 513 byte buffer is needed, not just 256)
Hello,
I have my own redesigned board based on Arduino Leonardo, but I have only one pin to control DE/RE. Could I use your library? Could you please show me some example of usage of your library on AtMega32U4?
Thank you very much
Filip Richter
Hi,
Is it possible to use different pins to D10 & D11 like D2 & D3? For my project I use SPI which conflicts on D11 and also, D2 & D3 are right next to TX/RX pins and makes for a tidier circuit and eventually PCB layout.
I see the pins are set in HardwareSerialRS485_Helper.h but it talks of using the same port, is that both pins need to be on the same port as each other, or the same port as something else?
Thanks
Tom
Any examples on simple usage?
I'm using Arduino 1.6.4 and I get the following errors and warning when I try to compile Morse demo:
\arduino\libraries\HardwareSerial_RS485/HardwareSerial_RS485.h:28:8: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
#error "HardwareSerial.h already loaded. The file HardwareSerial_RS485.h must be included before the #include "Arduino.h" (whether explicit or implicit)."
\arduino\libraries\HardwareSerial_RS485/HardwareSerial_RS485Helper.h:74:128: error: no match for ternary 'operator?:' (operand types are 'bool', 'PORTDemulation', and 'PORTBemulation')
const static unsigned char TRx_PORT = T__TRx_PORT == 'B' ? PORTB : T__TRx_PORT == 'C' ? PORTC : T__TRx_PORT == 'D' ? PORTD : PORTB;
\arduino\libraries\HardwareSerial_RS485/HardwareSerial_RS485Helper.h:75:128: error: no match for ternary 'operator?:' (operand types are 'bool', 'DDRDemulation', and 'DDRBemulation')
const static unsigned char DDR = T__TRx_PORT == 'B' ? DDRB : T__TRx_PORT == 'C' ? DDRC : T__TRx_PORT == 'D' ? DDRD : DDRB ;
\arduino\libraries\HardwareSerial_RS485/HardwareSerial_RS485.h:88:16: error: 'Serial0' was not declared in this scope
#define Serial Serial0
Do you have any suggestion to correctly compile the Morse demo?
I'm very interested on this library, because it seems to be the better library for rs485 i found. You have done a great work!
I'm using Arduino 1.5.8 and I get the following error when I try to compile:
~/Documents/Arduino/libraries/HardwareSerial_RS485/HardwareSerial_USB.cpp:21:22:
fatal error: Platform.h: No such file or directory #include "Platform.h"
However, the same code seems to compile without an issue on Arduino 1.0.
Hello,
It's a very nice library for Arduino.
But for my project I need to connect multiple Arduino's and a Raspberry Pi. Is it possible to port/convert or wrap the library for using it on Raspberry Pi?
P.S.: Possibly I can but I don't get code depths
Hey there, this library looks really great, but I'm running into a compiling problem that I can't for the life of me figure out.
My application is relatively simple. I have an Arduino Mega 2560 that is going to function as the master to two Uno slaves. The data I'm looking to pass between master/slaves is fairly straightforward, just start/stop signals and status bits. I am programming in the PlatformIO IDE.
The program compiles just fine without including the library, but when I include "HardwareSerialRS485.h" I get following error:
lib\HardwareSerialRS485-master\src/HardwareSerialRS485.h:59:38: error: conflicting declaration 'HardwareSerialRS485_1 Serial1'
I tried to port this over to the standard Arduino IDE, and get a different error message:
In file included from
C:\Users\david.webster\Documents\Arduino\libraries\HardwareSerial_RS485\src\HardwareSerialRS485.h:42:0,
from C:\Users\david.webster\Documents\Arduino\libraries\HardwareSerial_RS485\src\HardwareSerialRS485.cpp:21:
C:\Users\david.webster\Documents\Arduino\libraries\HardwareSerial_RS485\src\utility/HardwareSerialRS485_configuration.h:63:6: warning: #warning "No definition of RS485configuration_TRxControl was given, a possibly defunct default is now used." [-Wcpp]
#warning "No definition of RS485configuration_TRxControl was given, a possibly defunct default is now used."
^
HardwareSerial0.cpp.o (symbol from plugin): In function `Serial':
(.text+0x0): multiple definition of `__vector_25'
libraries\HardwareSerial_RS485\HardwareSerialRS485.cpp.o (symbol from plugin):(.text+0x0): first defined here
c:/users/david.webster/appdata/local/arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld.exe: Disabling relaxation: it will not work with multiple definitions
HardwareSerial0.cpp.o (symbol from plugin): In function `Serial':
(.text+0x0): multiple definition of `__vector_26'
libraries\HardwareSerial_RS485\HardwareSerialRS485.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
The libraries I've included are listed below in their entirety
#include "HardwareSerialRS485.h"
#include "Arduino.h"
#include <Ethernet.h> // Ethernet Comm Library
#include <EthernetUdp.h> // Ethernet UDP Comm Library
#include "Fill_With_Template.h" // Template function for filling arrays
#include <MsTimer2.h> // Millisecond timer
#include <PID_v1.h> // PID controller
#include <SPI.h> // SD Card related
#include <SD.h> // SD Card Related
Now, I've read quite a bit into the installation instructions, and have made the subdirectory for the 'boards' and 'DisableHardwareSerial' files. I know I need to modify the 'boards' file, and I tried to do SOME of it, but I'm a little lost as to what exactly I need to be putting in there.
Do you have any clues as to why I could be getting conflicting Serial1 declarations? Have I incorrectly set up some of these files? I apologize if this is a novice question. I'm really stumped.
I've attached the .zip program folder of the Arduino IDE version.
LMP_Prototype_Punch_Actuation_8_9_17_Arduino.zip
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.