What is the use of the code given below? [code] #include<Esplora.h> void setup() { Serial.begin(9600); } void loop() { int v=Esplora.re

Lê Như Ý

New member
What is the use of the code given below?
Code:
#include<Esplora.h>
void setup() {
    Serial.begin(9600);
}
void loop() {
    int v=Esplora.readSlider();
    Serial.println(v);
}
A. Read Potentiometer Value
B. Read Resistor Value
C. Read Transistor Voltage Value
D. Read Power Supply Voltage
 
Answer: A
Explanation: This library reads the value of the linear potentiometer on the Arduino Esplora as a 10-bit number. This is generated in the form of a voltage level from 0 to 5V and is then mapped to a number set ranging from 0 to 1023.
 

Tìm kiếm

Back
Top