Update code to work with LED's

Just wondering how I can update this code so I can work it with LED's?

double del;
double t;
double freq;
double T;
double tim;

int a=2;
int b=3;
int c=4;

void setup() {
Serial.begin(9600);

pinMode(a,OUTPUT);
pinMode(b,OUTPUT);
pinMode(c,OUTPUT);

//------------------------------
freq=200.00;
if (freq>100.00)
{
Serial.print("freq=");
Serial.println(freq);

t=1/(freq);

Serial.print("t=");
Serial.println(t);

T=t/4;

Serial.print("T=");
Serial.println(T);

tim=(2.00/3.00)*T;

del=tim*1000000;
Serial.print("delay=");
Serial.println(del);

}

}

void loop() {
if (freq>100.00)
{
Serial.println("heyy");
delaymicro();
}

}

void delaymicro()
{

digitalWrite(a, HIGH);
digitalWrite(b, LOW);
digitalWrite(c, HIGH);
delayMicroseconds(del);
digitalWrite(a, HIGH);
digitalWrite(b, LOW);
digitalWrite(c, LOW);
delayMicroseconds(del);
digitalWrite(a, HIGH);
digitalWrite(b, HIGH);
digitalWrite(c, LOW);
delayMicroseconds(del);
digitalWrite(a, LOW);
digitalWrite(b, HIGH);
digitalWrite(c, LOW);
delayMicroseconds(del);
digitalWrite(a, LOW);
digitalWrite(b, HIGH);
digitalWrite(c, HIGH);
delayMicroseconds(del);

//Serial.print("delay=");
//Serial.println(del);

digitalWrite(a, LOW);
digitalWrite(b, LOW);
digitalWrite(c, HIGH);
delayMicroseconds(del);

}

Read the how get the most out of this forum sticky to see how to properly post code. Remove useless white space and format the code with the IDE autoformat tool (crtl-t or Tools, Auto Format) before posting code in code tags. Please go back and edit your original post to format, remove excess white space and post it in code tags.

Just wondering how I can update this code so I can work it with LED's?

What LEDs? What does "work with" mean? We are not psychic. We cannot read your mind. You have to tell us what you want.

Hello,
insert comments to your sketch.
Do you have a function description, too?

groundFungus:
Read the how get the most out of this forum sticky to see how to properly post code. Remove useless white space and format the code with the IDE autoformat tool (crtl-t or Tools, Auto Format) before posting code in code tags. Please go back and edit your original post to format, remove excess white space and post it in code tags.
What LEDs? What does "work with" mean? We are not psychic. We cannot read your mind. You have to tell us what you want.

My apologies! I'm new to arduino and the forum. I am wanting to hook this code up to my breadboard and visually see some LED lights turning on and off in accordance to my code

So you want to connect LEDs to pins 2, 3 and 4? Do you want the LED to light when the pin is LOW or do you want the LED to light when the pin is HIGH?

LEDS HIGH LOW.jpg

LEDS HIGH LOW.jpg

Hello
in this case check the proper examples provided by the IDE.

groundFungus:
So you want to connect LEDs to pins 2, 3 and 4? Do you want the LED to light when the pin is LOW or do you want the LED to light when the pin is HIGH?

LEDS HIGH LOW.jpg

Basically i am building VFD and the code is to supply a signal to my gate drivers which turns the IGTB's ON or OFF. I think I want the LED to light up when the Pin is HIGH

Guys, don't waste your time with this topic-abandoning, cross-posting, form-guide-ignoring troll! How many times do they believe we will accept the "new to the forum" excuse?

I'm out.

Basically i am building VFD and the code is to supply a signal to my gate drivers which turns the IGTB's ON or OFF

Could have mentioned that in the first post. What else are they going to spring on us.

Plus the refusal to adhere to forum guidelines by fixing the original badly formatted post.

groundFungus:
We are not psychic. We cannot read your mind.

Even being a psychic mind reading is very difficult. Picking up answers might work but "the method" is still not the preferred one.....

Alright, I wasn't aware that asking for help was such a hassle. As I said, I'm new to all of it and just needed guidance. I just checked out the detailed thread on how to make a thread and I apologize for not following any protocols. Again, I was not aware and am now aware I clearly need to research how to make a thread to ask for help, thanks anyways

toed:
Alright, I wasn't aware that asking for help was such a hassle. As I said, I'm new to all of it and just needed guidance. I just checked out the detailed thread on how to make a thread and I apologize for not following any protocols. Again, I was not aware and am now aware I clearly need to research how to make a thread to ask for help, thanks anyways

The word "Help" is used in many different ways, asking for very different works. Tuning in what level of "Help" this forum provides is a good way to go.
I did download the code. It's not readable to me, using a language not known by the majority of helpers.

Railroader:
The word "Help" is used in many different ways, asking for very different works. Tuning in what level of "Help" this forum provides is a good way to go.
I did download the code. It's not readable to me, using a language not known by the majority of helpers.

Ya thats fair. Thanks for looking at it. Ill try to research more and see if I can change it. thank you

Or buy the proper display...

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.