دفع البيانات المباشرة إلى لوحة معلومات
اعرض قيم المستشعرات على الإنترنت في الوقت الفعلي.
دفع البيانات المباشرة إلى لوحة معلومات درس مجاني في Arduino & IoT Academy على CoddyKit. هذا هو الدرس 3 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في Arduino & IoT Academy، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة Arduino & IoT Academy 4 دروس في المجموع.
بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.
The Goal: Live Charts
Now you will send real readings up to the cloud and watch them appear as a live chart updating in your browser. 📈
Connect WiFi First
Before any upload, your board must join the network. Call WiFi.begin with your name and password, then wait until it connects.
WiFi.begin(ssid, password);Pick a Field for Each Value
A ThingSpeak channel has numbered fields. Temperature might be field 1, humidity field 2, so each sensor gets its own line.
Build the Update URL
To send data the simple way, you build a URL with your key and field value. The server reads it and stores the number.
String url = "/update?api_key=" + key + "&field1=" + value;Make the HTTP Request
An HTTP GET to that URL pushes your reading. Libraries like HTTPClient turn this into just a couple of clean calls.
http.begin(client, fullUrl);
http.GET();Read the Response Code
A status code of 200 means success. Anything else, like 401, tells you the key was wrong or the request failed.
Respect the Rate Limit
Free ThingSpeak accepts one update every 15 seconds. Send faster and extra points are simply dropped, so pace your loop.
Use the Official Library
The ThingSpeak library is even easier. You set each field, then call one function to write them all at once.
ThingSpeak.setField(1, temperature);
ThingSpeak.writeFields(channelID, apiKey);Add a Chart Widget
On the website, each field can show as a chart. As new data arrives, the graph redraws so you watch trends form live.
Confirm It Worked
Open your channel page and refresh. If your latest reading appears with a fresh timestamp, the round trip is working. 🎉
Don't Block the Whole Loop
Use millis timing instead of a long delay between uploads. That keeps the board responsive while it waits to send again.
Quick Check
How often can a free ThingSpeak account accept a new update?
Recap
Connect WiFi, set each field, then write to your channel and watch live charts. Check the 200 response and respect the rate limit.
الأسئلة الشائعة
هل درس «دفع البيانات المباشرة إلى لوحة معلومات» مجاني؟
نعم — نص درس «دفع البيانات المباشرة إلى لوحة معلومات» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة Arduino & IoT Academy، انتقل إلى CoddyKit PRO. تتضمن دورة Arduino & IoT Academy 4 دروس في المجموع.
ماذا ستتعلم في «دفع البيانات المباشرة إلى لوحة معلومات»؟
اعرض قيم المستشعرات على الإنترنت في الوقت الفعلي. تتمرن على Arduino & IoT Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.
هل أحتاج إلى خبرة سابقة لأبدأ Arduino & IoT Academy؟
لا تُشترط خبرة سابقة. Arduino & IoT Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 3 من أصل 4.
كم من الوقت يستغرق درس «دفع البيانات المباشرة إلى لوحة معلومات»؟
معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.
هل يمكنني كتابة وتشغيل أكواد في درس Arduino & IoT Academy هذا؟
نعم. كل درس في Arduino & IoT Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.
جميع الدروس في هذه الدورة
- اختيار منصة سحابية
- مصادقة جهازك
- دفع البيانات المباشرة إلى لوحة معلومات
- التحكم في العتاد من السحابة