Curriculum
Course: Whack-A-Mole Game
Login
Text lesson

Working priciple

Working Principle

Normally, an unused analog pin is called a floating pin.

A floating pin can pick up tiny electrical signals from:

  • Human body
  • Nearby wires
  • Electronic devices
  • Static electricity in the environment

When a person touches the A0 pin, the analog value changes.

The Arduino reads this value using:

 
analogRead(A0);

If the value becomes greater than 500:

  • LED turns ON

If the value is less than 500:

  • LED turns OFF

 

Output

  • Touch A0 pin → LED glows.
  • Remove finger → LED may turn OFF.
  • Serial Monitor shows changing values.
  • RX/TX LEDs blink because data is sent continuously to the computer.
×
×

Cart