Page 1 of 1

Teensy through GPIO?

Posted: Mon Jun 27, 2016 8:02 pm
by Racerboy
I know this may sound a little redundant, but to eliminate the need for a USB hub from my project, I was wondering if it would be possible to have the Pi communicate with a Teensy-LC through GPIO, rather than USB. My USB port will be taken up by a Wifi/Bluetooth combo adapter.

I saw this article here which has a pi communicating with an arduino through SPI, was wondering if it would be possible with the Teensy as well and how I would go about doing it.

Let me know if this is possible, thanks!

Eric

Re: Teensy through GPIO?

Posted: Tue Jun 28, 2016 12:26 pm
by TurtleKitty
If you are going to do that, you may as well use the GPIO as input directly, and save you the programming of the teensy as well as the cost of the part

Re: Teensy through GPIO?

Posted: Tue Jun 28, 2016 12:30 pm
by wermy
TurtleKitty wrote:If you are going to do that, you may as well use the GPIO as input directly, and save you the programming of the teensy as well as the cost of the part
+1 for this. :) If you're wanting to use GPIO anyway then the Teensy is pointless. The biggest advantage of the Teensy is that it's plug-and-play in any device with no setup (just shows up as a keyboard).

Re: Teensy through GPIO?

Posted: Tue Jun 28, 2016 12:34 pm
by Kilren
If you're really serious about the GPIO:
I'm not sure where Brian is with this, but here is something cool that he was working on. Maybe he'll chime in also.

12 buttons with only 4 GPIO pins
@1461748123

Otherwise, you can just run each wire to a different GPIO. There are a couple of schematics floating around for that

Re: Teensy through GPIO?

Posted: Tue Jun 28, 2016 7:31 pm
by Racerboy
Don't you need a pull-up resistor for each input? I didn't want to go through the hassle of making a circuit for 25 inputs when I have my Teensy sitting here for another project.

I figured the Teensy would allow for easier adjustments later on, and thought it would make it a bit more organized. I have 25 inputs total (excessive but necessary) so the Teensy would accept all of them perfectly. I would only need a 2-port USB hub so I figured that would be pretty pointless if I could do it with GPIO.

Re: Teensy through GPIO?

Posted: Wed Jun 29, 2016 6:41 pm
by 1461748123
Racerboy wrote:Don't you need a pull-up resistor for each input? I didn't want to go through the hassle of making a circuit for 25 inputs when I have my Teensy sitting here for another project.

I figured the Teensy would allow for easier adjustments later on, and thought it would make it a bit more organized. I have 25 inputs total (excessive but necessary) so the Teensy would accept all of them perfectly. I would only need a 2-port USB hub so I figured that would be pretty pointless if I could do it with GPIO.
No you don't need pull-up resistor since pi-zero have them built in :D
With only 6 gpio pins, you can control up to 30 buttons! :) Also, using wiringpi you can program the buttons with C, which is really easy to maintain as well.

Re: Teensy through GPIO?

Posted: Thu Jun 30, 2016 9:02 am
by Racerboy
1461748123 wrote:
Racerboy wrote:Don't you need a pull-up resistor for each input? I didn't want to go through the hassle of making a circuit for 25 inputs when I have my Teensy sitting here for another project.

I figured the Teensy would allow for easier adjustments later on, and thought it would make it a bit more organized. I have 25 inputs total (excessive but necessary) so the Teensy would accept all of them perfectly. I would only need a 2-port USB hub so I figured that would be pretty pointless if I could do it with GPIO.
No you don't need pull-up resistor since pi-zero have them built in :D
With only 6 gpio pins, you can control up to 30 buttons! :) Also, using wiringpi you can program the buttons with C, which is really easy to maintain as well.
Alright, sounds good! I'll do that then. Should I still have some sort of board that accepts all 30 inputs and converts it to 6 pins for the pi? It'll have to be just the right size and shape for my application.