Btalcox0715
Posts: 3
Joined: Fri Jul 04, 2014 2:54 pm

How to connect to GPIO pins.

Fri Jul 04, 2014 3:02 pm

So i have a bit of a dilemma here, and I'm also very new to hobby electronics. I have a Pi, and I bought the PiTFT 2.8 inch touchscreen for my pi. My goal is to mount it above my car stereo and plugin to my already installed car stereo and play music from LXMusic player on a USB drive. My dilemma is, I want this to boot up and shut down on ignition. I bought the 2A ignition switch for the pi from Mausberry Circuits. Now, I know the screen only uses a few of the GPIO pins, therefore the rest are all free. However, how do I connect to ignition switch wires (2 wires with a long slim black rectangle female head). Can I just like pull the female head off and solder the wire to the GPIO head poking out of the screen? Also, I would really like this to work and be able to fit in the PiBow case for the TFT screen so it'll mount in my car. Thanks in advance!!!

Btalcox0715
Posts: 3
Joined: Fri Jul 04, 2014 2:54 pm

Re: How to connect to GPIO pins.

Fri Jul 04, 2014 3:25 pm

https://learn.adafruit.com/system/asset ... 1385751880

http://cdn.shopify.com/s/files/1/0262/4 ... 1390417214

http://www.adafruit.com/images/1200x900/1723-06.jpg

Forgot to post these. These are the items in question. So in the first picture, it shows the screen installed, so where do i connect these female headers to the GPIO?

Thanks!

User avatar
FLYFISH TECHNOLOGIES
Posts: 1750
Joined: Thu Oct 03, 2013 7:48 am
Location: Ljubljana, Slovenia
Contact: Website

Re: How to connect to GPIO pins.

Fri Jul 04, 2014 4:05 pm

Hi,
Btalcox0715 wrote:Also, I would really like...
Let's go step back and check if we understand each other...
You want RasPi to boot up on ignition and you want to cut the power (not to politely shut down, but to immediately unplug the power) with the same ignition switch. Right ?


Best wishes, Ivan Zilic.
Running out of GPIO pins and/or need to read analog values?
Solution: http://www.flyfish-tech.com/FF32

Btalcox0715
Posts: 3
Joined: Fri Jul 04, 2014 2:54 pm

Re: How to connect to GPIO pins.

Fri Jul 04, 2014 4:46 pm

I believe the switch has a script that controls it, so it does safely shut down. Whichever is safest and avoids data corruption.

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: How to connect to GPIO pins.

Thu Jul 10, 2014 10:12 am

Yes, strip off the female header and solder the wires onto the board.

here is the setup instructions for the car switch. You will need to pick a GPIO pin to use and follow the instructions.

The TFT blurb page here says that it only uses the hardware SPI pins (SCK, MOSI, MISO, CE0, CE1) and GPIO #25 and #24. there are also 4 optional pushbutton connections which would also use GPIOs.

you could connect the car switch wires to one of the pushbutton connections or to the header that is designed for the 2x13 male GPIO extender. Either option will fit in the pictured case (I would probably solder them into the extender header but if you wanted to add an extender in the future this would get in the way).
Doug.
Building Management Systems Engineer.

Return to “Interfacing (DSI, CSI, I2C, etc.)”