Square Wave Generator
With this project you will build a square wave generator and test it on Arduino UNO(or other boards)
For this project you will need:
-An Arduino board(I used UNO R3)
-Schmitt Trigger 74HC14(also called hex inverter)
-3 Wires
-100k Ohm resistor
-100nF capacitor
-Breadboard
Mounting:
-Connect the 5V pin of the Arduino to Vcc on the 74HC14.
-Connect GND of Arduino to negative row of breadboard and to GND of 74HC14.
-Connect capacitor between GND of breadboard and pin 1 on 74HC14.
-Connect resistor between pin 1 and 2 of 74HC14.
-Finally connect a wire to pin 2 of 74HC14 and Analog pin A0 on Arduino.
Now you need to upload the following code to Arduino and run the Serial Monitor:
void setup() {
Serial.begin(250000);
}
void loop() {
int sensorValue = analogRead(A0);
// print out the value you read:
Serial.println(sensorValue);
}
Don't forget to change the baud rate in the serial monitor to 250000 baud!!!