Hi PJR,
now it is working with this code in the MyTransportRS485 without any changes on MySensors.h:
#if defined(MY_RS485_SWSERIAL)
SoftwareSerial& _dev = MY_RS485_SWSERIAL;
#elif defined(__linux__)
SerialPort _dev = SerialPort(MY_RS485_HWSERIAL);
#elif defined(MY_RS485_HWSERIAL)
HardwareSerial& _dev = MY_RS485_HWSERIAL;
#else
AltSoftSerial _dev;
#endif
As far as I can interpret the peace of code, the
#include "hal/transport/MyTransportRS485.cpp"
is active as soon as the MY_RS485 layer is defined.
This is a great step, I can use all my nodes from now on!
Thank you very much for your support!
By Kduino
Hi @blackchart,
Unfortunately, all devices are sold out. Further production is possible only when ordering more than 10 devices (in this case, I also can modify the device to suit your needs).
Not yet !
In fact, the interrupt must be short enough and fast enough to be sure to not miss the RFM69 interrupts.
The code for 8 dimmers will not be really more complicated : in fact, each time we got a zero cross, we must set a timer to zero, and then wait the good amount of milliseconds to turn on the needed outputs.
So, yes, we'll have an interrupts each 10ms (each time the wave crosses the zero, to be precise !), but I think all we have to do in the interrupt handler is set the timer to zero (or to micros() ...) and then on the main loop, wait the good amount of time for each output before setting them ON.
Seems simple on paper, perhaps it will not work on the chip....
In facts, my main concern is : will the RFM interrupt be short enough to not disturb the zero crossing interrupt ?
Although, not yet tested the RFM : do we NEED the interrupt pin ? Can't we poll frequently the RFM?
I will answer myself after some testing done today:
How can I change network id for gateway (mysgw)?
It is possible to change MY_RFM69_NETWORKID for mysgw by exporting CPPFLAGS variable with the option set before running ./configure:
example:
export CPPFLAGS='-DMY_RFM69_NETWORKID="101"'
./configure --my-gateway=serial --my-transport=rfm69 --my-rfm69-frequency=868 --my-is-rfm69hw --my-serial-is-pty --my-serial-port=/dev/ttyUSB-MysGW --my-serial-groupname=dialout
make
Is it possible to create another RFM69 network on new hardware, just for the test, while my current RFM69 network keeps running on current gateway/controller?
As soon as I started another RFM69 gateway (mysgw) on new hw, even with different network id (101), most of the sensors connected to my other (production) gateway running on old hw with default network id (100) stopped communicating... so it seems it is not possible to run multiple RFM69 gateways in the same range (on the same freq).