Hi...
I am a novice student, who's just gotten use to using digital I/O for Atmega MCU series.
I am using Atmega48, and I can use basic digital sensors (Ultrasonic,touch).
I have a pretty strong background in programming, but I am new to hardware stuff.
So here is my question...
I know that Atmega48 has A/D input pins. If I want to use analog sensors (IRsharp), do I have to get an external A/D converter?
From the 50$ robot code, it seems like you connect the sensor directly to the MCU...
Does this mean the MCU is able to read analog data?
Also, how can a MCU "read" analog data with just one pin?
From the source code,
"IR_value = analogRead(0);//use pin 0 for analog"
If I type this, does it read analog value from the sensor?
From my understandings, analogRead () is not a command known in C language...o.O
Can someone explain to me the logic behind A/D in MCU?