In this week’s video, we continue on where we left off last week with another in our series of videos where we discuss how to program for the ATmega328p processor. This week, [Jack] takes a look at the analog to digital converter and takes us through how to set things up and then how to perform a conversion using the potentiometer on the 3pi as the analog source. Playing with potentiometers isn’t the most interesting thing in the world, but after watching this video, you will be able to do things like take light readings using a cadmium sulfide cell, read the weight applied to a sensor, calculate the temperature from a resistor and a thermistor, or interface with an analog gyroscope.
If you have missed our previous videos, here are some links:
Part 1: Setting up the development environment
Part 2: Basic I/O
Part 3: Pulse Width Modulation
Stay tuned for next week’s* video where we will take a look at how to interface with the 3pi’s line sensors.
Video is after the break…
* HAD is in the process of moving our secret headquarters so next week’s video may come some time later than next week.
secret headquarters?
Is the new place a former ICBM base?
Disappointing. From the title I thought you were going to use the 328 to digitise video. : (
Yea. I’ve done that on another processor but this one really isn’t up to the task.
You can do a lot with the 328P’s ADC:
http://www.instructables.com/id/Lo-fi-Arduino-Guitar-Pedal/
Can get decent audio processing using straight C on the Arduino platform
Check out my stuff in the comments I’ve written for it – a chorus/flanger. I got intelligible results using AnalogRead but manually using the registers to process while the ADC works vastly improves the quality.
Where do you have the entire code