تحديد موضع Cursor والطباعة
ضع النص بدقة في الصفوف والأعمدة.
تحديد موضع Cursor والطباعة درس مجاني في Arduino & IoT Academy على CoddyKit. هذا هو الدرس 3 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في Arduino & IoT Academy، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة Arduino & IoT Academy 4 دروس في المجموع.
بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.
Text Has a Position
Every character lands at a specific spot on the screen. Controlling the cursor lets you place text exactly where you want it. 🎯
Columns Count from Zero
The 16 columns are numbered 0 to 15, left to right. Column 0 is the first character on a line.
Rows Count from Zero Too
The two rows are 0 and 1. Row 0 is the top line and row 1 is the bottom line.
Move the Cursor
Use setCursor to jump to a column and row before printing. The arguments are column first, then row.
lcd.setCursor(0, 1);Print at That Spot
After setCursor, the next lcd.print() starts exactly where you placed the cursor instead of the top-left.
lcd.setCursor(0, 1);
lcd.print("Line two");Two Lines at Once
Print a label on row 0, move the cursor to row 1, then print a value. That gives you a tidy two-line layout.
Center Some Text
To center a word, set the cursor to a higher column so the text starts further from the left edge.
lcd.setCursor(5, 0);Printing Numbers
lcd.print also accepts numbers, not just text. Pass a variable and the value shows up directly on screen.
lcd.print(temperature);Watch Leftover Characters
Old text does not vanish on its own. If a new value is shorter, stray old digits can linger behind it.
Pad to Overwrite
Print extra spaces after a short value, or clear that area, so the previous longer text is fully covered.
lcd.print(value);
lcd.print(" ");Home Position
Calling lcd.home() sends the cursor back to column 0, row 0 without clearing the existing text.
lcd.home();Quick Check
You want text to appear on the bottom-left of a 16x2 LCD. Which call positions the cursor there?
Recap
You can now place text anywhere with setCursor, remembering column then row from zero, and pad with spaces to clear old characters. ✅
الأسئلة الشائعة
هل درس «تحديد موضع Cursor والطباعة» مجاني؟
نعم — نص درس «تحديد موضع Cursor والطباعة» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة Arduino & IoT Academy، انتقل إلى CoddyKit PRO. تتضمن دورة Arduino & IoT Academy 4 دروس في المجموع.
ماذا ستتعلم في «تحديد موضع Cursor والطباعة»؟
ضع النص بدقة في الصفوف والأعمدة. تتمرن على Arduino & IoT Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.
هل أحتاج إلى خبرة سابقة لأبدأ Arduino & IoT Academy؟
لا تُشترط خبرة سابقة. Arduino & IoT Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 3 من أصل 4.
كم من الوقت يستغرق درس «تحديد موضع Cursor والطباعة»؟
معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.
هل يمكنني كتابة وتشغيل أكواد في درس Arduino & IoT Academy هذا؟
نعم. كل درس في Arduino & IoT Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.
جميع الدروس في هذه الدورة
- توصيل شاشة LCD مقاس 16x2 (I2C Backpack)
- مكتبة LiquidCrystal_I2C
- تحديد موضع Cursor والطباعة
- لوحة بيانات مباشرة للمستشعرات