{"id":24765758,"url":"https://github.com/divingpixel/simpleblecontrols","last_synced_at":"2026-04-28T12:02:08.235Z","repository":{"id":259893622,"uuid":"879701952","full_name":"divingpixel/SimpleBleControls","owner":"divingpixel","description":"Esp32 BLE Library for controls in a mobile app","archived":false,"fork":false,"pushed_at":"2025-01-26T20:02:26.000Z","size":1253,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-26T10:58:31.117Z","etag":null,"topics":["android","ble","esp32"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/divingpixel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-10-28T11:59:01.000Z","updated_at":"2025-01-26T20:02:29.000Z","dependencies_parsed_at":"2024-11-05T19:37:51.951Z","dependency_job_id":"3d5ac7fb-053a-4b2a-ac18-938c3cb891c5","html_url":"https://github.com/divingpixel/SimpleBleControls","commit_stats":null,"previous_names":["divingpixel/androidblecontrols","divingpixel/simpleblecontrols"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/divingpixel/SimpleBleControls","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divingpixel%2FSimpleBleControls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divingpixel%2FSimpleBleControls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divingpixel%2FSimpleBleControls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divingpixel%2FSimpleBleControls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/divingpixel","download_url":"https://codeload.github.com/divingpixel/SimpleBleControls/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divingpixel%2FSimpleBleControls/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32379629,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T11:25:28.583Z","status":"ssl_error","status_checked_at":"2026-04-28T11:25:05.435Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["android","ble","esp32"],"created_at":"2025-01-28T23:15:39.770Z","updated_at":"2026-04-28T12:02:08.221Z","avatar_url":"https://github.com/divingpixel.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WHY THIS PROJECT\n\nI needed a way to configure and interact with my microcontrollers without attaching buttons, screens and other devices, and I didn't liked the solutions that where already on the market.\nI didn't want to install Home Assistant on a different computer, have a wifi router and other unrelated devices and I don't have the need to monitor and watch instant realtime changes.\nI also have a number of devices (for example lights, central heating, etc) that I would like to adjust sometimes, without being forced to use very few buttons on a very limited interface.\nIt is like a remote control for devices that work in \"fire and forget\" mode, but that from time to time need adjustments. \n\nSince Bluetooth it's pretty ubiqutuous, all the mobile phones have it, and nowadays very cheap microcontrollers integrate this wireless technology, I decided to solve my problem this way.\nThe project is split in two parts : a library to easily configure the microcontroller to create the desired controls, and a mobile app that will display the contols that are received as BLE characteristics.\n\n# HOW DOES THIS WORK\n\nThis is Arduino compatible code that can be used on an ESP32 based microcontroller to configure and generate BLE Characteristics.\nYou need to #include it in your project and below there is the documentation on how to use it.\n\nYou will also need the mobile phone app that will interpret the caracteristics and will display some \"controls\" according to the data in the characteristics.\nIn the mobile app the microcontroller can be configured and also data from the microcontroller can be observed.\nThe Android app can be found here ..., and the iPhone version will be also available soon.\n\n# THE LIBRARY\n\nImport the library and create an EspBleControls object pointer.\n\n\u003e *EspBleControls* controls;\n\nIn ``setup()`` initialise the pointer by creating a new EspBleControls object with two parameters.\n\n\u003e controls = new EspBleControls(\"Kitchen Controller\", 228378);\n\nFirst parameter is the name that will be displayed for the device, and second is the pin code for pairing. If the pin is set to 0, no pairing is needed.\n\nThen add the controls that you need.\n## For now possible controls are:\n\n### Clock control\nA control to set and observe the time from the microcontroller RTC (internal or external)\n![Clock control](/media/clock.png \"Clock control\")\n\n\u003e controls-\u003ecreateClockControl(\"Clock Control\", initialTime, 1);\n\n### Switch control\nJust a simple switch (ON/OFF)\n![Switch control](/media/switch.png \"Switch control\")\n\n### Momentary control\nJust like the switch, but momentary\n![Momentary button control](/media/momentary.png \"Momentary button control\")\n\n### Slider control\nA slider, to set an integer value between two limits. Sadly it's limited to a Short range.\n![Slider control](/media/slider.png \"Slider control\")\n\n### Integer control\nA text input where an integer can be set. Again if the limits are set, only short() values can be sent, but without limits a 32bit int can be used.\n![Integer control](/media/integer.png \"Integer control\")\n\n### Float control\nJust like the integer, with the same limitations, but for floats.\n![Float control](/media/float.png \"Float control\")\n\n### String control\nA text input box, that can be limited to a certain number of chars (less than 512).\n![String control](/media/string.png \"String control\")\n\n### Angle control\nA nice touch input that can set a value between 0..359, integer.\n![Angle control](/media/angle.png \"Angle control\")\n\n### Color control\nA nice interface to generate a color and returns the RGB in hex format.\n![Color control](/media/color.png \"Color control\")\n\n### Interval control\nA sofisticated interface to set on/off intervals in the 24 hours loop.\n![Interval control](/media/interval.png \"Interval control\")\n\n\u003e controls-\u003ecreateIntervalControl(\"Interval controller\", 288, 10, [](bool isOn) -\u003e void { if (isOn) toggleLed(\"ON\"); else toggleLed(\"OFF\"); });\n\nThe methods also have a small documentation just in case you need it (you will, just hover over the method name).\n\nAfter creating the controls that you need call the pointer's ``startService()``!\n\n\u003e controls-\u003estartService();\n\nFinally, don't forget to add in the ``loop()`` a call to the ``loopCallbacks()``.\n\n\u003e controls-\u003eloopCallbacks();\n\nThe main.cpp is a good example how to use these controls.\n\nHave fun!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivingpixel%2Fsimpleblecontrols","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdivingpixel%2Fsimpleblecontrols","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivingpixel%2Fsimpleblecontrols/lists"}