{"id":18982352,"url":"https://github.com/defactosoftware/propaganda","last_synced_at":"2025-08-26T08:14:43.195Z","repository":{"id":70074373,"uuid":"88628819","full_name":"DefactoSoftware/propaganda","owner":"DefactoSoftware","description":null,"archived":false,"fork":false,"pushed_at":"2017-04-21T12:54:57.000Z","size":2198,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-02-21T09:31:12.982Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DefactoSoftware.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":"2017-04-18T13:34:31.000Z","updated_at":"2017-04-19T08:20:09.000Z","dependencies_parsed_at":"2023-02-28T08:00:34.823Z","dependency_job_id":null,"html_url":"https://github.com/DefactoSoftware/propaganda","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DefactoSoftware/propaganda","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DefactoSoftware%2Fpropaganda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DefactoSoftware%2Fpropaganda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DefactoSoftware%2Fpropaganda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DefactoSoftware%2Fpropaganda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DefactoSoftware","download_url":"https://codeload.github.com/DefactoSoftware/propaganda/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DefactoSoftware%2Fpropaganda/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272192681,"owners_count":24889460,"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-08-26T02:00:07.904Z","response_time":60,"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":"2024-11-08T16:13:12.505Z","updated_at":"2025-08-26T08:14:43.175Z","avatar_url":"https://github.com/DefactoSoftware.png","language":"C","readme":"# P R O P A G A N D A\n\nThis repository contains all code and documentation regarding the automated glass Defacto sign.\n\n## Hardware\n\n![Hardware](photo.jpg)\n\n```\nRaspberry Pi 3\nDS1302 real-time clock module\nGeneric 5V relais module\nGeneric 5V 3A power supply\n```\n\n## Diagram\n![Diagram](diagram.png)\n\nUse the **diagram.xml** file at https://www.draw.io/ to edit the diagram\n\n## Configuration\n### RTC module\n \nCompile the RTC program:\n`cc rtc-pi.c -o rtc-pi`\n\nSet the time (replace time format by actual date/time):\n`sudo ./rtc-pi YYYYMMDDhhmmss`\n\nA RTC module would be useless on the PI without using it to retrieve the right clock at the right time. And the PI needs a clock the most at boot.\n\nTo read a valid clock from the module we require it to have the correct time set beforehand. For this we can use the same binary to save the correct time (obtained most likely via NTP) on a previous shutdown.\n\nFor this, create a new file (let’s call it **savetime**) in **/etc/init.d** with the following content:\n\n```\n#!/bin/bash\n# saving date/time to RTC module\n/usr/sbin/rtc-pi `date +\"%Y%m%d%H%M%S\"`\n```\n\nAnd make it executable\n`sudo chmod a+x /etc/init.d/savetime`\n\nThen symlink this file in **/etc/rc0.d**\n`ln -s /etc/init.d/savetime /etc/rc0.d/K01savetime`\n\n**rc0.d** is the folder for scripts called at runlevel 0 (shutdown/restart)\n\n### Set the main script in place\nPut the **BoredTimes** script in `/home/pi/Scripts/boredtimes/`\n\n### Install Astral\n`sudo pip install astral`\n\n### Executing time and GPIO pins script at boot\n\n```\nsudo cp startup /etc/init.d/startup\nsudo chmod a+x /etc/init.d/startup\nsudo insserv /etc/init.d/startup\n```\n\n## Testing\n\n### RTC\nTest if the RTC contains the right date/time:\n`sudo ./rtc-pi`\n\n### Relay\nUsing the relay via the **/sys** filesystem\n\nView the current state of GPIO 22:\n`cat /sys/class/gpio/gpio122/value`\n\nSet the state of GPIO 22 by writing `1` for high (relay on) and `0` for low (relay off):\n```\necho \"1\" \u003e /sys/class/gpio/gpio22/value\necho \"0\" \u003e /sys/class/gpio/gpio22/value\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefactosoftware%2Fpropaganda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdefactosoftware%2Fpropaganda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefactosoftware%2Fpropaganda/lists"}