Flora Board TTL Pulses

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
floraboarder
 
Posts: 7
Joined: Thu Jul 06, 2017 2:35 pm

Flora Board TTL Pulses

Post by floraboarder »

How can I send a ttl pulse from my flora board? I saw this code online but not sure if it will work. Also, which pin should I use for this Adafruit Flora board connected to an accelerometer/magnetometer/gyroscope. (PS. I am new to arduinos) I believe I will be sending the pulse to a switching power supply.

Code: Select all

 int TTL_PIN = 9
int PAUSE = 2000;
void setup() {
pinMode(TTL_PIN, OUTPUT);
}
void loop() {
digitalWrite(TTL_PIN, LOW);
delay(PAUSE);
digitalWrite(TTL_PIN, HIGH);
delay(PAUSE);
}
Last edited by adafruit_support_carter on Fri Jul 14, 2017 12:43 pm, edited 1 time in total.
Reason: added code tags

User avatar
adafruit_support_carter
 
Posts: 29150
Joined: Tue Nov 29, 2016 2:45 pm

Re: Flora Board TTL Pulses

Post by adafruit_support_carter »

Depends on what you mean by 'ttl pulse' and what kind of digital signal you are trying to generate. But this looks like it is just basic digital output stuff. You say you're new to Arduino - have you gone through some basic example sketches yet?

User avatar
floraboarder
 
Posts: 7
Joined: Thu Jul 06, 2017 2:35 pm

Re: Flora Board TTL Pulses

Post by floraboarder »

I am trying to create a 5V TTL Pulse. And yes I have gone through the basic example sketches, by new I meant I have only been working with them for 1 week.
Last edited by floraboarder on Wed Jul 19, 2017 10:35 am, edited 1 time in total.

User avatar
adafruit_support_carter
 
Posts: 29150
Joined: Tue Nov 29, 2016 2:45 pm

Re: Flora Board TTL Pulses

Post by adafruit_support_carter »

The code you posted will generate a 2 second square wave. However the Flora is 3.3V board, so the voltage level will only be 3.3V.

User avatar
floraboarder
 
Posts: 7
Joined: Thu Jul 06, 2017 2:35 pm

Re: Flora Board TTL Pulses

Post by floraboarder »

Is this 2 second square wave a TTL pulse?

User avatar
adafruit_support_carter
 
Posts: 29150
Joined: Tue Nov 29, 2016 2:45 pm

Re: Flora Board TTL Pulses

Post by adafruit_support_carter »

The term "TTL Pulse" is too vague. See my previous post for an explanation of what the code will do. Maybe this is what you are calling a TTL Pulse. But do you want to create just one pulse? Or many? What pulse width? etc.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”