¿ªÔÆÌåÓý

Locked Re: Using Arduino to measure train speed - how do I send speed to JMRI for panel display?


 

If you¡¯re willing to make a serial connection to the Arduino for transferring the data, look at the jython/serialinput () scripts. That¡¯s a way to send bits and analog values from an Arduino, receiving them via a script and serial port.

Bob

On Aug 8, 2018, at 10:10 AM, JerryG via Groups.Io <jerryg2003@...> wrote:

What I would like to do is send a number representing train speed from my homebrew Arduino/IR sensor speedometer back to PanelPro to display on my panel by the block where speed is measured. I can put several of these on the layout and see the speed of all my detected trains as they move around the layout.

The Arduino is configured to appear as a C/MRI SMINI node to JMRI to send a sensor a ¡±block occupied¡± bit right now. I¡¯m not adverse to changing the interface method to JMRI if I have to, although the current approach is really simple and doesn¡¯t require any hardware other than the Arduino.

Any thoughts on how I might:
? Send speed as a number back to PanelPro over C/MRI or some other way.
? Display that number on my panel.
My general question is whether there is a way for sensors to send more than 0 or 1 to JMRI to display on panels, for example engine numbers from RFID detectors.

Thanks, Jerry
_________________________________
jerryg2003@...

--
Bob Jacobsen
rgj1927@...

Join [email protected] to automatically receive all group messages.