{"id":33145545,"url":"https://github.com/tipih/NRF51_Radio_library","last_synced_at":"2025-11-20T07:01:36.309Z","repository":{"id":146195284,"uuid":"159845326","full_name":"tipih/NRF51_Radio_library","owner":"tipih","description":"NRF51 Radio library, This library is working with the Microbit runtime implementation from Landcaster University","archived":false,"fork":false,"pushed_at":"2022-12-17T14:08:57.000Z","size":31,"stargazers_count":8,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-18T18:01:22.724Z","etag":null,"topics":[],"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/tipih.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}},"created_at":"2018-11-30T15:51:13.000Z","updated_at":"2023-01-11T15:56:46.000Z","dependencies_parsed_at":"2023-05-09T19:20:48.681Z","dependency_job_id":null,"html_url":"https://github.com/tipih/NRF51_Radio_library","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/tipih/NRF51_Radio_library","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tipih%2FNRF51_Radio_library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tipih%2FNRF51_Radio_library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tipih%2FNRF51_Radio_library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tipih%2FNRF51_Radio_library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tipih","download_url":"https://codeload.github.com/tipih/NRF51_Radio_library/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tipih%2FNRF51_Radio_library/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285389437,"owners_count":27163377,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-20T02:00:05.334Z","response_time":54,"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":[],"created_at":"2025-11-15T13:00:33.625Z","updated_at":"2025-11-20T07:01:36.289Z","avatar_url":"https://github.com/tipih.png","language":"C++","funding_links":[],"categories":["©️ C/C++"],"sub_categories":["©️ C/C++ Libraries"],"readme":"# NRF51_Radio_library\n\nThis library is based on the Driver from Landcaster University microbit-dal Radio implementation.\nTo use this library you should have the Microbit Board from sanddeepmistry install, you can get that from here\nhttps://sandeepmistry.github.io/arduino-nRF5/package_nRF5_boards_index.json\n\n\nThis library will for now work in 1Mbit simple mode, it is fully function with the runtime also used in the Python and the Java runtime for the microbit.\n\nYou have the following function to play with.\n\n* int setTransmitPower(int power); power 0-7\n* int setFrequencyBand(int band); band 0-100\n* int getRSSI();\n* int enable();\n* int disable();\n* int setGroup(uint8_t group); group 0-255\n* int dataReady();\n* FrameBuffer* recv();\n* int send(FrameBuffer *buffer); frameBuffer struct\n\n```javascript\nstruct FrameBuffer\n{\n    uint8_t         length;                             // The length of the remaining bytes in the                  packet. includes protocol/version/group fields, excluding the length field itself.\n    uint8_t         version;                            // Protocol version code.\n    uint8_t         group;                              // ID of the group to which this packet belongs.\n    uint8_t         protocol;                           // Inner protocol number c.f. those issued by IANA for IP protocols\n\n    uint8_t         payload[MICROBIT_RADIO_MAX_PACKET_SIZE];    // User / higher layer protocol data\n    FrameBuffer     *next;                              // Linkage, to allow this and other protocols to queue packets pending processing.\n    int             rssi;                               // Received signal strength of this frame.\n};\n\n```\n\n\n\nExample of the use can be found in the example library.\n\n\nBut in general you need to do the following.\n```\n#include \"NRF51_Radio_library.h\"\n\nNRF51_Radio MicrobitRadio = NRF51_Radio();\n```\n\nIn the setup\nYou can just enable the Radio, the it is ready\nMicrobitRadio.enable();\n\n\n And then in the loop.\n```\nstatic long currentMillis;\n\n//Check if there is any data in the buffer\n\tFrameBuffer* myData = MicrobitRadio.recv();\n\tif (myData != NULL) {\n\t\tSerial.print(myData-\u003elength);\n\t\tSerial.print(\"    \");\n\t\tSerial.print(myData-\u003eversion);\n\t\tSerial.print(\"    \");\n\t\tSerial.print(myData-\u003egroup);\n\t\tSerial.print(\"    \");\n\t\tSerial.print(myData-\u003eprotocol);\n\t\tSerial.print(\"    \");\n\t\tSerial.print(myData-\u003epayload[10]);\n\t\tSerial.print(\"    \");\n\t\tSerial.println(MicrobitRadio.dataReady());\n\t\tdelete myData;  //Remember to delete it\n\n\n\n//Fill in some data in the datastruct\n\t\tmyDataSendData-\u003elength = 3;\n\t\tmyDataSendData-\u003egroup = 10;\n\t\tmyDataSendData-\u003eversion = 12;\n\t\tmyDataSendData-\u003eprotocol = 14;\n\n//send the data each 5 sec\n\t\tif (millis() - currentMillis \u003e= interval)\n\t\t{\n\n\t\t\tSerial.println(currentMillis);\n\t\t\tMicrobitRadio.send(myDataSendData);\n\t\t\tcurrentMillis = millis();\n\t\t}\n\t}\n\n\tdelay(10);\n\tdigitalWrite(LED, LOW);\n\tdelay(10);\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftipih%2FNRF51_Radio_library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftipih%2FNRF51_Radio_library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftipih%2FNRF51_Radio_library/lists"}