From dd12f374e1847d940936b569b92ba30e9651c484 Mon Sep 17 00:00:00 2001 From: Ismail cisse Date: Sat, 21 Sep 2024 19:11:49 +0200 Subject: [PATCH] added python version --- blink.ino | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/blink.ino b/blink.ino index 54d7e426..0c7cb415 100644 --- a/blink.ino +++ b/blink.ino @@ -22,3 +22,24 @@ void loop() { digitalWrite(led, LOW); // turn the LED off by making the voltage LOW delay(2000); // wait for a second } + +/* +this a python version of the code, incase if someone who likes python wanted to use it. +import time + +# Simulating pin 13 (LED) +led = False + +# Infinite loop to simulate blinking +while True: + # Turn LED on + led = True + print("LED is ON") + time.sleep(1) # Wait for 1 second + + # Turn LED off + led = False + print("LED is OFF") + time.sleep(2) # Wait for 2 seconds + +*/ \ No newline at end of file