{"id":24830233,"url":"https://github.com/jjbel/light_navigator","last_synced_at":"2026-02-07T06:32:16.530Z","repository":{"id":271758788,"uuid":"913906859","full_name":"jjbel/light_navigator","owner":"jjbel","description":"Move to the brightest point in the room","archived":false,"fork":false,"pushed_at":"2025-01-19T08:56:12.000Z","size":34,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-01T14:52:04.479Z","etag":null,"topics":["arduino","mechatronics"],"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/jjbel.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,"zenodo":null}},"created_at":"2025-01-08T15:24:46.000Z","updated_at":"2025-01-19T08:56:13.000Z","dependencies_parsed_at":"2025-01-09T18:34:18.277Z","dependency_job_id":"6932e7f7-283a-42b1-ba47-691eddd42226","html_url":"https://github.com/jjbel/light_navigator","commit_stats":null,"previous_names":["jjbel/light_navigator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jjbel/light_navigator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjbel%2Flight_navigator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjbel%2Flight_navigator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjbel%2Flight_navigator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjbel%2Flight_navigator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jjbel","download_url":"https://codeload.github.com/jjbel/light_navigator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjbel%2Flight_navigator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29188226,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T05:07:31.176Z","status":"ssl_error","status_checked_at":"2026-02-07T05:06:15.227Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["arduino","mechatronics"],"created_at":"2025-01-30T23:49:27.782Z","updated_at":"2026-02-07T06:32:16.516Z","avatar_url":"https://github.com/jjbel.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Light Navigator Bot\n\n![](https://github.com/user-attachments/assets/9f7a2300-5874-47f7-a1e5-54a47a25ee2c)\n\nMove a bot to the bright spot on the wall in a dark room\n\n### \n\nDevelopment process:\n1. Took code from circuitjournal, removed all unnecessary code except that which sends grayscale image over UART\n2. inspected the pixel reading code to find a place to insert pixel processing\n3. debug upload timing issues\n4. get the motors working, being conservative with number of pins used (as I ran out of available arduino pins)\n5. tune the rotation and forward movement parameters\n\nAlgorithm:\n1. We only care about horizontal movement, so rotate the camera 90 degrees so each pixel row is vertical\n2. store each row in a buffer, take the average of each row (call this it's brightness)\n3. if the light is on the left, the beginning rows are brighter\n4. turn by an amount propotional to the angle of the light from the centre axis\n5. move forward\n\nBugs:\n1. Don't disturb the UART upload process\n2. KEep the checksum which is verified by circuitjournal's extension\n3. Usin pin 11 for PWM caused timing issues, maybe because it is also use for I2C?\n\n\n### Downsampling ideas\n\nMax pooling\n\nstore n lines, average over n lines, so 2^n size reduction\n\nbot can only turn horizontally. vertical resolution not needed. can orient camera such that one line is vertical, then can greatly downsample line, maybe even take average.\nor take average sport\nor find the centre of mass\n\ntake the middle line with max value.\nbut just taking max value is susceptible to noise.\ncould set a threshold, pixels above it should be counted.\n\nauto exposure: could be helpful to control it manually?\n\npossible optimization: reduce no of memory accesses to buffer\n\nOI!!\njust print the avg value at the end of the line\nforget trying to set the image to it\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjjbel%2Flight_navigator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjjbel%2Flight_navigator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjjbel%2Flight_navigator/lists"}