Ik heb voor een Uno nog een XpressNet shield over. Dan kan je bedrade multimausen gebruikenBas
Dit is vanwege de Tx en Rx pinnen op de UNO neem ik aan omdat deze ook gebruikt worden voor de communicatie met de USB interface om de XpressNet pakketjes te sturen naar de serial monitor.
#define DEBUG#ifndef DEBUG...#endif
Even voor mijn begrip: heeft DCC++ EX kant-en-klare ondersteuning voor een Xpressnet handregelaar?
XpressNet is physical RS485. So you first need a RS485 to RS232 interface and then you need to write a XpressNet parser (alike the parsers for DCC++ and WiThrottle). Or you decide to support it over TCP/IP which means you need to set up the WiFi to receive UDP packets and then parse the UDP packet contents which probably is alike what comes in over RS485.
Looks like pgahtow has succeeded to use the UART of serial1 of an arduino mega and a MAX485CPA IC to do RS485. However we can not take his code and publish it as part of DCC-EX because it does not have a license. I do not own any Xpressnet equipment so I can not test if one can at the same time run https://github.com/Digital-MoBa/XpressNetMaster as a library and DCCEX on an Arduino Mega. If it is not too interrupt intensive it might be possible. I find it strange to "release" something but not put a license on it.
extern void notifyXNetLocoDrive128(uint16_t Address, uint8_t Speed) __attribute__((weak));extern void notifyXNetgiveLocoFunc(uint8_t UserOps, uint16_t Address) __attribute__((weak));extern void notifyXNetLocoFunc1(uint16_t Address, uint8_t Func1) __attribute__((weak));//Gruppe1 0 0 0 F0 F4 F3 F2 F1extern void notifyXNetLocoFunc2(uint16_t Address, uint8_t Func2) __attribute__((weak));//Gruppe2 0000 F8 F7 F6 F5extern void notifyXNetLocoFunc3(uint16_t Address, uint8_t Func3) __attribute__((weak));//Gruppe3 0000 F12 F11 F10 F9extern void notifyXNetLocoFunc4(uint16_t Address, uint8_t Func4) __attribute__((weak));//Gruppe4 F20-F13extern void notifyXNetLocoFunc5(uint16_t Address, uint8_t Func5) __attribute__((weak));//Gruppe5 F28-F21
void notifyXNetLocoDrive28( uint16_t Address, uint8_t Speed ){ setPoint = lookUpSpeed( Speed & 0b00011111 ) ; setPoint = map( setPoint, 0, 28, 0, SPEED_MAX ) ; // map 28 speedsteps to 100 for weistra control if( Speed & 0x80 ) setPoint = -setPoint ;}