Arduino Tutorial 5

Arduino ProgrammingMy most active subscriber asked me to show how to make a calculator with circuits and so I begin that journey with this video. To make a calculator you need to understand Transistors as well as Transistor Gates. I make 4 circuits, one to demonstrate how transistors work as well as NOT, OR 7 AND Gates. The designs can be found below along with the code I used in this video.

If you like videos like this, consider donating $1, or simply turn off Ad Blocking software, which has made it very hard to earn enough to buy books and components.

Circuits Used

NOT Gate

OR Gate

AND Gate

Code from the Video

const int voltBeforeTranIN = A1;
const int voltAfterTranIN = A0;

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

}

void loop(){
  int beforeTranVal = analogRead(voltBeforeTranIN);
  float beforeVoltage = beforeTranVal * (5.0 / 1023.0);
  Serial.print("Before Transistor : ");
  Serial.println(beforeVoltage);

  int afterTranVal = analogRead(voltAfterTranIN);
  float afterVoltage = afterTranVal * (5.0 / 1023.0);
  Serial.print("After Transistor : ");
  Serial.println(afterVoltage);
  Serial.println();
  
  delay(500);
}

Leave a Reply

Your email address will not be published. Required fields are marked *