CommandStation-EX icon indicating copy to clipboard operation
CommandStation-EX copied to clipboard

Off board accessory drivers API

Open davidcutting42 opened this issue 4 years ago • 4 comments

From #66

davidcutting42 avatar Nov 21 '20 04:11 davidcutting42

Don't know exactly what it means but brings up a question for me. We should build first a complete architectural view about a cheap easy to use DCC ecosystem. We can't / shall not support everything from the start ( and even later ) but make some opinionated choices towards the easy/cheap goal. We should actually be able to tell users what bricks to get how to stick them together and if you do this here is what you can do. We support this and make sure hat it works. so if we decide e.g. all accessories will run through lets say RF24 modules using protocol xyz thats it nothing more nothing less. There will be the perfect guide for doing this ( its just an example I didn't mean that as a choice ). If we try to cover all and everything nothing will be good to the level users would expect it to be looking at the ressources available.

grbba avatar Nov 22 '20 20:11 grbba

This makes sense. Get what your working on now going and bulletproof. When there is a product that the masses like and want then look to that second product like the ESP32 system. That will not appeal to as wide an audience.

marada1 avatar Nov 22 '20 21:11 marada1

Hardware abstraction layer under development may help with this. In this model, remote devices attached to GPIO extenders and DCC accessories are treated the same as local Arduino pins, both for sensors (input) and for turnouts and outputs. So setting a remote digital output for an LED, or operating a servo to move slowly between two positions, is requested by a <Z n 1> or <T n 1> command. This can be extended to LCN devices and others.

Neil-McK avatar May 05 '21 22:05 Neil-McK

The Hardware Abstraction Layer (HAL) has now been a core part of the CS for over a year and has platform-independent drivers for various GPIO Extenders, servo and LED PWM drivers, OLED and LCD displays, turntables, Arduino-based GPIO Expander, Rotary encoders, analogue inputs and more. Also, network support has been prototyped which enables device states to be send/received over ethernet, nRF24, and other media, facilitating the configuration of a distributed wired or wireless I/O network.

Neil-McK avatar Feb 16 '23 18:02 Neil-McK