Teensy through GPIO?

Arduino/Teensy software/code questions and discussion
Post Reply
Racerboy
Posts: 129
Joined: Thu Jun 02, 2016 4:49 pm
Has thanked: 25 times
Been thanked: 36 times

Teensy through GPIO?

Post by Racerboy » Mon Jun 27, 2016 8:02 pm

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

TurtleKitty
Posts: 3
Joined: Mon Jun 27, 2016 2:14 am

Re: Teensy through GPIO?

Post by TurtleKitty » Tue Jun 28, 2016 12:26 pm

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

User avatar
wermy
Site Admin
Posts: 1346
Joined: Tue May 03, 2016 8:51 pm
Has thanked: 620 times
Been thanked: 1322 times
Contact:

Re: Teensy through GPIO?

Post by wermy » Tue Jun 28, 2016 12:30 pm

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).
ImageImageImageImage

User avatar
Kilren
Posts: 574
Joined: Wed May 11, 2016 4:40 pm
Location: Washington, USA
Has thanked: 35 times
Been thanked: 84 times

Re: Teensy through GPIO?

Post by Kilren » Tue Jun 28, 2016 12:34 pm

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

Racerboy
Posts: 129
Joined: Thu Jun 02, 2016 4:49 pm
Has thanked: 25 times
Been thanked: 36 times

Re: Teensy through GPIO?

Post by Racerboy » Tue Jun 28, 2016 7:31 pm

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.

User avatar
1461748123
Posts: 143
Joined: Wed May 04, 2016 8:36 pm
Has thanked: 9 times
Been thanked: 17 times

Re: Teensy through GPIO?

Post by 1461748123 » Wed Jun 29, 2016 6:41 pm

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.

Racerboy
Posts: 129
Joined: Thu Jun 02, 2016 4:49 pm
Has thanked: 25 times
Been thanked: 36 times

Re: Teensy through GPIO?

Post by Racerboy » Thu Jun 30, 2016 9:02 am

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest