User manual

Ausgabe 19.05.2017 Copyright by Joy-IT 31
5.10 Project 10: Reading analog values
This project is about the analog interfaces of the Mega2560.
An analogRead() command can the value of the interface.
Because of the Analog-Digital-Converter of the Mega2560, the read-out values are between 0 and 1023.
To be able to read the values, it is important to take care of the right baudrate.
The baudrate of the computer has to meet the requirements of the device.
If you open the serial monitor in your Arduino program, you can congure the baudrate in the boom
right corner.
Here we are going to convert the adjustes value of a potenometer to an analog value and display it on
the screen.
Hardware Amount
Mega2560 board 1
USB cable 1
Potenometer 1
Breadboard 1
Breadboard cable 3