English
Español
yt_link
insta_link
fb_link
twitter_link
ADVERTISERS
PCBWay Ad




AFFILATE









Gearbest JGAURORA A3S Fully Metal LCD Display Control DIY 3D Printer
JGAURORA A3S Fully Metal LCD Display Control DIY 3D Printer only $299.99
Gearbest Geeetech E180 Mini 3D Printer with WiFi Module
Geeetech E180 Mini 3D Printer with WiFi Module only $245.99


Gearbest JGAURORA A5X 3D Printer Kit Printing
JGAURORA A5X 3D Printer Kit Printing only $379.99


Gearbest Min DS202 Oscilloscope 113€
Min DS202 Oscilloscope 113€


Gearbest UTD2052CL DIGITAL 2-ch Oscilloscope 275€
UTD2052CL DIGITAL 2-ch Oscilloscope 275€


Gearbest UT139C True RMS Digital Multimeter 29€
UT139C True RMS Digital Multimeter 29€


Gearbest SBK8586 Soldering station Hot Air + Iron 63€
SBK8586 Soldering station Hot Air + Iron 63€


Gearbest BAYANGTOYS X21 Brushless RC Quadcopter
BAYANGTOYS X21 Brushless RC Quadcopter 153€


Arduino AC inverter code


Download the .zip file below. Install it on your Arduino IDE.







/*
 * *This code will generate two inverted square signals on D3 and D5 of 62.5Hz.
 * http://www.electronoobs.com/eng_circuitos_tut14.php
 * http://www.youtube.com/c/ELECTRONOOBS
 */


//define the output pins
int mos_top = 3;
int mos_bot = 5;

void setup() {
  //define the pins as outputs
  pinMode(mos_top,OUTPUT);
  pinMode(mos_bot,OUTPUT);
  
  //Initial value is LOW
  digitalWrite(mos_top,LOW);
  digitalWrite(mos_bot,LOW);
}



void loop() {
  
  //One is LOW and other is HIGH
  digitalWrite(mos_top,LOW);  
  digitalWrite(mos_bot,HIGH);
  delay(8);    //  1/16ms = 62.5Hz

  //One is HIGH and other is LOW
  digitalWrite(mos_top,HIGH);
  digitalWrite(mos_bot,LOW);
  delay(8);

}