{"id":19130658,"url":"https://github.com/davicedraz/raspberry-usb-csv","last_synced_at":"2026-05-17T02:02:32.167Z","repository":{"id":125766515,"uuid":"257713736","full_name":"davicedraz/raspberry-usb-csv","owner":"davicedraz","description":"Automatically detects new USB disks and copy to it the actual sensors readings on a .csv file","archived":false,"fork":false,"pushed_at":"2020-04-21T21:41:14.000Z","size":83,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-01T17:01:41.255Z","etag":null,"topics":["csv-export","raspberry-pi","usb-drive"],"latest_commit_sha":null,"homepage":"","language":"Python","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/davicedraz.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":"2020-04-21T20:55:57.000Z","updated_at":"2020-10-10T12:40:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"a5e207f0-a1a5-4007-a0ca-68d083efa7bf","html_url":"https://github.com/davicedraz/raspberry-usb-csv","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/davicedraz/raspberry-usb-csv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davicedraz%2Fraspberry-usb-csv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davicedraz%2Fraspberry-usb-csv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davicedraz%2Fraspberry-usb-csv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davicedraz%2Fraspberry-usb-csv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davicedraz","download_url":"https://codeload.github.com/davicedraz/raspberry-usb-csv/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davicedraz%2Fraspberry-usb-csv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33125182,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T18:38:32.183Z","status":"online","status_checked_at":"2026-05-17T02:00:05.366Z","response_time":107,"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":["csv-export","raspberry-pi","usb-drive"],"created_at":"2024-11-09T06:12:15.019Z","updated_at":"2026-05-17T02:02:32.152Z","avatar_url":"https://github.com/davicedraz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"\"\u003e\n    \u003ca alt=\"Node\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Python-v3.8.1-green.svg\" /\u003e\n    \u003c/a\u003e\n    \u003ca alt=\"React\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Raspberry%20Pi-3-red.svg\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n# Automatic .csv backup to USB Disks\n\nThis program creates an execution routine that basically works by: when connecting a USB drive to the device's USB port, the user will only needs to wait for an automatic copy of all the data collected by the device in .csv format. In order to have access to the data quickly when he has physical access to the machine and that it is not necessary to have access to the internet.\n\nThe script `save.sh` performs this backup once, exactly at the moment you execute it, as an example of the continuous operation of the software.\n\n## Setup\n\nCreate a .env file and set the enviroment variables needed, for example:\n\n```bash\nFILE_PATH = ./temp/google_stock_data.csv\nSERIAL_PORT = 'COM1'\nDEBUG = 1\n```\n\n## Usage\n\nCreate a ```__main__.py``` file in this directory:\n\n```python\nimport export as export\nfrom config import config as env\n\nbackup_thread = export.USBListener(thread.new_drive_signal)\n\nif __name__ == \"__main__\":\n  payload = {} #your json dict\n  backup_thread.start()\n  print(\"Waiting for USB connections ...\")\n  \n  export.write_data(payload)\n```\n\nStart the script creating a background proccess:\n\n```bash\n$  python3 __main__.py \u0026\n```\n ----\n\n## Install\n\nPip will install all the libraries required by the following command:\n\n```bash\n$ make install\n```\n\nOr simply:\n\n```bash\n$ pip install -r requirements.txt \n```\n\n## Build \nIn order to generate a package ready for execution and loading on the desired device, we recommend that you use the build command:\n\n```bash\n$ make build\n```\n\n## Test\n\n```bash\n$ make tests\n```\n\n## Run\nThis command will execute the build product file generated by the build command:\n\n```bash\n$ make run\n```\nOr simply run the good old build \u0026 run:\n\n```bash\n$ python setup.py install \u0026\u0026 python firmware.py\n```\n\n## Run USB thread only\n\nStart the script creating a background proccess:\n\n```bash\n$ python usb.py \u0026\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavicedraz%2Fraspberry-usb-csv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavicedraz%2Fraspberry-usb-csv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavicedraz%2Fraspberry-usb-csv/lists"}