kod dla arduino pod esp32, migający led
- User
kod dla arduino pod esp32, migający led
Assistant
Oto prosty kod dla ESP32 w środowisku Arduino IDE, który zapala i wygasza wbudowane LED:
// Pin, na którym znajduje się LED (dla większości ESP32 to GPIO 2) const int ledPin = 2; void setup() { // Ustawienie pinu jako wyjście pinMode(ledPin, OUTPUT); } void loop() { // Zapalenie LED digitalWrite(ledPin, HIGH); delay(1000); // Czekaj 1 sekundę // Wygaszenie LED digitalWrite(ledPin, LOW); delay(1000); // Czekaj 1 sekundę }
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.