Arduino Micro and Sin wave?

Hi there. Just doing some really simple testing with a couple of different hall effect sensors, having difficulty finding small enough sensors for the job in hand, anyway...

I've not been playing about with these boards for long and I've noticed if I take an x=analogRead(A2) without anything attached and Serial.println(x), the serial plotter in IDE displays a sin wave from around 100 to 800.

I would have expected some arbitrary value coming back from the pin, but not a wave.

Could someone please explain what's happening here?
Thanks.

Sure! By not being connected to ANYTHING, it's picking up the magnetic field from your mains house wiring.
Paul

What are "these boards"?

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.