Top.Mail.Ru
Ответы

Это для меня не заходите

// Blink with analog read example for Arduino UNO

const int ledPin = 13; // Built-in LED
const int analogPin = A0; // Analog input pin

void setup() {
pinMode(ledPin, OUTPUT); // Set LED pin as output
Serial.begin(9600); // Initialize serial communication
}

void loop() {
// Read analog value
int sensorValue = analogRead(analogPin);

// Print value to serial monitor
Serial.print("Analog value: ");
Serial.println(sensorValue);

// Blink LED
digitalWrite(ledPin, HIGH); // Turn LED on
delay(sensorValue); // Wait based on analog value
digitalWrite(ledPin, LOW); // Turn LED off
delay(sensorValue); // Wait based on analog value
}

По дате
По рейтингу
Аватар пользователя
Просветленный
1мес

Ох уж ваша любовь к ардуину