1.

Can the digitalWrite() function be used from any analog pin?(a) No, it cannot(b) Yes, it can, but only on certain Arduino Boards(c) Yes, it can(d) Yes, it can, but only through certain pinsThis question was addressed to me by my school teacher while I was bunking the class.I need to ask this question from Digital Input Output in portion Arduino Programming of Arduino

Answer»

The correct option is (b) Yes, it can, but only on certain ARDUINO BOARDS

The explanation: The pins in the Arduino Boards are all DIGITAL by default. The analog functionality is an addon to the board with the help of an ADC (Analog to Digital Convertor) Circuit, or a DAC (Digital to Analog Convertor) Circuit. Thus, all analog pins SUPPORT digital IO but not all digital pins support analog IO. However, this is an exception in the Arduino Nano, Mini and Pro Mini.



Discussion

No Comment Found

Related InterviewSolutions