{"id":23838069,"url":"https://github.com/robsonos/spie-firmware","last_synced_at":"2026-04-18T01:33:10.728Z","repository":{"id":270615584,"uuid":"910795063","full_name":"robsonos/spie-firmware","owner":"robsonos","description":"A sample C++/Arduino firmware built with PlatformIO with support for CI/CD pipeline","archived":false,"fork":false,"pushed_at":"2025-01-01T20:10:20.000Z","size":38555,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-22T04:14:11.410Z","etag":null,"topics":["arduino","atmel","automation","cd","ci","cicd","cpp","cppcheck","platformio","serial","unittest"],"latest_commit_sha":null,"homepage":"","language":"C++","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/robsonos.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2025-01-01T13:00:52.000Z","updated_at":"2025-02-21T01:55:04.000Z","dependencies_parsed_at":"2025-01-01T21:33:30.472Z","dependency_job_id":null,"html_url":"https://github.com/robsonos/spie-firmware","commit_stats":null,"previous_names":["robsonos/spie-firmware"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/robsonos/spie-firmware","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robsonos%2Fspie-firmware","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robsonos%2Fspie-firmware/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robsonos%2Fspie-firmware/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robsonos%2Fspie-firmware/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robsonos","download_url":"https://codeload.github.com/robsonos/spie-firmware/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robsonos%2Fspie-firmware/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31953515,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"ssl_error","status_checked_at":"2026-04-18T00:39:20.671Z","response_time":62,"last_error":"SSL_read: 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":["arduino","atmel","automation","cd","ci","cicd","cpp","cppcheck","platformio","serial","unittest"],"created_at":"2025-01-02T16:26:36.423Z","updated_at":"2026-04-18T01:33:10.691Z","avatar_url":"https://github.com/robsonos.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003ch3 align=\"center\"\u003eSPIE firmware\u003c/h3\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg\n      alt=\"Maintenance status\"\n      src=\"https://img.shields.io/maintenance/yes/2025?style=flat-square\"\u003e\n  \u003ca\n    href=\"https://github.com/robsonos/spie-firmware/actions/workflows/ci.yml\"\n    style=\"color: inherit; text-decoration: none;\"\u003e\n    \u003cimg\n      alt=\"GitHub Workflow Status (with event)\"\n      src=\"https://img.shields.io/github/actions/workflow/status/robsonos/spie-firmware/ci.yml\"\u003e\n  \u003c/a\u003e\n  \u003ca\n    href=\"LICENSE\"\n    style=\"color: inherit; text-decoration: none;\"\u003e\n    \u003cimg\n      alt=\"GitHub License\"\n      src=\"https://img.shields.io/github/license/robsonos/spie-firmware\"\u003e\n  \u003c/a\u003e\n  \u003cbr /\u003e\n  \u003ca\n    href=\"https://github.com/robsonos/spie-firmware/releases\"\n    style=\"color: inherit; text-decoration: none;\"\u003e\n    \u003cimg\n      alt=\"GitHub Release version\"\n      src=\"https://img.shields.io/github/v/release/robsonos/spie-firmware\"\u003e\n  \u003c/a\u003e\n  \u003ca\n    href=\"#contributors\"\n    style=\"color: inherit; text-decoration: none;\"\u003e\n    \u003cimg\n        alt=\"GitHub contributors from allcontributors.org\"\n        src=\"https://img.shields.io/github/all-contributors/robsonos/spie-firmware\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nThis repository was initially created to test the features of [spie](https://github.com/robsonos/spie). However, it can be used to bootstrap your `PlatformIO` project with a modern embedded system workflow.\nThe firmware itself provides a simple implementation of an AT command interface for configuring a sine wave generator.\n\n## Index\n\n- [Features](#features)\n- [Getting started](#getting-started)\n- [Platformio tasks](#platformio-tasks)\n- [AT commands](#at-commands)\n- [CD/CI/Release workflow](#cdcirelease-workflow)\n- [Troubleshooting](#troubleshooting)\n\n## Features\n\n\u003cp align=\"center\"\u003e\u003cbr\u003e\u003cimg src=\"./docs/demo-serial-plotter.gif\" width=\"500\"\u003e\u003c/p\u003e\n\u003cp align=\"center\"\u003e\u003cbr\u003e\u003cimg src=\"./docs/demo-spie-plotter.gif\" width=\"500\"\u003e\u003c/p\u003e\n\n- Configure sine wave generation in real-time using AT commands.\n- Command validation and error handling for invalid inputs.\n- Unit-tested with mocks using `ArduinoFake`.\n- CI/CD workflows with proper versioning and release routines.\n\n## Getting Started\n\n### Steps\n\n1. Clone the repository\n\n```sh\ngit clone https://github.com/robsonos/spie-firmware\n```\n\n2. Open the repository with VSCode and install the recommended extensions\n\n3. Familiarise yourself with [PlatformIO](https://platformio.org/)\n\n[Back to Index](#index)\n\n## Platformio tasks\n\n- Build the code:\n\n```sh\npio run -e uno\n```\n\n- Upload code:\n\n```sh\npio run -e uno -t upload\n```\n\n- Run `cppcheck`:\n\n```sh\npio check\n```\n\n- Run unit tests:\n\n```sh\npio test\n```\n\n[Back to Index](#index)\n\n## AT Commands\n\n### Configuration Commands\n\nSet or query configuration parameters using the following AT commands:\n\n| Command                   | Description                                              | Example                | Response              |\n| ------------------------- | -------------------------------------------------------- | ---------------------- | --------------------- |\n| `AT+NUMPHASES=\u003cvalue\u003e`    | Sets the number of phases (positive integer).            | `AT+NUMPHASES=3`       | `OK`                  |\n| `AT+NUMPHASES?`           | Queries the current number of phases.                    | `AT+NUMPHASES?`        | `+NUMPHASES: 3`       |\n| `AT+SIGNALFREQ=\u003cvalue\u003e`   | Sets the signal frequency (positive integer).            | `AT+SIGNALFREQ=50`     | `OK`                  |\n| `AT+SIGNALFREQ?`          | Queries the current signal frequency.                    | `AT+SIGNALFREQ?`       | `+SIGNALFREQ: 50`     |\n| `AT+SAMPLINGFREQ=\u003cvalue\u003e` | Sets the sampling frequency (positive integer).          | `AT+SAMPLINGFREQ=1000` | `OK`                  |\n| `AT+SAMPLINGFREQ?`        | Queries the current sampling frequency.                  | `AT+SAMPLINGFREQ?`     | `+SAMPLINGFREQ: 1000` |\n| `AT+AMPLITUDE=\u003cvalue\u003e`    | Sets the amplitude (zero or positive integer).           | `AT+AMPLITUDE=2000`    | `OK`                  |\n| `AT+AMPLITUDE?`           | Queries the current amplitude.                           | `AT+AMPLITUDE?`        | `+AMPLITUDE: 2000`    |\n| `AT+OFFSET=\u003cvalue\u003e`       | Sets the offset (integer between -10000 and 10000).      | `AT+OFFSET=500`        | `OK`                  |\n| `AT+OFFSET?`              | Queries the current offset.                              | `AT+OFFSET?`           | `+OFFSET: 500`        |\n| `AT+ERRORPERCENT=\u003cvalue\u003e` | Sets the error percentage (float between 0.0 and 100.0). | `AT+ERRORPERCENT=5.5`  | `OK`                  |\n| `AT+ERRORPERCENT?`        | Queries the current error percentage.                    | `AT+ERRORPERCENT?`     | `+ERRORPERCENT: 5.5`  |\n| `AT+VERSION?`             | Queries the current firmware version.                    | `AT+VERSION?`          | `+VERSION: 1.0.0`     |\n| `AT+ALL?`                 | Queries all current configuration parameters.            |\n\n### Error Responses\n\nIf a command is invalid, the interface responds with a descriptive error message:\n\n- `ERROR: Invalid AT command format.`\n- `ERROR: Unknown command.`\n- `ERROR: \u003cparameter\u003e must be \u003cvalid range\u003e.`\n\n[Back to Index](#index)\n\n## CD/CI/Release workflow\n\nThere are many ways CD/CI/Release workflow can be implemented. I chose the most convenient one and here is how it is meant to work:\n\n- `dev`: holds the development code. Pushes to this will trigger the `CI workflow`, test your code, and create a PR to merge it into `main`.\n- `main`: holds the code for the latest release. Pushes to this will trigger the `CD workflow` and create a new github release and tag. You should never need to push commits to `main`; use `dev` and create a PR instead. The code on this branch should always come from merges from `dev`.\n- Once a new release is done, the `Release` workflow will be triggered to build and add the binaries to the release.\n- If you need to maintain more release channels, like `main` is at `v3.x.x` but you need to support `v1.x.x`, I would recommend using a similar approach:\n  - `main` for `v3.x.x`\n  - `main/v1` for `v1.x.x`\n  - `dev` for `v3.x.x` development\n  - `dev/v1` for `v1.x.x` development\n- I may look into exemplifying the above and `pre-releases` in the feature\n\n[Back to Index](#index)\n\n## Troubleshooting\n\n- You may need to update the following for unit testing the code:\n\n```ini\n[env:native]\nplatform = native; or windows_x86, or linux_x86_64 ...\n...\n```\n\nFor more information, check out [PlatformIO's Development Platforms](https://docs.platformio.org/en/latest/platforms/index.html#desktop)\n\n[Back to Index](#index)\n\n## Contributors\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\n[Back to Index](#index)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobsonos%2Fspie-firmware","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobsonos%2Fspie-firmware","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobsonos%2Fspie-firmware/lists"}