RS485/RS232/Serial transport class for mysensors.org
-
Is there any how-to's on this transport class as far as the hardware goes? How does it work with multiple nodes? Is it like a ring pattern? or do all the nodes have to have a dedicated connection to the gateway.
-
Is it possible, to built a esp8266 wifi gateway and communicate GW to node with rs485?
In altsoft esp8266 is not decleared, so i can't use it out of the box.Btw: I tested my_rs485 with nano as GW and Pro Mini as node, and it worked great. Thank you :)
-
@hausinger if you know about coding..
- plain C lib for esp8266, it can be adapted to work with Arduino Esp: https://github.com/plieningerweb/esp8266-software-uart
- or use stock arduino esp8266 software serial lib (https://github.com/plerup/espsoftwareserial), and inspire yourself from lib above, and code your CE pin management..
-
How about adding the following define to use the Serial1/2 on Mega. I have not tested yet but assuming the AltSoftSerial lib has the same interface/functionality it should work.
#define MY_RS485_SERIAL Serial1diff --git a/core/MyTransportRS485.cpp b/core/MyTransportRS485.cpp index 814f721..ea35c9e 100644 --- a/core/MyTransportRS485.cpp +++ b/core/MyTransportRS485.cpp @@ -92,7 +92,11 @@ unsigned char _recSender; unsigned char _recCS; unsigned char _recCalcCS; +#if defined(MY_RS485_SERIAL) +HardwareSerial& _dev = MY_RS485_SERIAL; +#else AltSoftSerial _dev; +#endif unsigned char _nodeId; -
@hek Thanks for the quick response. I'm looking for some direction (this might not be the right forum).
I want to create a node to control my Itho Ecofan ventilation box. I now have a working program (thanks to the help of Rogier Reedijk The nodo now uses a CC1101 transceiver to control the box and thus uses the SPI bus. I'm looking for some direction to use this transmitter as part of my sensor network so I can control it from my Domoticz. Hope you can give me some directions how to proceed. -
Hello,
I have a problem running gatewayserial to rs-485 and the node with the usual lightsensor.
NODE # 1 as a gateway and tried to upload a sketch of the library 2.0 and 1.5.4, and the monitor serial I can not see any data, I use to check on the serial PuTTy com6 because the converter rs-485 to USB is connected to the PC.NODE # 2 as a light sensor, during the upload Sketch by arduino programmer for serial monitor can see the data being sent but after plugging arduino to rs-485 as below no longer visible.
My question is whether I have something wrong with the connection or sketch, can someone show an example of a complete sketch for the gateway, and a node?
Connection mine looks like this:
TX and RX Connect was to pins 0 and 1 in arduino or 8 and 9, DE is always PIN 2. -
so this is a 1 to 1 setup right? There is nothing here for multiple serial nodes correct?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login