{"id":19746838,"url":"https://github.com/b-ryan/ultrasonic-arduino","last_synced_at":"2026-05-11T21:35:00.413Z","repository":{"id":34848959,"uuid":"38842561","full_name":"b-ryan/ultrasonic-arduino","owner":"b-ryan","description":null,"archived":false,"fork":false,"pushed_at":"2015-07-10T19:42:59.000Z","size":116,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-10T20:52:35.273Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Arduino","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/b-ryan.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}},"created_at":"2015-07-09T20:06:00.000Z","updated_at":"2015-07-10T19:37:46.000Z","dependencies_parsed_at":"2022-09-15T07:13:15.986Z","dependency_job_id":null,"html_url":"https://github.com/b-ryan/ultrasonic-arduino","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/b-ryan%2Fultrasonic-arduino","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b-ryan%2Fultrasonic-arduino/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b-ryan%2Fultrasonic-arduino/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b-ryan%2Fultrasonic-arduino/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/b-ryan","download_url":"https://codeload.github.com/b-ryan/ultrasonic-arduino/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241078405,"owners_count":19905850,"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":[],"created_at":"2024-11-12T02:16:02.245Z","updated_at":"2026-05-11T21:34:55.370Z","avatar_url":"https://github.com/b-ryan.png","language":"Arduino","funding_links":[],"categories":[],"sub_categories":[],"readme":"# standuino-arduino\n\nArduino code to measure distance and send it over a serial port.\n\nSee https://github.com/b-ryan/standuino for the companion Python code to read\nthe data.\n\n## Prerequisites\n\nThe following are used to build the Arduino code and load it onto the Arduino.\n\n```\napt-get install arduino-core picocom\n```\n\nUse the python library [ino](https://github.com/amperka/ino) to build and load\nthe code. It can be installed with\n\n```\npip install ino\n```\n\n## Hardware\n\nCheck out the sketch\n[here](http://arduinobasics.blogspot.com/2012/11/arduinobasics-hc-sr04-ultrasonic-sensor.html).\n\nTo give a brief rundown, the ultrasonic sensor needs four connections. You will\nsee labels for each pin on the front of the sensor. These are named\n\n* `VCC` for voltage\n* `Trig` for trigger\n* `Echo`\n* `GND` for ground\n\nConnect `VCC` pin to 5V power. Connect ground to ground. Connect 7 to `Echo`\nand connect 8 to `Trig`.\n\nFinally, plug the Arduino into a USB port.\n\n## Code\n\nGetting the code running is easy:\n\n```\nino build\nino upload\n```\n\nIf you get errors due to permissions on the serial port, you can give yourself\npermission to read/write on the serial port in use. In the output of the upload\ncommand you should see something like this:\n\n\u003e Guessing serial port ... /dev/ttyACM0\n\nYou can use that to figure out which permissions you need. See\n[this](http://unix.stackexchange.com/a/14363) stack overflow question with\ndetails. In my case, this works:\n\n```\nsudo usermod -a -G dialout buck\n```\n\nYou might need to log out and back in for this to take effect.\n\n## Test\n\nTo confirm things are working, you can open a serial monitor with\n\n```\nino serial\n```\n\nThis will read the data coming from the Arduino. It will look like:\n\n```json\n{\"distance_cm\": 24}\n```\n\nIf the distance is 0, then something isn't working correctly. Try making\nsure the connections are set up properly.\n\nTo quit the serial monitor, use `\u003cC-a\u003e\u003cC-q\u003e`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb-ryan%2Fultrasonic-arduino","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fb-ryan%2Fultrasonic-arduino","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb-ryan%2Fultrasonic-arduino/lists"}