Connecting a microswitch or button to Pi02.

RocNet(RaspberryPi), mergCBUS and LocoNet based hardware developed by Peter Giling. (GCA)
Documentation: http://wiki.rocrail.net/doku.php?id=english#hardware
Order information: http://wiki.rocrail.net/doku.php?id=gca:gca-index-en/

Connecting a microswitch or button to Pi02.

Postby DIYglenn » 15.06.2015, 09:06

Hi!
How do I connect a button to Pi02? Ground + pin 3-10, or +V to pin 3-10?

And I guess I'll have to make a small terminal to connect multiple switches?
DIYglenn
 

Re: Connecting a microswitch or button to Pi02.

Postby Pirat-Kapitan » 15.06.2015, 09:37

canceled,
it was for RasPi 2.
Last edited by Pirat-Kapitan on 15.06.2015, 10:56, edited 1 time in total.
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: Connecting a microswitch or button to Pi02.

Postby DIYglenn » 15.06.2015, 10:11

But that was for Pi01?

I'm wondering how to use the I/O ports on Pi02?

There are 10 ports, +,-, then 3-10 (input 1-8).
DIYglenn
 

Re: Connecting a microswitch or button to Pi02.

Postby Pirat-Kapitan » 15.06.2015, 10:57

negative,
it was for RasPi P2, I canceled my post.

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
 

Re: Connecting a microswitch or button to Pi02.

Postby phg » 15.06.2015, 11:06

Hi DIYglenn

Buttons and/or switches should always be switching to ground (= pin 2 of each of the four i/o connectors, as also indicated on the board itself).
Just look at this page:
http://wiki.rocrail.net/doku.php?id=gca ... n_of_ports
Best regards, herzliche Grüße, chaleureuses salutations, saludo cordial, migliori saluti, hjärtliga hälsningar, hartelijke groet,

Peter Giling (Rocrail - LNet(GCAxxx) - Fiddle Yard control GCA145 - CBUS (CAN-GCx)- RocNet (Raspberry Pi GCA-PIxx)
phg
 

Re: Connecting a microswitch or button to Pi02.

Postby DIYglenn » 15.06.2015, 13:29

Excellent! Thank you!
DIYglenn
 

Re: Connecting a microswitch or button to Pi02.

Postby DIYglenn » 25.06.2015, 09:23

I cannot get it working.

How do you set it up in Rocrail/Rocview?
I've chosen input and blink (blink = momentary right?) and I've set up a sensor with the corresponding address.
What else needs to be done?
btn02.png


btn01.png
You do not have the required permissions to view the files attached to this post.
DIYglenn
 

Re: Connecting a microswitch or button to Pi02.

Postby rjversluis » 26.06.2015, 06:27

DIYglenn wrote:I've chosen input and blink (blink = momentary right?) and I've set up a sensor with the corresponding address.

Just read the Wiki. Blink is for outputs.

DIYglenn wrote:What else needs to be done?

Push the **SET** button. And locate port 17 on the Pi02. -> http://wiki.rocrail.net/doku.php?id=gca ... n_of_ports
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBus - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
rjversluis
Site Admin
 

Re: Connecting a microswitch or button to Pi02.

Postby DIYglenn » 26.06.2015, 08:52

Hmm, it doesn't say anything about blink just being for outputs, I didn't know.
Blink
Use the delay as interval for blinking.


Anyways, I switched to "toggle", but still nothing happens. The virtual button on the screen works, but not the physical one.

It's connected to ground + Pin 17 (which are next to each other).
01.png


02.png
You do not have the required permissions to view the files attached to this post.
DIYglenn
 

Re: Connecting a microswitch or button to Pi02.

Postby DIYglenn » 26.06.2015, 09:41

I removed "toggle" as well, I left the three blank, and now it works :)

Thanks!
DIYglenn
 


Return to GCA (Hardware by Peter Giling)