{"id":25415562,"url":"https://github.com/axel7083/nixie-clock","last_synced_at":"2025-10-31T08:31:39.083Z","repository":{"id":41437299,"uuid":"488336273","full_name":"axel7083/Nixie-clock","owner":"axel7083","description":"Custom firmware adding support for BLE and Wifi to the EleksTube IPS Nixie Tube Digital Clock.","archived":false,"fork":false,"pushed_at":"2022-07-03T00:12:40.000Z","size":133,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-14T11:51:31.521Z","etag":null,"topics":["arduino","bluetooth","clock","cpp"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/axel7083.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}},"created_at":"2022-05-03T19:22:35.000Z","updated_at":"2023-12-26T03:03:00.000Z","dependencies_parsed_at":"2022-09-21T10:33:47.205Z","dependency_job_id":null,"html_url":"https://github.com/axel7083/Nixie-clock","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axel7083%2FNixie-clock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axel7083%2FNixie-clock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axel7083%2FNixie-clock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axel7083%2FNixie-clock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/axel7083","download_url":"https://codeload.github.com/axel7083/Nixie-clock/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239153626,"owners_count":19590754,"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","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","bluetooth","clock","cpp"],"created_at":"2025-02-16T15:38:16.757Z","updated_at":"2025-10-31T08:31:33.795Z","avatar_url":"https://github.com/axel7083.png","language":"C++","readme":"# Nixie-clock\n \nThis arduino project is a custom firmware for the [EleksTube IPS Nixie Tube Digital Clock](https://elekstube.com/products/elekstube-ips-rgb-digital-clock-imitate-nixie-tubes-clock-6-digit-lcd-proposal-mode-custom-style-best-boyfriend-gift-shelf-clock).\n\nThis repository take some code from the [frankcohen/EleksTubeIPSHack](https://github.com/frankcohen/EleksTubeIPSHack) repository.\n\nThis project provide a simple base splitting the different components of the clock:\n- Back Lights\n- Bluetooth (BLE)\n- Wifi\n- Buttons\n- Screens\n- Time \n- Files (LITTLEFS)\n\nEach componenent can call the others using the Clock instance.\n\n# Bluetooth (BLE)\n\nThe current implementation provides some simple example of the bluetooth implementation. (Not used in the original clock.)\n\nA class can extends the **BluetoothService** class, it abstract the interaction with the BLEManager class.\n\nHere is a simple example to turn on/off the back lights with python\n\n(start python using `python -m asyncio` to use await)\n```python\nfrom bleak import BleakScanner\nfrom bleak import BleakClient\n\n# Get the device\ndevice = [device for device in await BleakScanner.discover() if device.name == \"Clock Service\"]\nassert len(device) == 1\n\n# Create BleakClient\nclient = BleakClient(device[0].address)\n\n# Connect\nassert await client.connect()\n\n# Send 0 value to address POWER_UUID\nawait client.write_gatt_char(\"bb5e995d-5863-4aa1-bafe-0e6a9fd4aa71\", b'\\x00', response=True)\n```\n\n## Upload a new images\n\nFirst you need a bmp image in 135x240.\n\n```python\n# Init the upload for the number 0\nawait client.write_gatt_char(\"c2285d2f-44c5-4abb-af86-9d159f351081\", \"/0.bmp\".encode(), response=True)\n\nwith open(f\"data/0.bmp\", 'rb') as f:\n    bytes = f.read(512)\n    while bytes:\n        await client.write_gatt_char(\"c2285d2f-44c5-4abb-af86-9d159f351082\",\n                                    len(bytes).to_bytes(2, byteorder='big') + bytes, response=True)\n        bytes = f.read(512)\n\nawait client.write_gatt_char(\"c2285d2f-44c5-4abb-af86-9d159f351083\", b'close', response=True)\n```\n\n## Set wifi credentials\n\n```python\nawait client.write_gatt_char(\"c1eac326-9ded-4148-90c1-6289cdbf5103\", \"ssid;password\".encode(), response=True)\n```\n\n## Set TimeZoneOffset\n\nParis is +2 Therefore we add 2 hours to the default time:\n```python\nawait client.write_gatt_char(\"b13c119b-2a41-4c37-8f5e-f9c914566d51\", (60*60*2).to_bytes(4, byteorder='big'), response=True)\n```\n\n## Events\n\nThe clock can have up to 5 events. An event has a few attribute\n```C++\nstruct Event {\n    uint8_t day;\n    uint8_t month;\n    uint16_t year;\n    char message[24];\n};\n```\n\nThe year field is optional, to have a repeating event over the year, you can set the year value to UINT16_MAX (65535).\nTo set an event you can use the following command\n```python\nawait client.write_gatt_char(\n    \"fd82dda7-cc8e-43d2-aa81-48277a63e551\", \n    (4).to_bytes(1, byteorder='big')+ # The index (0 to 4)\n    (2).to_bytes(1, byteorder='big')+ # The day (1 to 31)\n    (7).to_bytes(1, byteorder='big')+ # The month (1 to 12)\n    (65535).to_bytes(3, byteorder='big') + # The year (65532 to ignore it) \n    \"Hello\\nWorld\".encode(), # The message to display: MUST BE 24 characters or bellow.\n    response=True\n)\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxel7083%2Fnixie-clock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faxel7083%2Fnixie-clock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxel7083%2Fnixie-clock/lists"}