#include // Define the pin to which the KY-038 sensor is connected const int sensorPin = A0; void setup() { // Start serial communication at 9600 baud Serial.begin(9600); } void loop() { // Read sound sensor value int sensorValue = analogRead(sensorPin); // Send the sensor value to the serial port Serial.println(sensorValue); // Wait a short period before taking another reading delay(100); }