Arduino, Cpp.
toggle the light void setup() { pinMode(ledPin, OUTPUT); // Declare the ledPin as OUTPUT Serial.begin(9600); // Use the serial port } void loop() { // Read the sensor and store it in the variable sensorReading: sensorReading = analogRead(knockSensor); Serial.println(sensorReading); // If the sensor