Page 1 of 1

GPIO - 5V reference

Posted: Sun Sep 03, 2017 10:35 pm
by psfp
Hi,

I want to use an external switch to activate a function in Lua script. The idea is to use the switch between the 5v reference and GPIO #1. Do I need to use any sort of resistor, or the 5v straight into the GPIO port would be fine?

Thanks

Paulo

Posted: Tue Sep 05, 2017 5:05 pm
by brentp
I would recommend connecting it this way:

1 - 100K pullup resistor between GPIO input and 5v (resistance is not critical)

Switch connected between input and ground

This way, when the switch is open, the pullup resistor pulls up to 5v, and when the switch is closed, the input is pulled to ground.

Hope this helps, let us know how the project goes!

Posted: Mon Sep 11, 2017 4:28 am
by psfp
Thanks Brent. It worked. Unfortunately, looks like RaceCapture Pro isn't communicating to my car anymore. Not sure what may have caused it. I'll start a thread about it.

Edit: problem fixed, it was a bad connector. Everything is fine now.

Posted: Sun Sep 17, 2017 5:57 pm
by brentp
Glad you got it working!