the setup routine runs once when you press reset void setup

// the setup routine runs once when you press reset: void setup() { // initialize serial communication at 9600 bits per second: Serial.begin(9600); pinMode(2,OUTPUT); pinMode(1,OUTPUT); } // the loop routine runs over and over again forever: void loop() { digitalWrite(2,HIGH); digitalWrite(1,HIGH); // read the input on analog pin 0: int sensorValue = analogRead(A1); // Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V) : float voltage = sensorValue * (5.0 / 1023.0); } For the following code what output pins are used? 1, 2 and A1 1 and 2 A1 1, 2 and 9600

Solution

Pins 1 and 2 are used as output pins. Once reset is pressed and the program enters into loop function the output pins 1 and 2 Will become high

 // the setup routine runs once when you press reset: void setup() { // initialize serial communication at 9600 bits per second: Serial.begin(9600); pinMode(2,O

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site