GPIO - 5V reference

Race Capture Pro hardware installation- power, wiring, physical installation, etc. See the dedicated forum for Sensor related topics

Moderators: JeffC, rdoherty, stieg, brentp

Post Reply
psfp
Posts: 49
Joined: Mon Aug 21, 2017 10:40 pm
Location: DF - Brazil

GPIO - 5V reference

Post 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

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post 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!
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

psfp
Posts: 49
Joined: Mon Aug 21, 2017 10:40 pm
Location: DF - Brazil

Post 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.

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Glad you got it working!
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

Post Reply