I've written up this very simply code to control transistors in an inverter circuit. The editor is flagging up errors which I can't see myself. I'm pretty new to Arduino programming but it's very simple code and can't see why it's being shown as having errors.
At first glance, what am I missing? I've pasted a section below:
int Phase1pos = 13;
int Phase2pos = 12;
int Phase3pos = 11;
int Phase1neg = 10;
int Phase2neg = 9;
int Phase3neg = 8;
void setup() {
pinMode(Phase1pos, OUTPUT);
pinMode(Phase2pos, OUTPUT);
pinMode(Phase3pos, OUTPUT);
pinMode(Phase1neg, OUTPUT);
pinMode(Phase2neg, OUTPUT);
pinMode(Phase3neg, OUTPUT);
}
void loop() {
delayMicroseconds(16);
digitalWrite(Phase3neg, HIGH);
delayMicroseconds(27);
digitalWrite(Phase2pos, HIGH);
delayMicroseconds(138);
digitalWrite(Phase1pos, HIGH);
delayMicroseconds(54);
digitalWrite(Phase1pos, LOW);
delayMicroseconds(138);
digitalWrite(Phase2pos, LOW);
delayMicroseconds(27);
digitalWrite(Phase3neg, LOW);
delayMicroseconds(16);
delayMicroseconds(7);
digitalWrite(Phase3neg, HIGH);
delayMicroseconds(54);
digitalWrite(Phase2pos, HIGH);
delayMicroseconds(93);
digitalWrite(Phase1pos, HIGH);
delayMicroseconds(108);
digitalWrite(Phase1pos, LOW);
delayMicroseconds(93);
digitalWrite(Phase2pos, LOW);
delayMicroseconds(54);
digitalWrite(Phase3neg, LOW);
delayMicroseconds(7);
delayMicroseconds(2);
digitalWrite(Phase3neg, HIGH);
delayMicroseconds(80);
digitalWrite(Phase2pos, HIGH);
delayMicroseconds(47);
digitalWrite(Phase1pos, HIGH);
delayMicroseconds(159);
digitalWrite(Phase1pos, LOW);
delayMicroseconds(47);
digitalWrite(Phase2pos, LOW);
delayMicroseconds(80);
digitalWrite(Phase3neg, LOW);
delayMicroseconds(2);
digitalWrite(Phase3neg, HIGH);
delayMicroseconds(104);
digitalWrite(Phase2pos, HIGH);
digitalWrite(Phase1pos, HIGH);
delayMicroseconds(208);
digitalWrite(Phase1pos, LOW);
digitalWrite(Phase2pos, LOW);
delayMicroseconds(104);
digitalWrite(Phase3neg, LOW);
delayMicroseconds(2);
digitalWrite(Phase3neg, HIGH);
delayMicroseconds(80);
digitalWrite(Phase1pos, HIGH);
delayMicroseconds(47);
digitalWrite(Phase2pos, HIGH);
delayMicroseconds(159);
digitalWrite(Phase2pos, LOW);
delayMicroseconds(47);
digitalWrite(Phase1pos, LOW);
delayMicroseconds(80);
digitalWrite(Phase3neg, LOW);
delayMicroseconds(7);
digitalWrite(Phase3neg, HIGH);
delayMicroseconds(54);
digitalWrite(Phase1pos, HIGH);
delayMicroseconds(93);
digitalWrite(Phase2pos, HIGH);
delayMicroseconds(108);
digitalWrite(Phase2pos, LOW);
delayMicroseconds(93);
digitalWrite(Phase1pos, LOW);
delayMicroseconds(54);
digitalWrite(Phase3neg, LOW);
delayMicroseconds(7);
delayMicroseconds(16);
digitalWrite(Phase3neg, HIGH);
delayMicroseconds(27);
digitalWrite(Phase1pos, HIGH);
delayMicroseconds(138);
digitalWrite(Phase2pos, HIGH);
delayMicroseconds(54);
digitalWrite(Phase2pos, LOW);
delayMicroseconds(138);
digitalWrite(Phase1pos, LOW);
delayMicroseconds(27);
digitalWrite(Phase3neg, LOW);
digitalWrite(16);
delayMicroseconds(28);
digitalWrite(Phase3neg, HIGH);
digitalWrite(Phase1pos, HIGH);
delayMicroseconds(180);
delayMicroseconds(180);
digitalWrite(Phase1pos, LOW);
digitalWrite(Phase3neg, LOW);
delayMicroseconds(28);
delayMicroseconds(16);
digitalWrite(Phase1pos, HIGH);
delayMicroseconds(27);
digitalWrite(Phase3neg, HIGH);
delayMicroseconds(138);
digitalWrite(Phase2neg, HIGH);
delayMicroseconds(54);
digitalWrite(Phase2neg, LOW);
delayMicroseconds(138);
digitalWrite(Phase3neg, LOW);
delayMicroseconds(27);
digitalWrite(Phase1pos, LOW);
delayMicroseconds(16);
delayMicroseconds(7);
digitalWrite(Phase1pos, HIGH);
delayMicroseconds(54);
digitalWrite(Phase3neg, HIGH);
delayMicroseconds(93);
digitalWrite(Phase2neg, HIGH);
delayMicroseconds(108);
digitalWrite(Phase2neg, LOW);
delayMicroseconds(93);
digitalWrite(Phase3neg, LOW);
delayMicroseconds(54);
digitalWrite(Phase1pos, LOW);
delayMicroseconds(2);
digitalWrite(Phase1pos, HIGH);
delayMicroseconds(80);
digitalWrite(Phase3neg, HIGH);
delayMicroseconds(47);
digitalWrite(Phase2neg, HIGH);
delayMicroseconds(159);
digitalWrite(Phase2neg, LOW);
delayMicroseconds(47);
digitalWrite(Phase3neg, LOW);
delayMicroseconds(80);
digitalWrite(Phase1pos, LOW);
delayMicroseconds(2);
digitalWrite(Phase1pos, HIGH);
delayMicroseconds(104);
digitalWrite(Phase2neg, HIGH);
digitalWrite(Phase3neg, HIGH);
delayMicroseconds(208);
digitalWrite(Phase3neg, LOW);
digitalWrite(Phase2neg, LOW);
delayMicroseconds(104);
digitalWrite(Phase1pos, LOW);
delayMicroseconds(2);
digitalWrite(Phase1pos, HIGH);
delayMicroseconds(80);
digitalWrite(Phase2neg, HIGH);
delayMicroseconds(47);
digitalWrite(Phase3neg, HIGH);
delayMicroseconds(159);
digitalWrite(Phase3neg, LOW);
delayMicroseconds(47);
digitalWrite(Phase2neg, LOW);
delayMicroseconds(80);
digitalWrite(Phase1pos, LOW);
delayMicroseconds(2);
delayMicroseconds(7);
digitalWrite(Phase1pos, HIGH);
delayMicroseconds(54);
digitalWrite(Phase2neg, HIGH);
delayMicroseconds(93);
digitalWrite(Phase3neg, HIGH);
delayMicroseconds(108);
digitalWrite(Phase3neg, LOW);
delayMicroseconds(93);
digitalWrite(Phase2neg, LOW);
delayMicroseconds(54);
digitalWrite(Phase1pos, LOW);
delayMicroseconds(7);
delayMicroseconds(16);
digitalWrite(Phase1pos, HIGH);
delayMicroseconds(27);
digitalWrite(Phase2neg, HIGH);
delayMicroseconds(138);
digitalWrite(Phase3neg, HIGH);
delayMicroseconds(54);
digitalWrite(Phase3neg, LOW);
delayMicroseconds(138);
digitalWrite(Phase2neg, LOW);
delayMicroseconds(27);
digitalWrite(Phase1pos, LOW);
delayMicroseconds(16);
delayMicroseconds(28);
digitalWrite(Phase1pos, HIGH);
digitalWrite(Phase2neg, HIGH);
delayMicroseconds(180);
delayMicroseconds(180);
digitalWrite(Phase2neg, LOW);
digitalWrite(Phase1pos, LOW);
delayMicroseconds(28);
delayMicroseconds(16);
digitalWrite(Phase2neg, HIGH);
delayMicroseconds(27);
digitalWrite(Phase1pos, HIGH);
delayMicroseconds(138);
digitalWrite(Phase3pos, HIGH);
delayMicroseconds(54);
digitalWrite(Phase3pos, LOW);
delayMicroseconds(138);
digitalWrite(Phase1pos, LOW);
delayMicroseconds(27);
digitalWrite(Phase2neg, LOW);
delayMicroseconds(16);
delayMicroseconds(7);
digitalWrite(Phase2neg, HIGH);
delayMicroseconds(54);
digitalWrite(Phase1pos, HIGH);
delayMicroseconds(93);
digitalWrite(Phase3pos, HIGH);
delayMicroseconds(108);
digitalWrite(Phase2pos, LOW);
delayMicroseconds(93);
digitalWrite(Phase1pos, LOW);
delayMicroseconds(54);
digitalWrite(Phase2neg, LOW);
delayMicroseconds(7);
delayMicroseconds(2);
digitalWrite(Phase2neg, HIGH);
delayMicroseconds(80);
digitalWrite(Phase1pos, HIGH);
delayMicroseconds(47);
digitalWrite(Phase3pos, HIGH);
delayMicroseconds(159);
digitalWrite(Phase3pos, LOW);
delayMicroseconds(47);
digitalWrite(Phase1pos, LOW);
delayMicroseconds(80);
digitalWrite(Phase2neg, LOW);
delayMicroseconds(2);
digitalWrite(Phase2neg, HIGH);
delayMicroseconds(104);
digitalWrite(Phase1pos, HIGH);
digitalWrite(Phase3pos, HIGH);
delayMicroseconds(208);
digitalWrite(Phase3pos, LOW);
digitalWrite(Phase1pos, LOW);
delayMicroseconds(104);
digitalWrite(Phase2neg, LOW);
delayMicroseconds(2);
digitalWrite(Phase2neg, HIGH);
delayMicroseconds(80);
digitalWrite(Phase3pos, HIGH);
delayMicroseconds(47);
digitalWrite(Phase1pos, HIGH);
delayMicroseconds(159);
digitalWrite(Phase1pos, LOW);
delayMicroseconds(47);
digitalWrite(Phase3pos, LOW);
delayMicroseconds(80);
digitalWrite(Phase2neg, LOW);
delayMicroseconds(2);
delayMicroseconds(7);
digitalWrite(Phase2neg, HIGH);
delayMicroseconds(54);
digitalWrite(Phase3pos, HIGH);
delayMicroseconds(93);
digitalWrite(Phase1pos, HIGH);
delayMicroseconds(108);
digitalWrite(Phase1pos, LOW);
delayMicroseconds(93);
digitalWrite(Phase3pos, LOW);
delayMicroseconds(54);
digitalWrite(Phase2neg, LOW);
delayMicroseconds(7);
delayMicroseconds(16);
digitalWrite(Phase2neg, HIGH);
delayMicroseconds(27);
digitalWrite(Phase3pos, HIGH);
delayMicroseconds(138);
digitalWrite(Phase1pos, HIGH);
delayMicroseconds(54);
digitalWrite(Phase1pos, LOW);
delayMicroseconds(138);
digitalWrite(Phase3pos, LOW);
delayMicroseconds(27);
digitalWrite(Phase2neg, LOW);
delayMicroseconds(16);
delayMicroseconds(28);
digitalWrite(Phase2neg, HIGH);
digitalWrite(Phase3pos, HIGH);
delayMicroseconds(180);
delayMicroseconds(180);
digitalWrite(Phase3pos, LOW);
digitalWrite(Phase2neg, LOW);
delayMicroseconds(28);
delayMicroseconds(16);
digitalWrite(Phase3pos, HIGH);
delayMicroseconds(27);
digitalWrite(Phase2neg, HIGH);
delayMicroseconds(138);
digitalWrite(Phase1neg, HIGH);
delayMicroseconds(54);
digitalWrite(Phase1neg, LOW);
delayMicroseconds(138);
digitalWrite(Phase2neg, LOW);
delayMicroseconds(27);
digitalWrite(Phase3pos, LOW);
delayMicroseconds(16);
delayMicroseconds(7);
digitalWrite(Phase3pos, HIGH);
delayMicroseconds(54);
digitalWrite(Phase2neg, HIGH);
delayMicroseconds(93);
digitalWrite(Phase1neg, HIGH);
delayMicroseconds(108);
digitalWrite(Phase1neg, LOW);
delayMicroseconds(93);
digitalWrite(Phase2neg, LOW);
delayMicroseconds(54);
digitalWrite(Phase3pos, LOW);
delayMicroseconds(7);
delayMicroseconds(2);
digitalWrite(Phase3pos, HIGH);
delayMicroseconds(80);
digitalWrite(Phase2neg, HIGH);
delayMicroseconds(47);
digitalWrite(Phase1neg, HIGH);
delayMicroseconds(159);
digitalWrite(Phase1neg, LOW);
delayMicroseconds(47);
digitalWrite(Phase2neg, LOW);
delayMicroseconds(80);
digitalWrite(Phase3pos, LOW);
delayMicroseconds(2);
digitalWrite(Phase3pos, HIGH);
delayMicroseconds(104);
digitalWrite(Phase1neg, HIGH);
digitalWrite(Phase2neg, HIGH);
delayMicroseconds(208);
digitalWrite(Phase2neg, LOW);
digitalWrite(Phase1neg, LOW);
delayMicroseconds(104);
digitalWrite(Phase3pos, LOW);
delayMicroseconds(2);
digitalWrite(Phase3pos, HIGH);
delayMicroseconds(80);
digitalWrite(Phase1neg, HIGH);
delayMicroseconds(47);
digitalWrite(Phase2neg, HIGH);
delayMicroseconds(159);
digitalWrite(Phase2neg, LOW);
delayMicroseconds(47);
digitalWrite(Phase1neg, LOW);
delayMicroseconds(80);
digitalWrite(Phase3pos, LOW);
delayMicroseconds(2);
delayMicroseconds(7);
digitalWrite(Phase3pos, HIGH);
delayMicroseconds(54);
digitalWrite(Phase1neg, HIGH);
delayMicroseconds(93);
digitalWrite(Phase2neg, HIGH);
delayMicroseconds(108);
digitalWrite(Phase2neg, LOW);
delayMicroseconds(93);
digitalWrite(Phase1neg, LOW);
delayMicroseconds(54);
digitalWrite(Phase3pos, LOW);
delayMicroseconds(7);
delayMicroseconds(16);
digitalWrite(Phase3pos, HIGH);
delayMicroseconds(27);
digitalWrite(Phase1neg, HIGH);
delayMicroseconds(138);
digitalWrite(Phase2neg, HIGH);
delayMicroseconds(54);
digitalWrite(Phase2neg, LOW);
delayMicroseconds(138);
digitalWrite(Phase2neg, LOW);
delayMicroseconds(27);
digitalWrite(Phase3pos, LOW);
delayMicroseconds(16);
delayMicroseconds(28);
digitalWrite(Phase1neg, HIGH);
digitalWrite(Phase3pos, HIGH);
delayMicroseconds(180);
delayMicroseconds(180);
digitalWrite(Phase3pos, LOW);
digitalWrite(Phase1neg, LOW);
delayMicroseconds(28);
delayMicroseconds(16);
digitalWrite(Phase1neg, HIGH);
delayMicroseconds(27);
digitalWrite(Phase3pos, HIGH);
delayMicroseconds(138);
digitalWrite(Phase2pos, HIGH);
delayMicroseconds(54);
digitalWrite(Phase2pos, LOW);
delayMicroseconds(138);
digitalWrite(Phase3pos, LOW);
delayMicroseconds(27);
digitalWrite(Phase1neg, LOW);
delayMicroseconds(16);
delayMicroseconds(7);
digitalWrite(Phase1neg, HIGH);
delayMicroseconds(54);
digitalWrite(Phase3pos, HIGH);
delayMicroseconds(93);
digitalWrite(Phase2pos, HIGH);
delayMicroseconds(108);
digitalWrite(Phase2pos, LOW);
delayMicroseconds(93);
digitalWrite(Phase2pos, LOW);
delayMicroseconds(54);
digitalWrite(Phase1neg, LOW);
delayMicroseconds(7);
delayMicroseconds(2);
digitalWrite(Phase1neg, HIGH);
delayMicroseconds(80);
digitalWrite(Phase3pos, HIGH);
delayMicroseconds(47);
digitalWrite(Phase2pos, HIGH);
delayMicroseconds(159);
digitalWrite(Phase2pos, LOW);
delayMicroseconds(47);
digitalWrite(Phase3pos, LOW);
delayMicroseconds(80);
digitalWrite(Phase1neg, LOW);
delayMicroseconds(2);
digitalWrite(Phase1neg, HIGH);
delayMicroseconds(104);
digitalWrite(Phase2pos, HIGH);
digitalWrite(Phase3pos, HIGH);
delayMicroseconds(208);
digitalWrite(Phase3pos, LOW);
digitalWrite(Phase2pos, LOW);
delayMicroseconds(104);
digitalWrite(Phase1neg, LOW);
delayMicroseconds(2);
digitalWrite(Phase1neg, HIGH);
delayMicroseconds(80);
digitalWrite(Phase2pos, HIGH);
delayMicroseconds(47);
digitalWrite(Phase3pos, HIGH);
delayMicroseconds(159);
digitalWrite(Phase3pos, LOW);
delayMicroseconds(47);
digitalWrite(Phase2pos, LOW);
delayMicroseconds(80);
digitalWrite(Phase2neg, LOW);
delayMicroseconds(2);
delayMicroseconds(7);
digitalWrite(Phase1neg, HIGH);
delayMicroseconds(54);
digitalWrite(Phase2pos, HIGH);
delayMicroseconds(93);
digitalWrite(Phase3pos, HIGH);
delayMicroseconds(108);
digitalWrite(Phase3pos, LOW);
delayMicroseconds(93);
digitalWrite(Phase2pos, LOW);
delayMicroseconds(54);
digitalWrite(Phase1neg, LOW);
delayMicroseconds(7);
delayMicroseconds(16);
digitalWrite(Phase1neg, HIGH);
delayMicroseconds(27);
digitalWrite(Phase2pos, HIGH);
delayMicroseconds(138);
digitalWrite(Phase3pos, HIGH);
delayMicroseconds(54);
digitalWrite(Phase3pos, LOW);
delayMicroseconds(138);
digitalWrite(Phase2pos, LOW);
delayMicroseconds(27);
digitalWrite(Phase1neg, LOW);
delayMicroseconds(16);
delayMicroseconds(28);
digitalWrite(Phase1neg, HIGH);
digitalWrite(Phase2pos, HIGH);
delayMicroseconds(180);
delayMicroseconds(180);
digitalWrite(Phase2pos, LOW);
digitalWrite(Phase1neg, LOW);
delayMicroseconds(28);
delayMicroseconds(16);
digitalWrite(Phase2pos, HIGH);
delayMicroseconds(27);
digitalWrite(Phase1neg, HIGH);
delayMicroseconds(138);
digitalWrite(Phase3neg, HIGH);
delayMicroseconds(54);
digitalWrite(Phase3neg, LOW);
delayMicroseconds(138);
digitalWrite(Phase1neg, LOW);
delayMicroseconds(27);
digitalWrite(Phase2pos, LOW);
delayMicroseconds(16);
}