NP

neha-priya-1171/sensor-telemetry-pipeline

API 开发

本页由 AI 翻译,技术细节请以原文为准。 查看原文

0 stars 质量 45 趋势 4

一个二年级电子与计算机工程学生的个人项目,展示了结构化提示工程如何将嵌入式硬件与云后端桥接起来——而无需从零开始写一行服务器代码。

概览

一个二年级电子与计算机工程学生的个人项目,展示了结构化提示工程如何将嵌入式硬件与云后端桥接起来——而无需从零开始写一行服务器代码。 ESP32微控制器读取六轴IMU传感器数据,使用NTP时间戳,并通过Wi-Fi发送到托管在Replit上的FastAPI服务器——该服务器验证数据并存储到SQLite数据库中。每个数据包返回HTTP 201,创建顺序record_id。 整个后端——特别是应用我课程中的提示工程技术:角色框架、迭代优化、错误驱动提示和模式锚定。 在电子与通信工程领域,硬件与软件之间的差距正在迅速缩小。网络物理系统、物联网和智能设备正日益成为该领域的核心——它们都需要这样一套:微控制器产生数据,网络层传输数据,后端存储数据。

概述(AI 翻译)

完全由AI构建——无需任何前台经验。

一个二年级电子与计算机工程学生的个人项目,展示了结构化提示工程如何将嵌入式硬件与云后端连接起来——而无需从零开始写一行服务器代码。


这是什么?

ESP32微控制器读取6轴IMU传感器数据,使用NTP时间戳,并通过Wi-Fi发送到托管在Replit上的FastAPI服务器——该服务器验证数据并存储在SQLite数据库中。每个数据包返回HTTP 201 Created,并带有顺序record_id。

整个后端都被用AI搭建、调试和部署——特别是应用了我课程中的提示工程技术:角色框架、迭代优化、错误驱动提示和模式锚定。


为什么这对ECE很重要

在电子与通信工程领域,硬件与软件之间的差距正在迅速缩小。网络物理系统、物联网和智能设备正日益成为该领域的核心——它们都需要这样一套:微控制器产生数据,网络层传输数据,后端存储数据。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

ESP32 IoT Telemetry Pipeline

Built entirely with AI — no prior backend experience required.

A personal project by a 2nd-year ECE student demonstrating how structured prompt engineering can bridge embedded hardware to cloud backends — without writing a single line of server code from scratch.


What is this?

An ESP32 microcontroller reads 6-axis IMU sensor data, timestamps it using NTP, and sends it over Wi-Fi to a FastAPI server hosted on Replit — which validates the data and stores it in a SQLite database. Every packet returns HTTP 201 Created with a sequential record_id.

The entire backend was scaffolded, debugged, and deployed using AI — specifically applying the prompt engineering techniques from my coursework: role framing, iterative refinement, error-driven prompting, and schema anchoring.


Why this matters for ECE

In Electronics & Communication Engineering, the gap between hardware and software is shrinking fast. Cyber-physical systems, IoT, and smart devices are increasingly central to the field — and they all require this exact stack: a microcontroller producing data, a network layer transporting it, and a backend storing it.

This project proves you don’t need a full software engineering background to build that pipeline. You need to know what to ask for and how to read the errors.


System Architecture

ESP32 Dev Module
│
├── Reads IMU (accel_x/y/z, gyro_x/y/z)
├── Syncs clock via NTP → pool.ntp.org
├── Builds JSON payload with 13-digit epoch timestamp
└── HTTP POST ──► /api/v1/telemetry
                    │
                    ├── X-API-Key header check
                    ├── Pydantic schema validation
                    ├── Replay attack timestamp check
                    └── SQLite INSERT → returns record_id
sequenceDiagram
    participant ESP32
    participant NTP as pool.ntp.org
    participant API as FastAPI (Replit)
    participant DB as SQLite

    ESP32->>NTP: Sync clock on boot
    NTP-->>ESP32: Unix epoch (ms)
    loop Every 5 seconds
        ESP32->>API: POST /api/v1/telemetry + X-API-Key
        API->>API: Validate key → schema → timestamp
        API->>DB: INSERT record
        DB-->>API: record_id
        API-->>ESP32: 201 Created {record_id: 286}
    end

The Payload Schema

This is the exact JSON structure the Pydantic model expects. Any deviation returns HTTP 422.

{
  "device_id": "esp32-node-01",
  "firmware_version": "1.0.0",
  "timestamp_ms": 1781670054657,
  "imu": {
在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add neha-priya-1171/sensor-telemetry-pipeline
新手?先看 mcpskill.org 教程 →