Probe an input device(s)’s analog and digital signals.
Document the work (in a group or individually).
I used two methods: Multimeter, oscilloscope to read the voltage. and to get the signal graph.
I use buttom for digital and potentionmeter for analog signl.
Before staring testing and getting the values let know more about "Multimeter" and "oscilloscope".
- Multimeter
A multimeter is a device used to measure multiple parameters of an electric circuit like voltage, current, and resistance. The device is made up of a digital or analog meter, batteries, resistors, and other circuitry, which ensure the measurement of several electrical quantities with very high accuracy and speed.
- Oscilloscope
An oscilloscope, formerly known as an oscillograph (informally scope, oscope, or o-scope), is an instrument that graphically displays electrical signals and shows how those signals change over time.
and let know about the screen and how to read it
Please, Click here to learn more
Falling Edge
Rising Edge
Digital: Buttom - Code:
// constants won't change. They're used here to set pin numbers:
const int buttonPin = 2; // the number of the pushbutton pin
const int ledPin = D10; // the number of the LED pin
// variables will change:
int buttonState = 0; // variable for reading the pushbutton status
void setup() {
// initialize the LED pin as an output:
pinMode(ledPin, OUTPUT);
// initialize the pushbutton pin as an input:
pinMode(buttonPin, INPUT);
}
void loop() {
// read the state of the pushbutton value:
buttonState = digitalRead(buttonPin);
// check if the pushbutton is pressed. If it is, the buttonState is HIGH:
if (buttonState == HIGH) {
// turn LED on:
digitalWrite(ledPin, HIGH);
} else {
// turn LED off:
digitalWrite(ledPin, LOW);
}
}
Multimeter Lowest reading
Multimeter Mid reading
Multimeter Highest reading
Multimeter reading
Oscilloscope signals
Multimeter & Oscilloscope
Analog: Potentionmeter - Code:
int sensorPin = A0; // select the input pin for the potentiometer
int ledPin = 13; // select the pin for the LED
int sensorValue = 0; // variable to store the value coming from the sensor
void setup() {
// declare the ledPin as an OUTPUT:
pinMode(ledPin, OUTPUT);
}
void loop() {
// read the value from the sensor:
sensorValue = analogRead(sensorPin);
// turn the ledPin on
digitalWrite(ledPin, HIGH);
// stop the program for milliseconds:
delay(sensorValue);
// turn the ledPin off:
digitalWrite(ledPin, LOW);
// stop the program for for milliseconds:
delay(sensorValue);
}