THE ANNIN ROBOTICS FORUM HAS MOVED TO A NEW COMMUNITY. 👉
Teensy 4.1 Input tr...
 
Notifications
Clear all

Teensy 4.1 Input trigger

12 Posts
3 Users
0 Reactions
98 Views
Avatar of Dan
 Dan
(@dan)
Eminent Member
Joined: 2 months ago
Posts: 27
Topic starter  

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.



   
Quote
Johann Voigtlander
(@johann-voigtlander)
Estimable Member
Joined: 2 months ago
Posts: 87
 

Can you use one of the arduino inputs instead?



   
ReplyQuote
Avatar of Dan
 Dan
(@dan)
Eminent Member
Joined: 2 months ago
Posts: 27
Topic starter  

@johann-voigtlander

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.



   
ReplyQuote
Johann Voigtlander
(@johann-voigtlander)
Estimable Member
Joined: 2 months ago
Posts: 87
 

@dan

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



   
ReplyQuote
Avatar of Dan
 Dan
(@dan)
Eminent Member
Joined: 2 months ago
Posts: 27
Topic starter  

@johann-voigtlander

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



   
ReplyQuote
Johann Voigtlander
(@johann-voigtlander)
Estimable Member
Joined: 2 months ago
Posts: 87
 

@dan

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



   
ReplyQuote
Welding Flash Restorations
(@welding-flash-restorations)
Eminent Member
Joined: 2 months ago
Posts: 21
 

@johann-voigtlander did you have any look im trying to get an input from a trigger



   
ReplyQuote
Johann Voigtlander
(@johann-voigtlander)
Estimable Member
Joined: 2 months ago
Posts: 87
 

@welding-flash-restorations Nope. Never got it working...



   
ReplyQuote
Welding Flash Restorations
(@welding-flash-restorations)
Eminent Member
Joined: 2 months ago
Posts: 21
 

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



   
ReplyQuote
Welding Flash Restorations
(@welding-flash-restorations)
Eminent Member
Joined: 2 months ago
Posts: 21
 

@johann-voigtlander I have got it working with help from Chris



   
ReplyQuote
Johann Voigtlander
(@johann-voigtlander)
Estimable Member
Joined: 2 months ago
Posts: 87
 

@welding-flash-restorations

How did you get it working?

I am keen to figure it out



   
ReplyQuote
Welding Flash Restorations
(@welding-flash-restorations)
Eminent Member
Joined: 2 months ago
Posts: 21
 

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



   
ReplyQuote
Share:
Upload your Photo