กลับไปหน้ารวมไฟล์
demo-of-my-new-arduino-project-manager-gpt-f9e91a.md

นี่คือตัวอย่างเดโมของ GPT ที่พี่กำลังพัฒนาอยู่ และจะมาแชร์ซีรี่ย์เกี่ยวกับมันที่นี่ด้วย มันทำงานกับโปรเจค Arduino ของน้องๆ ในโฟลเดอร์มาตรฐาน ../Arduino ได้ง่ายๆ เลย เป็น multi-platform ฉะนั้นมันรู้ว่าโฟลเดอร์นั้นอยู่ไหน ไม่ว่าน้องจะใช้ Windows, macOS หรือ Linux

มันคุยกับบอร์ดของน้องโดยตรงผ่านเครื่องมือ arduino-cli ที่มีให้ใช้ในทุกแพลตฟอร์ม

มันสามารถวิเคราะห์และแก้ไขโปรเจคที่มีอยู่ของน้องได้ แค่คุยกับมันเท่านั้น ให้คำแนะนำเกี่ยวกับโปรเจคต่างๆ ได้ และคอมไพล์กับอัพโหลดโค้ดได้โดยไม่ต้องใช้ IDE ใดๆ เลย พี่ก็กำลังเขียนบทความซีรี่ย์เกี่ยวกับวิธีสร้าง GPT แบบนี้และ Customer GPT อื่นๆ ด้วย OpenAI อยู่เหมือนกัน ถ้ามีคนสนใจพี่ก็จะพัฒนาสิ่งที่คล้ายๆ กันสำหรับแพลตฟอร์ม AI ของ Google อย่าง Gemini Gem ด้วย

จัดไปวัยรุ่น! (แล้วก็ลองดูโลโก้ของ GPT นี้ด้วยนะ 😉)

ripred

Artificial Brains: Arduino และ ChatGPT

Arduino Project Manager GPT นี้ไม่ใช่การสร้างฮาร์ดแวร์แบบดั้งเดิมหรอกนะ มันทำงานอยู่ตรงแนวหน้าของการบูรณาการ IoT เลย โปรเจคนี้เชื่อม ESP32 ที่ต่ออินเทอร์เน็ตได้ เข้ากับโมเดลภาษาขนาดยักษ์ของ OpenAI ทำให้ไมโครคอนโทรลเลอร์ธรรมดาๆ กลายเป็นเอเจนต์สนทนาที่ฉลาดสุดๆ ไปเลย

การรักษาความปลอดภัยของ API Call

เราไม่สามารถรันโมเดล AI บน Arduino ได้ ต้องใช้ระบบคลาวด์แทน

  1. The Request: ESP32 เชื่อมต่อกับ Wi-Fi รับข้อความอินพุต (อาจมาจากไมโครโฟนที่แปลงเสียงเป็นข้อความ หรืออินพุตจากเทอร์มินัล)
  2. The HTTPS POST: ESP32 สร้างคำขอ HTTPS ที่เข้ารหัสและปลอดภัยสูง พร้อมแนบ OpenAI API Key ส่วนตัวของน้อง จัดรูปแบบคำถามด้วย JSON (JavaScript Object Notation) แล้วส่งไปที่ api.openai.com
  3. The Wait: ไลบรารี WiFiClientSecure ของ Arduino รอการตอบกลับจากเซิร์ฟเวอร์
  4. The Parse: ESP32 ได้รับการตอบกลับ JSON ขนาดใหญ่กลับมา ใช้ ArduinoJSON เพื่อตัดเอาคำตอบจริงๆ ออกมา แล้วพิมพ์ลงบนหน้าจอ!

Essential Parts Checklist (เช็คลิสต์ของต้องมี)

  • ESP32 หรือ ESP8266 NodeMCU: Arduino ธรรมดาๆ RAM ไม่พอและทำ HTTPS ไม่ได้สำหรับงานนี้
  • สาย Micro-USB
  • A valid OpenAI API Key (คีย์ API ของ OpenAI ที่ใช้งานได้)
  • A Display: จอ TFT ขนาดใหญ่หรือ LCD แบบ I2C สำหรับอ่านคำตอบจาก AI

โครงสร้างแบบนี้คือกระดูกสันหลังของโปรเจค "Smart Home Assistant" แบบกำหนดเองเลย มันทำให้น้องสามารถถามคำถามเกี่ยวกับฮาร์ดแวร์ที่ซับซ้อนกับโคมไฟตั้งโต๊ะ แล้วได้รับคำตอบที่ชัดเจนทันทีบน LCD ได้เลย! สู้งานนะน้อง

ข้อมูล Frontmatter ดั้งเดิม

apps:
  - "1x python"
author: "Ripred"
category: "Lab Stuff"
components:
  - "1x Arduino Nano"
description: "This is a demo showing the custom GPT I'm developing and posting a series here about. It can easily work with any of your projects in your standard ../Arduino folder. It's multi-platform so it knows where that folder is regardless if you are running Windows, macOS, or Linux. \n\nIt talks directly to your board using the arduino-cli tool which is available on all platforms.\n\n It can analyze and edit any of your existing projects all just by talking with it, give you advice about any of them, and compile and upload them all without using any IDE.\n\nI'm also posting a series of articles on how to build this and other Customer GPT's using OpenAI.\n\nIf there is interest I will also develop the same kind of specialized Gemini Gem for Google's AI platform.\n\nHave Fun! (also, check out the GPT's logo 😉)\n\n`ripred`\n\nedit: Yes I had to film my screen showing the two separate films of the screen and the Nano videos because I don't have video editing that allows me to create a picture in a picture video. But the GPT IS controlling the Nano I promise heh. all of the code will be available in the series as well as on my github repositories. 😄"
difficulty: "Intermediate"
documentationLinks: []
downloadableFiles:
  - "https://projects.arduinocontent.cc/2eafea77-2d0d-4c5b-8ab6-faf3fe525225.py"
encryptedPayload: "U2FsdGVkX19jZLK2cIkzAQ04BGCtr6Ch/i2uW+GhypRXyOD7mOqLN6q0OdWjkcXzZGD1z9uFImjXXUWY4T/ICWR9sfKGqnCHZPzqwVyQi83J+HMj6b1CBykqdIX56BED+vlAmmz8JIgEvegIXrWUxSDOYotKTGoH5vCQnGcPMG0="
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/demo-of-my-new-arduino-project-manager-gpt-f9e91a_cover.jpg"
lang: "en"
likes: 2
passwordHash: "f26e0246860be75f7252123a52d326e7f9ce6d57cfa72011b6ac428b3b52bfc7"
price: 99
seoDescription: "New Arduino Project Manager GPT demo: Analyze, edit, compile, and upload code via arduino-cli without an IDE. Supports Windows, macOS, and Linux."
tags:
  - "Remote Control"
  - "Artificial Intelligence"
  - "GPT"
  - "Arduino CLI"
  - "Automation"
title: "โปรเจค Arduino ตัวใหม่ของพี่! GPT Manager ตึงๆ งานง่ายแต่หล่อ"
tools: []
videoLinks:
  - "https://www.youtube.com/watch?v=Hhlq1Eq2puk"
views: 1845