Hi everyone
I am building obstacle avoidance RC car with remote control.
I want to connect Ultrasonic sensor (HR-SR04), IR speed sensor (LM393 - 4 pin), Motor drive (L298N) and Wireless module (NRF24L01) to my Arduino UNO board. On which pins should I connect, Digital or Analogue? I believe the total I have to connect are 13 pins excluding the GND and V pins.
That is something you can eaisly get with your search engine. Search for
" arduino uno pinout diagram " and you will get lots of choices.
Do you know the difference between analog and digital signals? Do you know the difference between inputs and outputs? Also I suggest you use a different motor driver, you will lose about 3 volts with the L298N which is burnt as heat.
analog pin returns any number from 0-1023 but the digital only returns high or low?
which motor drive do u suggest?
Requires the use of the SPI bus (11/12/13) and one additional pin.
Decide if you need the analogue output or the digital one. Analogue outputput must go to an analogue input pin.
You basically want to use PWM capable pins for that.
there is no IR Speed sensor (LM393)?
The pins are labelled on the board, A for Analogue, and D for digital.
Yes, but don't forget that you can use the analogue pins as digital pins if you need to
This is not always true.
A0 to A5 can be seen as analog pins when internal ADC is enabled; else, they are digital pins. Likewise, A4 and A5 form I2C Bus (SDA and SCL) when internal I2C Interface is enabled; otherwise, they are digital pins.
I was referring to a genuine UNO, not a clone, and just that there are silkscreen labels to assist. True re A4 and A5, but those pins are also mirrored in the opposite corner and are labelled SDA SCL.
Looking back at the OP, I misunderstood what he said. I thought he was asking for the locations of the A and D pins, but now I see he was asking a much more basic question. When the OP does not know when to use a Digital pin or Analog pin, his mountain just got a lot higher.