Loading
Loading
IoT Lab content is currently available in Arabic only. We're working on an English version.
عرض بالعربية →The iconic 'Hello World' of the hardware world. Make the built-in LED blink.
In this lesson we need no external components. We'll use the built-in LED on Arduino which is internally connected to pin 13.
void setup() {
pinMode(13, OUTPUT); // تهيئة المنفذ 13 كمخرج
}
void loop() {
digitalWrite(13, HIGH); // تشغيل الليد (5 فولت)
delay(1000); // انتظار ثانية
digitalWrite(13, LOW); // إطفاء الليد (0 فولت)
delay(1000); // انتظار ثانية
}Forgetting the semicolon (;) at the end of every programming line, causing a Compilation error.