Skip to content

Instantly share code, notes, and snippets.

@topshed
Last active April 20, 2018 13:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save topshed/83d06a3d2303f9224728538c97964fe8 to your computer and use it in GitHub Desktop.
Save topshed/83d06a3d2303f9224728538c97964fe8 to your computer and use it in GitHub Desktop.

Analog inputs

Analog electronics have a continuously variable signal, in contrast to digital electronics where signals usually take only two levels (HIGH/LOW or 1/0).

This circuit demonstrates how to read an analog input - the voltage across a variable resistor - and uses this to control the tone of a buzzer.

Imgur   Imgur

Can you swap the buzzer for an LED (and resistor) and use similar code to control the frequency of blinking?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment