hArduino-0.7: Control your Arduino board from Haskell.

Stabilityexperimental
Maintainererkokl@gmail.com
Safe HaskellNone

System.Hardware.Arduino.SamplePrograms.Analog

Description

Reads the value of an analog input, controlled by a 10K potentiometer.

Synopsis

Documentation

analogVal :: IO ()Source

Read the value of an analog input line. We will print the value on the screen, and also blink a led on the Arduino based on the value. The smaller the value, the faster the blink.

The circuit simply has a 10K potentiometer between 5V and GND, with the wiper line connected to analog input 3. We also have a led between pin 13 and GND.