Programming

Making accurate ADC readings on the Arduino

There are many sensors out there which output a voltage as a function of the supply voltage as their sensed value. Temperature sensors, light sensors, all sorts.

Measuring that voltage, and converting it in to real figures for whatever is being sensed is not actually as simple as you might at first think.

There are many examples on the internet for converting an ADC value into a voltage, but basically it boils down to:

Common Arduino Errors and Warnings

This is my attempt to collate and explain the most common errors and warnings you get when compiling code for the Arduino and Arduino-like boards.

Errors

Expected primary expression before '.' token

This is usually because you used a class name instead of an instance of a class. One example would be if you created an instance of the LiquidCrystal class:

LiquidCrystal lcd(4, 5, 6, 7, 8, 9, 10);

And then used something like:

LiquidCrystal.print("foo");

instead of:

Pages