{"id":22194872,"url":"https://github.com/creatingnull/null-packet-comms-arduino","last_synced_at":"2026-05-04T06:34:05.648Z","repository":{"id":38196589,"uuid":"445370078","full_name":"CreatingNull/Null-Packet-Comms-Arduino","owner":"CreatingNull","description":"A library for wrapping the arduino UART serial in a binary packet based communication protocol.","archived":false,"fork":false,"pushed_at":"2023-10-16T11:12:41.000Z","size":698,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-29T05:35:33.467Z","etag":null,"topics":["arduino","communication","cpp","library","uart"],"latest_commit_sha":null,"homepage":"https://wiki.nulltek.xyz/docs/protocols/npc/","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/CreatingNull.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE.md","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":"2022-01-07T02:11:11.000Z","updated_at":"2023-04-11T15:43:33.000Z","dependencies_parsed_at":"2025-03-24T21:31:27.682Z","dependency_job_id":"66b12306-e6e3-422d-abfa-641364f1ebe7","html_url":"https://github.com/CreatingNull/Null-Packet-Comms-Arduino","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/CreatingNull/Null-Packet-Comms-Arduino","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CreatingNull%2FNull-Packet-Comms-Arduino","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CreatingNull%2FNull-Packet-Comms-Arduino/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CreatingNull%2FNull-Packet-Comms-Arduino/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CreatingNull%2FNull-Packet-Comms-Arduino/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CreatingNull","download_url":"https://codeload.github.com/CreatingNull/Null-Packet-Comms-Arduino/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CreatingNull%2FNull-Packet-Comms-Arduino/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32597461,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"online","status_checked_at":"2026-05-04T02:00:06.625Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","communication","cpp","library","uart"],"created_at":"2024-12-02T13:14:57.204Z","updated_at":"2026-05-04T06:34:05.629Z","avatar_url":"https://github.com/CreatingNull.png","language":"C++","funding_links":["https://www.buymeacoffee.com/nulltek"],"categories":[],"sub_categories":[],"readme":"# ![NullTek Documentation](https://raw.githubusercontent.com/CreatingNull/NullTek-Assets/main/img/logo/NullTekDocumentationLogo.png)Arduino Null Packet Comms\n\n[![License](https://img.shields.io/:license-mit-blue.svg?style=flat-square)](https://github.com/CreatingNull/Null-Packet-Comms-Arduino/blob/master/LICENSE.md)\n[![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/creatingnull/null-packet-comms-arduino?style=flat-square\u0026color=orange)](https://github.com/CreatingNull/Null-Packet-Comms-Arduino/tags)\n[![Pre-commit](https://img.shields.io/github/actions/workflow/status/CreatingNull/Null-Packet-Comms-Arduino/run-pre-commit.yaml?branch=main\u0026logo=pre-commit\u0026style=flat-square\u0026label=linting)](https://github.com/CreatingNull/Null-Packet-Comms-Arduino/actions/workflows/run-pre-commit.yaml)\n[![Read the Docs](https://img.shields.io/readthedocs/null-packet-comms-arduino?style=flat-square\u0026logo=readthedocs)](https://null-packet-comms-arduino.nulltek.xyz)\n[![Test](https://img.shields.io/github/actions/workflow/status/CreatingNull/Null-Packet-Comms-Arduino/run-test.yaml?branch=main\u0026logo=github\u0026style=flat-square\u0026label=tests)](https://github.com/CreatingNull/Null-Packet-Comms-Arduino/actions/workflows/run-test.yaml)\n[![Build](https://img.shields.io/github/actions/workflow/status/CreatingNull/Null-Packet-Comms-Arduino/run-build.yaml?branch=main\u0026logo=github\u0026style=flat-square\u0026label=build)](https://github.com/CreatingNull/Null-Packet-Comms-Arduino/actions/workflows/run-build.yaml)\n\nThis is an arduino library that implements a binary packet-based communication protocol on top of the arduino Serial library.\nThis wrapper allows for robust generic data transfer between systems,\nit is heavily relied on for the [Arduino UOS](https://github.com/CreatingNull/UOS-Arduino) implementation.\n\nFor details on this implementation and the API, see the [project documentation](https://null-packet-comms-arduino.nulltek.xyz/en/stable/).\nFor more information on the NPC protocol and its uses, please see the [protocol documentation](https://wiki.nulltek.xyz/docs/protocols/npc/).\n\n---\n\n## Getting Started\n\nThis project is stand-alone and the only requirement is for it to be used in arduino projects.\n\n### Installation\n\nThe recommended method to use [this library](https://www.arduino.cc/reference/en/libraries/nullpacketcomms/)\nis downloading the latest stable release from the registry using the Arduino Library Manager.\n\nUsing the [arduino-cli](https://github.com/arduino/arduino-cli):\n\n```shell\narduino-cli lib install NullPacketComms\n```\n\nUsing the [arduino-ide](https://github.com/arduino/arduino-ide):\n\n![Installing through IDE](https://github.com/CreatingNull/Null-Packet-Comms-Arduino/blob/main/.resources/Install-via-IDE.gif)\n\nPre-packed zipped versions of the latest builds can also be obtained from the GitHub build artifacts.\nAlternatively, you could manually pack the source and add the library manually, see\n[instructions](https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries).\n\n### Usage\n\nThis library handles communicating and verifying data between the `primary` and\n`remote` device, what you do with that data is up to you.\nIn the [simple_example](examples/simple_example/simple_example.ino) sketch,\nwe implement a simple accumulating calculator on the arduino that can handle\naddition or subtraction operations.\n\nThis example sets the:\n\n* `target_` - Target address is used to define the operation.\n  * 10 - Perform an addition operation\n  * 11 - Perform a subtraction operation\n  * 12 - Return the current accumulator value as a signed 16-bit integer.\n\n* `payload` - 1 byte unsigned integer to add or subtract.\n\nUsing a `NPC` connection in this manner is implemented in a similar manner to\nif you were using raw UART, however instead of using manual `read` and `write`\ncommands we use `readPacket` and `writePacket`.\nThe benefit is that we get a closed loop communication where commands are\nacknowledged, checksums are verified, and both the `primary` and the `remote`\nhave some confidence in what is being sent and received.\n\nFor more information on the API see the [library documentation](https://null-packet-comms-arduino.nulltek.xyz).\n\n### Source Structure\n\nThe source code is written in C++ and contained within the `src/` subdir.\nThe source code is formatted using `clang-format` specifications.\nThis is automated via the [pre-commit](https://github.com/pre-commit/pre-commit) framework,\nsee repo [hooks](https://github.com/CreatingNull/Null-Packet-Comms-Arduino/blob/master/.pre-commit-config.yaml).\nThe hook's `arduino-lint` dependencies should be installed for the OS, to correctly execute the pre-commit tasks.\n\nThe pre-commit action is currently automated by GitHub actions CI, to verify against pushes and pull-requests.\n\n### Testing\n\nThe repo includes a test suite built using [googletest](https://github.com/google/googletest) to verify API functionality.\nThis uses a simple mocked `Arduino.h`\n[shim](https://github.com/CreatingNull/Null-Packet-Comms-Arduino/blob/main/.tests/Arduino.cpp)\nto 'simulate' hardware response.\n\nThe test suite is automated via a GitHub action.\nTo run the tests locally, you need to install the googletest framework.\nYou'll also need cmake and a c++ compiler on your development machine.\n\n```shell\ncd .tests/\ngit clone --depth 1 --branch v1.13.0 https://github.com/google/googletest\ncd googletest/\ncmake CMakeCache.txt\nmake\nsudo make install\ncd ..\nsource env.sh\nmake\n../src/NullPacketComms\n```\n\n---\n\nI just do this stuff for fun in my spare time, but feel free to:\n\n[![Support via buymeacoffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/nulltek)\n\n---\n\n## License\n\nThe source of this repo uses the MIT open-source license,\nfor details on the current licensing see:\n[LICENSE](https://github.com/CreatingNull/Null-Packet-Comms-Arduino/blob/master/LICENSE.md)\nor click the badge above.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreatingnull%2Fnull-packet-comms-arduino","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcreatingnull%2Fnull-packet-comms-arduino","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreatingnull%2Fnull-packet-comms-arduino/lists"}