title | nointro | keywords | image | slug | last_update | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Analog |
|
/Wio-Terminal-IO-Analog |
|
This repo demonstrates how to use Analog as inputs on Wio Terminal. To use analog pins on Wio Terminal, you must use RPI pins.
The Raspberry Pi pinouts are defined as:
RPI_A0
->RPI_A8
To use the Grove configurable A/D Port as Analog port, simply define it as follow:
void setup() {
pinMode(A0, INPUT);
}
Now, connect your Grove sensor to the physical pin!
In this example, a Grove Loudness sensor is used to demonstrate:
void setup() {
Serial.begin(115200);
pinMode(A0, INPUT);
}
void loop() {
int loudness = analogRead(A0);
Serial.print("Loudness: ");
Serial.println(loudness);
delay(50);
}
Thank you for choosing our products! We are here to provide you with different support to ensure that your experience with our products is as smooth as possible. We offer several communication channels to cater to different preferences and needs.