← General Discussion
Dan@dan· 776 viewsin General Discussion

Teensy 4.1 Input trigger

I'm trying to have the AR4 software respond to an input trigger (wired to pin 33 and GND pin)

I'm seeing 3.3v between the two pins and PULLUP is set on the teensy scratch.

I've tried the following inserted commands in the AR4 software program document (AR4 SOFTWARE COMMANDS FOR IO)

"TwaitI = 33"

"TwaitO = 33"

"TifOn = 33"

"TifOff = 33"

I haven't been able to get these to work, and stumped as to what to try next.

Comment 11

Johann Voigtlander

Can you use one of the arduino inputs instead?

Dan

Yes, I do have a nano setup, but I would like to run the IO's just from the teensy.

I have the teensy controlling a relay board from outputs 37 - 38, thats working fine with "ToutOn =37" "ToutOf = 37" commands. I see "TwaitI", "TwaitO" commands in the documentation and would like to get these to work, instead of a nano as a work around.

Johann Voigtlander

Hey Dan,

I am in a situation now where I am facing the same issue you are. Trying to use Teensy 3v3 to talk to GPIO pins on a Raspberry Pi.

Did you ever solve this? My program keeps crashing and will pretty much ignore any "TwaitI = 32" or "WIN32" commands.

I will continue to troubleshoot for the next few days.

Cheers

Dan

Na, I never did resolve it, just did a work around with an Arduino nano.

You could potentially do the same thing, use a nano via the ar4 software, then have the nano connected to a relay board, have the raspberry pi input trigger connected to the relay.

That would work with minimal effort and you wouldn't have to worry about the Arduino signalling on 5v and the raspberry pi running on 3.3v

Johann Voigtlander

Hey Dan,

It seems like the 'TwaitI = 32' command just send out a 'WIN' over serial rather than the correct 'WIN32'. I'll play with it a bit more but I have ordered some 3.3V to 5V bidirectional logic level converters. I think I'll probably upgrade to a Arduino Mega and do it that way.

I'll let you know if I figure out using the Teensy

Welding Flash Restorations

did you have any look im trying to get an input from a trigger

Johann Voigtlander

Nope. Never got it working...

Welding Flash Restorations

im hoping this gets sorted as it’s one of the things my robot arm will need

Welding Flash Restorations

I have got it working with help from Chris

Johann Voigtlander

How did you get it working?

I am keen to figure it out

Welding Flash Restorations

The way I got the triggers working for inputs for the teensy we’re writing the code out correctly Capitals and lower case here’s my code which dose as expected thanks to Chris Annin for his help

You also need a 3 pin switch to connect to teensy 1.4

COM to pin 32 / pin of your choice if available

NO (Normally Open) to pin 3.3v

NC (Normally Closed) to GND

11 replies

Photos