{"id":46782066,"url":"https://github.com/frytg/sensory","last_synced_at":"2026-03-10T00:33:15.853Z","repository":{"id":291135235,"uuid":"976507709","full_name":"frytg/sensory","owner":"frytg","description":"ESP32 test project with sensors and Embedded Rust","archived":false,"fork":false,"pushed_at":"2025-09-07T15:29:14.000Z","size":100,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-07T17:33:49.799Z","etag":null,"topics":["embedded-rust","esp32","esp32c6","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frytg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-02T08:26:27.000Z","updated_at":"2025-09-07T15:28:20.000Z","dependencies_parsed_at":"2025-05-02T16:46:55.282Z","dependency_job_id":"5238d57a-8fef-49ad-9488-e0fe756fd7a8","html_url":"https://github.com/frytg/sensory","commit_stats":null,"previous_names":["frytg/sensory"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/frytg/sensory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frytg%2Fsensory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frytg%2Fsensory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frytg%2Fsensory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frytg%2Fsensory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frytg","download_url":"https://codeload.github.com/frytg/sensory/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frytg%2Fsensory/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30318464,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T20:05:46.299Z","status":"ssl_error","status_checked_at":"2026-03-09T19:57:04.425Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["embedded-rust","esp32","esp32c6","rust"],"created_at":"2026-03-10T00:33:14.784Z","updated_at":"2026-03-10T00:33:15.830Z","avatar_url":"https://github.com/frytg.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sensory Firmware\n\nThis is the firmware for an ESP32 microcontroller written in Embedded Rust. It connects to sensor(s) and sends data to a local server.\n\nFor the most part this was a learning exercise for me to get more familiar with Embedded Rust and the ESP32 microcontroller. I have several sensors using this setup running at home.\n\n## ESP32\n\nThis is currently setup to run on the ESP32-C6 microcontroller. I am using the [NanoC6 Dev Kit](https://shop.m5stack.com/products/m5stack-nanoc6-dev-kit) from M5Stack, which is useful dev board with a tiny footprint, LED, USB-C, and a few other features.\n\nThe primary sensor is the [SCD40](https://sensirion.com/products/catalog/SCD40) from Sensirion, which also has a useful [M5Stack board](https://shop.m5stack.com/products/co2-unit-with-temperature-and-humidity-sensor-scd40) that can be connected to the ESP32-C6 via the M5Stack grove/ JST connector. It communicates over I2C.\n\n## Running the firmware\n\nYou will need to have the [`just`](https://github.com/casey/just) and [`sops`](https://github.com/getsops/sops) commands installed. It will use `.env.sops.yaml` or whatever is configured in the `SOPS_ENV_FILE` environment variable.\n\nRun directly on the ESP32 microcontroller:\n\n```bash\njust run scd40\n```\n\nBuild for release:\n\n```bash\njust release scd40\n```\n\nFlash to the ESP32 microcontroller:\n\n```bash\njust flash scd40\n```\n\n## Kudos\n\nThis project uses snippets and was inspired by projects and their examples like [`esp-rs/esp-hal`](https://github.com/esp-rs/esp-hal).\n\n## Server Endpoint\n\nThe server endpoint is a simple HTTP server that accepts POST requests with JSON data.\n\n```bash\ncurl -X POST http://localhost:8081/sensor/intake \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"serial\":111111111111111,\"mac\":\"11:11:11:11:11:11\",\"cycle\":1,\"co2\":555,\"temperature\":22.48188,\"humidity\":48.8426}'\n```\n\n```json\n{\n  \"serial\": 111111111111111,\n  \"mac\": \"11:11:11:11:11:11\",\n  \"cycle\": 1,\n  \"co2\": 555,\n  \"temperature\": 22.48188,\n  \"humidity\": 48.8426\n}\n```\n\n## Docs\n\n- `embassy`: [embassy.dev](https://embassy.dev) / [embassy.dev/book](https://embassy.dev/book/)\n- `esp-rs` docs overview [docs.espressif.com/projects/rust/](https://docs.espressif.com/projects/rust/)\n- `esp-hal` [docs.espressif.com/projects/rust/esp-hal/1.0.0-beta.0](https://docs.espressif.com/projects/rust/esp-hal/1.0.0-beta.0/index.html)\n  - ESP32-C6: [docs.espressif.com/projects/rust/esp-hal/1.0.0-beta.0/esp32c6/esp_hal](https://docs.espressif.com/projects/rust/esp-hal/1.0.0-beta.0/esp32c6/esp_hal/index.html)\n- `esp-wifi` [docs.espressif.com/projects/rust/esp-wifi/0.13.0](https://docs.espressif.com/projects/rust/esp-wifi/0.13.0/index.html)\n  - ESP32-C6: [docs.espressif.com/projects/rust/esp-wifi/0.13.0/esp32c6/esp_wifi](https://docs.espressif.com/projects/rust/esp-wifi/0.13.0/esp32c6/esp_wifi/index.html)\n- `scd4x` [docs.rs/scd4x/0.4.0/scd4x/](https://docs.rs/scd4x/0.4.0/scd4x/) / [github.com/hauju/scd4x-rs](https://github.com/hauju/scd4x-rs)\n- `smoltcp` [docs.rs/smoltcp/latest/smoltcp/index.html](https://docs.rs/smoltcp/latest/smoltcp/index.html)\n- M5Stack NanoC6: [docs.m5stack.com/en/core/M5NanoC6](https://docs.m5stack.com/en/core/M5NanoC6)\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrytg%2Fsensory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrytg%2Fsensory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrytg%2Fsensory/lists"}