Setting up Raspberry Pi and Sprog

http://www.sprog-dcc.co.uk/

Setting up Raspberry Pi and Sprog

Postby InfraHead » 01.01.2018, 08:51

Can anyone give me a step by step guide to

A: Setting up Sprog in Rocrail, (I know the deving is on /ttyAMA0 or similar, but I don't know where to type this in and if their are other names/things to type in...)
B: Setting up Raspberry Pi GPIO. (I have 2 working sensors on GPIO 21 and GPIO 20, and a test python script which shoes it all works well)

Many thanks, and a Happy New Year.


EDIT:----
Have now worked out how to control train with sprog using Rocrail. Control of the train is MUCH better with Rocrail than JMRI btw!!!
Just need to get GPIO 21 and 20 connected up.
Last edited by InfraHead on 01.01.2018, 12:21, edited 2 times in total.
InfraHead
 

Re: Setting up Raspberry Pi and Sprog

Postby Pirat-Kapitan » 01.01.2018, 09:01

Clearasilfahrer auf Spur G&H0m, Lenz LZV (3.6), ORD-20, Manhart-Funki und WLM, RS-Bus Rückmelder (Reedkontakte/GBM),
Rocrail auf RasPi mit mobilen Geräten (andRoc). Details auf http://wiki.rocrail.net/doku.php?id=use ... at-kapitan.
Pirat-Kapitan
 

Re: Setting up Raspberry Pi and Sprog

Postby InfraHead » 01.01.2018, 11:25

Pirat-Kapitan wrote:Moin,
Top B: see http://wiki.rocrail.net/doku.php?id=userpages:pirat-kapitan:raspi-wlan-feedback (german only).

best reagards
Johannes



Many thanks,

Unfortunately even with Google Translate I was unable to work out what to type and which window to type for either issue. I managed to get the train under manual control which has made me happy. Just need to get GPIO sensors talking.

I'm hoping someone has blogged instructions somewhere.
InfraHead
 

Re: Setting up Raspberry Pi and Sprog

Postby smitt48 » 01.01.2018, 15:24

Hi,

Which section do you have problems with? I will try to translate.

Tom
Kind regards,
Tom Smit
Kralendijk, Bonaire - Dutch Caribbean

Märklin M & K-rails with ECoS2 (4.2.3) - Win10
RoSoft: S88n & WDD switch & SDD signal decoders
Display: Tri-ang from 1950's, Märklin from early 1960's
In build phase
smitt48
 

Re: Setting up Raspberry Pi and Sprog

Postby InfraHead » 01.01.2018, 21:16

Thanks for your interest, I am grateful.

I have read the following from Google Translate;

https://translate.google.com/translate? ... n-feedback

However I am still unable to work out how to add sensors for each GPIO port on the Raspberry Pi. My breakbeam sensors work as I can tell from a python script I have written. But I don't know how to set up Rocrail to listen to the sensors.
InfraHead
 

Re: Setting up Raspberry Pi and Sprog

Postby smitt48 » 01.01.2018, 21:20

Hi,

Have you tried the sensor monitor to see if the message arrives?
http://wiki.rocrail.net/doku.php?id=sensormon-en

Tom
Kind regards,
Tom Smit
Kralendijk, Bonaire - Dutch Caribbean

Märklin M & K-rails with ECoS2 (4.2.3) - Win10
RoSoft: S88n & WDD switch & SDD signal decoders
Display: Tri-ang from 1950's, Märklin from early 1960's
In build phase
smitt48
 

Re: Setting up Raspberry Pi and Sprog

Postby InfraHead » 01.01.2018, 21:27

smitt48 wrote:Hi,

Have you tried the sensor monitor to see if the message arrives?
http://wiki.rocrail.net/doku.php?id=sensormon-en

Tom


Yes, I get nothing.

I need to know what to type in and where, which window etc. For instance, my GPIO 21 and 20 pins have an IR receiver. I just need to know what to type in, and where.
InfraHead
 

Re: Setting up Raspberry Pi and Sprog

Postby InfraHead » 01.01.2018, 23:16

I have studied the circuit diagram for the feedback module, It appears that I am restricted to specific GPIO pins and that not all of the GPIO is supported.

I will experiment a little to see what happens.
InfraHead
 

Re: Setting up Raspberry Pi and Sprog

Postby Pirat-Kapitan » 01.01.2018, 23:30

Moin,
the feedback script was made for a RasPi 1 with less GPIOs as a RasPi 2 ord RasPi 3 and uses only the GPIOs available on an Raspi 1.
Please notice, rocrail ONLY refers to the ID of the sensors. An adress of the sensor is a "nice" goody for rocrail work, but you may use virtual adresses.

the used GPIOS are
GPIO.setmode(GPIO.BOARD)
GPIO.setup(7,GPIO.IN,pull_up_down=GPIO.PUD_UP)
GPIO.setup(11,GPIO.IN,pull_up_down=GPIO.PUD_UP)
GPIO.setup(12,GPIO.IN,pull_up_down=GPIO.PUD_UP)
GPIO.setup(13,GPIO.IN,pull_up_down=GPIO.PUD_UP)
GPIO.setup(15,GPIO.IN,pull_up_down=GPIO.PUD_UP)
GPIO.setup(16,GPIO.IN,pull_up_down=GPIO.PUD_UP)
GPIO.setup(18,GPIO.IN,pull_up_down=GPIO.PUD_UP)
GPIO.setup(22,GPIO.IN,pull_up_down=GPIO.PUD_UP)


Best regards
Johannes
Clearasilfahrer auf Spur G&H0m, Lenz LZV (3.6), ORD-20, Manhart-Funki und WLM, RS-Bus Rückmelder (Reedkontakte/GBM),
Rocrail auf RasPi mit mobilen Geräten (andRoc). Details auf http://wiki.rocrail.net/doku.php?id=use ... at-kapitan.
Pirat-Kapitan
 


Return to sprog

cron