{"id":659,"date":"2026-06-11T13:43:33","date_gmt":"2026-06-11T05:43:33","guid":{"rendered":"https:\/\/projectleon.net\/make\/blog\/ardupilot-cloud-telemetry-thingspeak-data-logging-farsi\/"},"modified":"2026-06-11T13:43:33","modified_gmt":"2026-06-11T05:43:33","slug":"ardupilot-cloud-telemetry-thingspeak-data-logging-farsi","status":"publish","type":"post","link":"https:\/\/projectleon.net\/make\/blog\/ardupilot-cloud-telemetry-thingspeak-data-logging-farsi\/","title":{"rendered":"\u0633\u0627\u062e\u062a \u067e\u0647\u067e\u0627\u062f \u062a\u0644\u0647\u200c\u0645\u062a\u0631\u06cc \u0628\u0627 ArduPilot \u0648 \u0644\u0627\u06af \u0627\u0628\u0631\u06cc: \u0627\u0631\u0633\u0627\u0644 \u062f\u0627\u062f\u0647 \u0628\u0647 ThingSpeak (\u0641\u0627\u0631\u0633\u06cc)"},"content":{"rendered":"<div class='hero-image-container' style='margin-bottom:28px;border-radius:14px;overflow:hidden;box-shadow:0 4px 18px rgba(0,0,0,0.08)'>\n<img src='https:\/\/projectleon.net\/make\/wp-content\/uploads\/2026\/06\/post118-ardupilot-cloud.jpg' alt='ArduPilot ThingSpeak ESP32 \u062a\u0644\u0647\u200c\u0645\u062a\u0631\u06cc \u0627\u0628\u0631\u06cc' style='width:100%;height:auto;display:block' loading='eager'\/>\n<\/div>\n<div class='beginner-intro' style='background:#f0f7ff;border-right:4px solid #2e5fb6;padding:16px 20px;border-radius:10px;margin-bottom:22px'>\n<h2 style='margin-top:0'>\u062a\u0644\u0647\u200c\u0645\u062a\u0631\u06cc \u0627\u0628\u0631\u06cc ArduPilot \u0686\u06cc\u0633\u062a\u061f (\u0645\u0628\u062a\u062f\u06cc)<\/h2>\n<p>\u0645\u0639\u0645\u0648\u0644\u0627\u064b \u062a\u0644\u0647\u200c\u0645\u062a\u0631\u06cc ArduPilot \u0628\u0647 Mission Planner \u0631\u0648\u06cc \u0644\u067e\u200c\u062a\u0627\u067e \u0645\u06cc\u200c\u0631\u0633\u062f \u2014 \u0627\u0645\u0627 \u0627\u06af\u0631 \u0628\u062e\u0648\u0627\u0647\u06cc\u0645 \u062f\u0627\u062f\u0647 \u067e\u0631\u0648\u0627\u0632 \u0631\u0627 \u062f\u0631 \u0627\u0628\u0631 \u0630\u062e\u06cc\u0631\u0647 \u06a9\u0646\u06cc\u0645 \u0648 \u0627\u0632 \u0647\u0631 \u062c\u0627\u06cc \u062f\u0646\u06cc\u0627 \u0628\u0628\u06cc\u0646\u06cc\u0645 \u0686\u0647\u061f \u0628\u0627 \u06cc\u06a9 <strong>ESP32<\/strong> \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u067e\u0644 MAVLink-WiFi\u060c \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u062f\u0627\u062f\u0647 \u062a\u0644\u0647\u200c\u0645\u062a\u0631\u06cc \u067e\u0631\u0648\u0627\u0632 \u0631\u0627 \u0628\u0647 <strong>ThingSpeak<\/strong> (\u0633\u0631\u0648\u06cc\u0633 IoT \u0631\u0627\u06cc\u06af\u0627\u0646 \u0627\u0632 MathWorks) \u0627\u0631\u0633\u0627\u0644 \u06a9\u0631\u062f.<\/p>\n<p>ThingSpeak \u0647\u0631 \u0641\u06cc\u0644\u062f \u0631\u0627 (\u0627\u0631\u062a\u0641\u0627\u0639\u060c \u0648\u0644\u062a\u0627\u0698 \u0628\u0627\u062a\u0631\u06cc\u060c \u0633\u0631\u0639\u062a\u060c \u0645\u0648\u0642\u0639\u06cc\u062a GPS) \u062f\u0631 \u06cc\u06a9 Channel \u0630\u062e\u06cc\u0631\u0647 \u0645\u06cc\u200c\u06a9\u0646\u062f. \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0646\u0645\u0648\u062f\u0627\u0631\u0647\u0627\u06cc \u0632\u0646\u062f\u0647\u060c \u0647\u0634\u062f\u0627\u0631 \u0627\u06cc\u0645\u06cc\u0644\u060c \u0648 \u062d\u062a\u06cc MATLAB Analytics \u0631\u0648\u06cc \u062f\u0627\u062f\u0647 \u0627\u062c\u0631\u0627 \u06a9\u0631\u062f \u2014 \u0647\u0645\u0647 \u0631\u0627\u06cc\u06af\u0627\u0646 \u062a\u0627 \u06f8 \u0641\u06cc\u0644\u062f \u0648 \u06f8\u06f0\u06f0\u06f0 \u067e\u06cc\u0627\u0645 \u062f\u0631 \u0631\u0648\u0632.<\/p>\n<\/div>\n<div style='border:1px solid #d8d8d8;padding:18px 20px;border-radius:12px;background:#fafafa;margin-bottom:22px'>\n<h2 style='margin-top:0'>\u0645\u062d\u0635\u0648\u0644\u06cc \u06a9\u0647 \u0645\u06cc\u200c\u0633\u0627\u0632\u06cc\u062f<\/h2>\n<p>\u067e\u0644 \u062a\u0644\u0647\u200c\u0645\u062a\u0631\u06cc ArduPilot \u0628\u0647 \u0627\u0628\u0631 ThingSpeak \u0628\u0627 ESP32.<\/p>\n<ul>\n<li><strong>\u0647\u0632\u06cc\u0646\u0647 \u0627\u0636\u0627\u0641\u0647:<\/strong> \u0641\u0642\u0637 ESP32 \u2248 \u06f5 \u062f\u0644\u0627\u0631<\/li>\n<li><strong>\u0633\u0631\u0648\u06cc\u0633:<\/strong> ThingSpeak \u0631\u0627\u06cc\u06af\u0627\u0646<\/li>\n<li><strong>\u062f\u0627\u062f\u0647\u200c\u0647\u0627:<\/strong> \u0627\u0631\u062a\u0641\u0627\u0639\u060c \u0648\u0644\u062a\u0627\u0698\u060c \u0633\u0631\u0639\u062a\u060c GPS<\/li>\n<\/ul>\n<\/div>\n<p><svg viewBox='0 0 860 200' width='100%' xmlns='http:\/\/www.w3.org\/2000\/svg' style='background:#fff;border:1px solid #e0e0e0;border-radius:12px;margin-bottom:22px'>\n<rect x='20' y='55' width='180' height='110' rx='14' fill='#b7e4a0' stroke='#3a7a1e' stroke-width='2'\/>\n<text x='110' y='90' text-anchor='middle' font-size='12' font-family='Tahoma'>UAV \u067e\u0647\u067e\u0627\u062f<\/text>\n<text x='110' y='108' text-anchor='middle' font-size='11' font-family='Tahoma'>Pixhawk<\/text>\n<text x='110' y='124' text-anchor='middle' font-size='11' font-family='Tahoma'>UART Telem2<\/text>\n<line x1='200' y1='110' x2='290' y2='110' stroke='#555' stroke-width='2'\/>\n<rect x='290' y='65' width='160' height='90' rx='14' fill='#e8f4ff' stroke='#3a60c0' stroke-width='2'\/>\n<text x='370' y='100' text-anchor='middle' font-size='12' font-family='Tahoma'>ESP32<\/text>\n<text x='370' y='118' text-anchor='middle' font-size='11' font-family='Tahoma'>MAVLink Parser<\/text>\n<text x='370' y='135' text-anchor='middle' font-size='11' font-family='Tahoma'>WiFi HTTPS<\/text>\n<line x1='450' y1='110' x2='540' y2='110' stroke='#555' stroke-width='2' stroke-dasharray='6,3'\/>\n<text x='495' y='103' text-anchor='middle' font-size='10' font-family='Tahoma' fill='#3a60c0'>\u0627\u06cc\u0646\u062a\u0631\u0646\u062a<\/text>\n<rect x='540' y='55' width='200' height='110' rx='14' fill='#f7d794' stroke='#a06d00' stroke-width='2'\/>\n<text x='640' y='90' text-anchor='middle' font-size='12' font-family='Tahoma'>ThingSpeak<\/text>\n<text x='640' y='108' text-anchor='middle' font-size='11' font-family='Tahoma'>Channel Fields<\/text>\n<text x='640' y='124' text-anchor='middle' font-size='11' font-family='Tahoma'>\u0646\u0645\u0648\u062f\u0627\u0631 + \u0647\u0634\u062f\u0627\u0631<\/text>\n<text x='430' y='185' text-anchor='middle' font-size='13' font-family='Tahoma' fill='#888'>ArduPilot \u2192 ESP32 \u2192 ThingSpeak \u2014 \u062a\u0644\u0647\u200c\u0645\u062a\u0631\u06cc \u0627\u0628\u0631\u06cc<\/text>\n<\/svg><\/p>\n<h2>\u06a9\u062f ESP32 \u2014 \u067e\u0644 MAVLink \u0628\u0647 ThingSpeak<\/h2>\n<pre style='background:#1e1e1e;color:#d4d4d4;padding:14px;border-radius:10px;overflow-x:auto;font-size:13px'><code class='language-cpp'>\n#include &lt;WiFi.h&gt;\n#include &lt;HTTPClient.h&gt;\n#include &lt;HardwareSerial.h&gt;\n\nconst char* ssid = \"YourHotspot\";\nconst char* pass  = \"YourPass\";\nconst char* TS_KEY = \"YOUR_THINGSPEAK_WRITE_KEY\";\nconst char* TS_URL = \"https:\/\/api.thingspeak.com\/update\";\n\nHardwareSerial mavSerial(1);  \/\/ UART1 \u2190 Pixhawk\n\n\/\/ \u0633\u0627\u062f\u0647\u200c\u062a\u0631\u06cc\u0646 \u0631\u0648\u0634: \u062f\u0631\u06cc\u0627\u0641\u062a MAVLink HEARTBEAT \u0648 GPS\nfloat altitude=0, voltage=0, speed=0;\ndouble lat=0, lon=0;\n\nvoid parseMavlink(uint8_t* buf, int len) {\n  \/\/ \u0628\u0631\u0631\u0633\u06cc Magic Byte \u0648 Message ID:\n  if(len < 8 || buf[0] != 0xFE) return;\n  uint8_t msgid = buf[5];\n  if(msgid == 24) {  \/\/ GPS_RAW_INT\n    lat = *(int32_t*)(buf+9) \/ 1e7;\n    lon = *(int32_t*)(buf+13) \/ 1e7;\n    altitude = *(int32_t*)(buf+17) \/ 1000.0;  \/\/ \u0645\u062a\u0631\n  }\n  if(msgid == 74) {  \/\/ VFR_HUD\n    speed = *(float*)(buf+6);\n  }\n  if(msgid == 147) {  \/\/ BATTERY_STATUS\n    voltage = *(int16_t*)(buf+20) \/ 1000.0;\n  }\n}\n\nvoid sendToThingSpeak() {\n  HTTPClient http;\n  String url = String(TS_URL) +\n    \"?api_key=\" + TS_KEY +\n    \"&#038;field1=\" + String(altitude,1) +\n    \"&#038;field2=\" + String(voltage,2) +\n    \"&#038;field3=\" + String(speed,1) +\n    \"&#038;field4=\" + String(lat,6) +\n    \"&#038;field5=\" + String(lon,6);\n  http.begin(url);\n  int code = http.GET();\n  http.end();\n}\n\nvoid setup() {\n  mavSerial.begin(57600, SERIAL_8N1, 16, 17);\n  WiFi.begin(ssid, pass);\n  while(WiFi.status()!=WL_CONNECTED) delay(300);\n}\n\nvoid loop() {\n  static uint8_t buf[280]; static int idx=0;\n  while(mavSerial.available()) {\n    buf[idx++] = mavSerial.read();\n    if(idx >= 8 && idx == (buf[1]+8)) {\n      parseMavlink(buf, idx); idx=0;\n    }\n    if(idx > 280) idx=0;\n  }\n  static unsigned long t=0;\n  if(millis()-t > 15000) {  \/\/ \u0647\u0631 \u06f1\u06f5 \u062b\u0627\u0646\u06cc\u0647\n    sendToThingSpeak(); t=millis();\n  }\n}\n<\/code><\/pre>\n<h2>\u062a\u0646\u0638\u06cc\u0645 ThingSpeak Channel<\/h2>\n<table style='width:100%;border-collapse:collapse;margin-bottom:18px'>\n<thead>\n<tr style='background:#e8f0fe'>\n<th style='padding:9px;border:1px solid #ddd;text-align:right'>Field<\/th>\n<th style='padding:9px;border:1px solid #ddd;text-align:right'>\u062f\u0627\u062f\u0647<\/th>\n<th style='padding:9px;border:1px solid #ddd;text-align:right'>\u0648\u0627\u062d\u062f<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style='padding:8px;border:1px solid #ddd'>Field 1<\/td>\n<td style='padding:8px;border:1px solid #ddd'>Altitude<\/td>\n<td style='padding:8px;border:1px solid #ddd'>\u0645\u062a\u0631<\/td>\n<\/tr>\n<tr style='background:#fafafa'>\n<td style='padding:8px;border:1px solid #ddd'>Field 2<\/td>\n<td style='padding:8px;border:1px solid #ddd'>Battery Voltage<\/td>\n<td style='padding:8px;border:1px solid #ddd'>\u0648\u0644\u062a<\/td>\n<\/tr>\n<tr>\n<td style='padding:8px;border:1px solid #ddd'>Field 3<\/td>\n<td style='padding:8px;border:1px solid #ddd'>Ground Speed<\/td>\n<td style='padding:8px;border:1px solid #ddd'>m\/s<\/td>\n<\/tr>\n<tr style='background:#fafafa'>\n<td style='padding:8px;border:1px solid #ddd'>Field 4+5<\/td>\n<td style='padding:8px;border:1px solid #ddd'>GPS Latitude\/Longitude<\/td>\n<td style='padding:8px;border:1px solid #ddd'>\u062f\u0631\u062c\u0647<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><svg viewBox='0 0 860 200' width='100%' xmlns='http:\/\/www.w3.org\/2000\/svg' style='background:#fff;border:1px solid #e0e0e0;border-radius:12px;margin-bottom:22px'>\n<rect x='40' y='75' width='155' height='60' rx='12' fill='#b7e4a0' stroke='#3a7a1e' stroke-width='2'\/>\n<rect x='245' y='75' width='155' height='60' rx='12' fill='#e8f4ff' stroke='#3a60c0' stroke-width='2'\/>\n<rect x='450' y='75' width='155' height='60' rx='12' fill='#f7d794' stroke='#a06d00' stroke-width='2'\/>\n<rect x='655' y='75' width='165' height='60' rx='12' fill='#f7c6c6' stroke='#a03030' stroke-width='2'\/>\n<line x1='195' y1='105' x2='245' y2='105' stroke='#555' stroke-width='2.5'\/>\n<line x1='400' y1='105' x2='450' y2='105' stroke='#555' stroke-width='2.5' stroke-dasharray='6,3'\/>\n<line x1='605' y1='105' x2='655' y2='105' stroke='#555' stroke-width='2.5'\/>\n<text x='117' y='100' text-anchor='middle' font-size='12' font-family='Tahoma'>Pixhawk<\/text>\n<text x='117' y='115' text-anchor='middle' font-size='11' font-family='Tahoma'>MAVLink UART<\/text>\n<text x='322' y='100' text-anchor='middle' font-size='12' font-family='Tahoma'>ESP32 Bridge<\/text>\n<text x='322' y='115' text-anchor='middle' font-size='11' font-family='Tahoma'>WiFi HTTPS<\/text>\n<text x='527' y='100' text-anchor='middle' font-size='12' font-family='Tahoma'>ThingSpeak<\/text>\n<text x='527' y='115' text-anchor='middle' font-size='11' font-family='Tahoma'>Channel API<\/text>\n<text x='737' y='100' text-anchor='middle' font-size='12' font-family='Tahoma'>\u062f\u0627\u0634\u0628\u0648\u0631\u062f<\/text>\n<text x='737' y='115' text-anchor='middle' font-size='11' font-family='Tahoma'>\u0646\u0645\u0648\u062f\u0627\u0631 \u0632\u0646\u062f\u0647<\/text>\n<text x='430' y='175' text-anchor='middle' font-size='13' font-family='Tahoma' fill='#666'>MAVLink \u2192 ESP32 \u2192 ThingSpeak \u2014 \u0644\u0627\u06af \u062a\u0644\u0647\u200c\u0645\u062a\u0631\u06cc \u0627\u0628\u0631\u06cc<\/text>\n<\/svg><\/p>\n<h2>\u0648\u06cc\u062f\u0626\u0648\u0647\u0627\u06cc \u0622\u0645\u0648\u0632\u0634\u06cc<\/h2>\n<div style='display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:18px;margin:20px 0'>\n<iframe width='100%' height='315' src='https:\/\/www.youtube.com\/embed\/RVb7sMJaJSU' title='ArduPilot Telemetry Cloud ESP32 ThingSpeak' frameborder='0' allow='accelerometer;autoplay;clipboard-write;encrypted-media;gyroscope;picture-in-picture' allowfullscreen><\/iframe><br \/>\n<iframe width='100%' height='315' src='https:\/\/www.youtube.com\/embed\/ZUMT-xPnj1w' title='MAVLink ESP32 WiFi Bridge Tutorial' frameborder='0' allow='accelerometer;autoplay;clipboard-write;encrypted-media;gyroscope;picture-in-picture' allowfullscreen><\/iframe>\n<\/div>\n<h2>\u0645\u0646\u0627\u0628\u0639 \u0628\u06cc\u0634\u062a\u0631<\/h2>\n<ul>\n<li><a href='https:\/\/www.aparat.com\/result\/ArduPilot_ThingSpeak_%D8%AA%D9%84%D9%87%E2%80%8C%D9%85%D8%AA%D8%B1%DB%8C' target='_blank'>\u0622\u067e\u0627\u0631\u0627\u062a: ArduPilot ThingSpeak \u062a\u0644\u0647\u200c\u0645\u062a\u0631\u06cc \u0641\u0627\u0631\u0633\u06cc<\/a><\/li>\n<li><a href='https:\/\/thingspeak.com\/docs' target='_blank'>MathWorks: ThingSpeak API Documentation<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u0622\u0645\u0648\u0632\u0634 \u0627\u0631\u0633\u0627\u0644 \u062a\u0644\u0647\u200c\u0645\u062a\u0631\u06cc ArduPilot \u0628\u0647 \u0627\u0628\u0631 ThingSpeak \u0628\u0627 ESP32 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u067e\u0644 MAVLink-WiFi\u061b \u0646\u0645\u0627\u06cc\u0634 \u0627\u0631\u062a\u0641\u0627\u0639\u060c \u0628\u0627\u062a\u0631\u06cc\u060c \u0645\u0648\u0642\u0639\u06cc\u062a \u0631\u0648\u06cc \u062f\u0627\u0634\u0628\u0648\u0631\u062f \u0622\u0646\u0644\u0627\u06cc\u0646.<\/p>\n","protected":false},"author":1,"featured_media":658,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"pagelayer_contact_templates":[],"_pagelayer_content":"","footnotes":""},"categories":[17,20],"tags":[104,22,158,125,444,50,445,293],"class_list":["post-659","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uav","category-projects-2","tag-ardupilot","tag-esp32","tag-iot","tag-mavlink","tag-thingspeak","tag-50","tag-445","tag-293"],"_links":{"self":[{"href":"https:\/\/projectleon.net\/make\/wp-json\/wp\/v2\/posts\/659","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/projectleon.net\/make\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/projectleon.net\/make\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/projectleon.net\/make\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/projectleon.net\/make\/wp-json\/wp\/v2\/comments?post=659"}],"version-history":[{"count":1,"href":"https:\/\/projectleon.net\/make\/wp-json\/wp\/v2\/posts\/659\/revisions"}],"predecessor-version":[{"id":660,"href":"https:\/\/projectleon.net\/make\/wp-json\/wp\/v2\/posts\/659\/revisions\/660"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/projectleon.net\/make\/wp-json\/wp\/v2\/media\/658"}],"wp:attachment":[{"href":"https:\/\/projectleon.net\/make\/wp-json\/wp\/v2\/media?parent=659"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/projectleon.net\/make\/wp-json\/wp\/v2\/categories?post=659"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/projectleon.net\/make\/wp-json\/wp\/v2\/tags?post=659"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}