{"id":41593687,"url":"https://github.com/inductivekickback/hallows","last_synced_at":"2026-01-24T09:36:12.817Z","repository":{"id":322920708,"uuid":"1091433803","full_name":"inductivekickback/hallows","owner":"inductivekickback","description":"Lego EV3 candy dispenser with a BLE remote control","archived":false,"fork":false,"pushed_at":"2025-11-07T03:52:05.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-07T04:21:42.614Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/inductivekickback.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-11-07T02:28:30.000Z","updated_at":"2025-11-07T03:52:09.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/inductivekickback/hallows","commit_stats":null,"previous_names":["inductivekickback/hallows"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/inductivekickback/hallows","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inductivekickback%2Fhallows","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inductivekickback%2Fhallows/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inductivekickback%2Fhallows/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inductivekickback%2Fhallows/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inductivekickback","download_url":"https://codeload.github.com/inductivekickback/hallows/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inductivekickback%2Fhallows/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28723467,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T08:27:05.734Z","status":"ssl_error","status_checked_at":"2026-01-24T08:27:01.197Z","response_time":89,"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":[],"created_at":"2026-01-24T09:36:12.758Z","updated_at":"2026-01-24T09:36:12.811Z","avatar_url":"https://github.com/inductivekickback.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://github.com/user-attachments/assets/51678149-e550-4142-bbdb-fc4d3716662a\" align=\"right\" width=\"400\" style=\"margin-right: 15px; margin-bottom: 15px;\"\u003e\n\n\u003cp\u003eThe release of the excellent \u003ca href=\"https://education.lego.com/en-us/product-resources/mindstorms-ev3/teacher-resources/python-for-ev3/\"\u003eMicroPython tooling\u003c/a\u003e for the \u003ca href=\"https://en.wikipedia.org/wiki/Lego_Mindstorms_EV3\"\u003eLego Mindstorms EV3\u003c/a\u003e was clearly the peak of the evolution of one of my favorite toys, followed a few years later by Lego discontuining the line completely. Along with a \u003ca href=\"https://marketplace.visualstudio.com/items?itemName=lego-education.ev3-micropython\"\u003eVisual Studio Code plugin\u003c/a\u003e that allows for interactive debugging the brick also gained proper support for \u003ca href=\"https://en.wikipedia.org/wiki/Universal_asynchronous_receiver-transmitter\"\u003eUART\u003c/a\u003e communications. This project demonstrates a relatively simple way to expand the capabilities of EV3 using the popular \u003ca href=\"https://docs.nordicsemi.com/category/nrf52840-category\"\u003eNordic nRF52840 SoC\u003c/a\u003e.\u003c/p\u003e\n\u003cp\u003eThe \u003ca href=\"https://docs.nordicsemi.com/bundle/ug_nrf52840_dongle/page/UG/nrf52840_Dongle/intro.html\"\u003enRF52840 dongle\u003c/a\u003e is inexpensive, breadboard-friendly, and its onboard regulator can run from the ~5V that is supplied to EV3 sensor ports. The nRF52840 will convert the \"VBUS\" voltage to \u003ca href=\"https://docs.nordicsemi.com/bundle/ps_nrf52840/page/uicr.html#ariaid-title69\"\u003e1.8V by default (max 3.3V)\u003c/a\u003e so a level shifter is still required to translate between the Lego and Nordic serial ports. I keep a few of these little \u003ca href=\"https://www.sparkfun.com/sparkfun-logic-level-converter-bi-directional.html\"\u003eSparkfun boards\u003c/a\u003e for situations like this:\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/user-attachments/assets/6ddd7d79-e573-403b-bebd-4bd6e162c690\" width=\"200\"\u003e\n\u003c/p\u003e\n\u003cp\u003eThe WHITE wire from the EV3 is not used. Tying the RED and BLACK wires together forms GND. Then the 5V from the EV3 (GREEN wire) is fed into the dongle's \"VBUS\" pin and the the output from the dongle's \"VDD OUT\" is used to run the nRF52840 and its peripherals. The level shifter translates the UART RX (BLUE wire) and TX (YELLOW wire) between the two devices.\u003c/p\u003e\u003cbr\u003e\n\n\u003cimg width=\"600\" height=\"200\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/1b165218-8f87-4245-b3c0-99d8c4b0b813\" /\u003e\n\n### BLE Interface\n\nA simple BLE service and client are used to exchange data between a \u003ca href=\"https://inductivekickback.blogspot.com/2021/11/halloween-2021.html\"\u003eremote control (central) and a candy machine (peripheral)\u003c/a\u003e. The remote sends a single ASCII byte, ['1', '2', '3', '4'], to select the candy to be dispensed.\n\n## UART interface to EV3\n\nThe nRF52840 communicates with the EV3 via two UART pins, through the level shifter, using 115200 8n1 baud rate.\n\nSerialized messages are received by the EV3 over the UART:\n - Messages have a fixed len of one byte.\n - All messages start with a byte that has the leading bit set.\n\n```\nDIRECTION:  DD, where command is 10 and response is 11\nOPCODE:     DDXX\nIMMEDIATE:  YYYY\n\nOPCODES:\nDD00 YYYY   STATUS, where YYYY:\n                0000 - SYNC command, aka keep alive\nDD01 YYYY   DISPENSE, where YYYY:\n                [0, 3] - Dispenser index\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finductivekickback%2Fhallows","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finductivekickback%2Fhallows","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finductivekickback%2Fhallows/lists"}