Hey everybody this is my first post and I just ordered my first arduino so I'm very anxious I to get started, this is my first code:

I decide to skip the traditional Blinking LED (though I want to integrate it in) and went for a mosfet inverter that operates at 60 Hz - it will only be a square wave but I'll develop it as I get more confident in programming.

I would appreciate any feedback on the code itself:

other than actually acting as a switching power supply; I also want a visual indication that is running so and LED out of pin 8 will be occurring (my main question is how to I get two loops Running together in order to generate a inverter with a blinking LED that will allow the Inverter not to be affected by time).

void setup(){pinMode(POT, OUTPUT);//Enable POT AS AN OUTPUTpinMode (POB, OUTPUT);//ENABLE POB AS AN OUTPUTpinMode (NOT, OUTPUT);//ENABLE NOT AS AN OUTPUTpinMode (NOB, OUTPUT);//ENABLE NOT AS AN OUTPUTpinMode (LED, OUTPUT);//ENABLE LED AS AN OUTPUT}

I am in complete agreance with you about the accuracy - but to be honest I'm curious, I'm going to meassure the accuarcy witht the scope after I uploaded the code. I want to see the limitations of programming; as I used to be about all through hole components but the results of programming (for both accurcacy and ease of use) are unargueable.

But is it possible to have two loops occuring at the same time? And does anyone know of any good free ebooks (please include the links).

delay(8.333333); for sure won't work as delay uses an unsigned long as it's argument, not a floating point argument. You would have to use delayMicroseconds(8333); instead and even then delayMicroseconds has a built in (I believe I recall) 4 usec step size resolution.

@Nicksek, this seems to be very similar to your other thead on a very similar subject with the same mistakes.Do you want me to merge them so people won't waste time answering stuff that has already been answered, or just lock this thread?

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.Do not send technical questions via personal messaging - they will be ignored.