{"id":19203178,"url":"https://github.com/dilawar/serialscope","last_synced_at":"2025-05-12T13:24:00.253Z","repository":{"id":57465891,"uuid":"192094404","full_name":"dilawar/SerialScope","owner":"dilawar","description":"A simple Serial Port Oscilloscope ","archived":false,"fork":false,"pushed_at":"2020-08-29T08:07:49.000Z","size":507,"stargazers_count":29,"open_issues_count":2,"forks_count":7,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-01T09:49:01.690Z","etag":null,"topics":["arduino","arduino-uno","oscilloscope","python3","serial-port"],"latest_commit_sha":null,"homepage":"","language":"Python","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/dilawar.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":"2019-06-15T15:30:03.000Z","updated_at":"2025-03-16T07:41:14.000Z","dependencies_parsed_at":"2022-08-31T02:11:01.562Z","dependency_job_id":null,"html_url":"https://github.com/dilawar/SerialScope","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dilawar%2FSerialScope","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dilawar%2FSerialScope/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dilawar%2FSerialScope/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dilawar%2FSerialScope/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dilawar","download_url":"https://codeload.github.com/dilawar/SerialScope/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253745623,"owners_count":21957412,"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","arduino-uno","oscilloscope","python3","serial-port"],"created_at":"2024-11-09T12:47:14.653Z","updated_at":"2025-05-12T13:24:00.222Z","avatar_url":"https://github.com/dilawar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![PyPI version](https://badge.fury.io/py/SerialScope.svg)](https://badge.fury.io/py/SerialScope) ![](https://img.shields.io/pypi/pyversions/serialscope.svg)\n\nA serial port dual-channel oscilloscope. __Python 3 only. Very slugging performance on Windows__. \n\n![Screenshot (v0.1.3)](https://user-images.githubusercontent.com/895681/59994995-83506400-9673-11e9-861a-eb4f2984905e.png)\n\n    $ pip install SerialScope --user    # just for you\nor,\n\n    $ sudo -E pip install SerialScope   # for all users\n\nAfter installation, launch it. \n\n    $ serialscope\n   \nPath `~/.local/bin` should be in your `PATH` environment variable.\n\nor,\n    \n    $ python3 -m SerialScope \n    \n\nThe default baud rate is `115200`. The oscilloscope will automatically \nfind any serial port which has arduino connected to it.\n\nYou can change these values from command line\n\n```\nusage: serialscope [-h] [--port PORT] [--baudrate BAUDRATE]\n\nArduino NeuroScope.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --port PORT, -p PORT  Serial port.\n  --baudrate BAUDRATE, -B BAUDRATE\n                        Baudrate of Arduino board.\n\n```\n\n## Dependencies\n\n- pyserial\n- pysimplegui \n- screeninfo (optional)\n\n# How it works\n\nThis oscilloscope has two channels.  It assumes that 1 byte of data is sent\nfor each channel. If you are using arduino's analog pins to read data, then \nyour resolution would be `5/255` volts.\n\n## Arduino board\n\nFunction `analogRead` returns 10 bit value i.e., between 0 and 1023. You should\nscale it to 255, cast it to `char` before writing to serial port. This is for efficiency.\nSending 10 bits data requires sending 2 bytes. For 2 channels, this would slow \ndown the sampling rate by 4X compared to when only 1 byte is sent per channel.\n\nYou can use following snippets in your sketch.\n\nMake sure that your arduino is set to use maximum possible baud-rate. I have\nused 115200 baud rate.,\n\n```\n// Two critical functions.\nchar intToChar( int val)\n{\n    // analogRead is 10 bits. Change it to 8 bits.\n    char x = (char) (255.0 * val/1023.0);\n    return x;\n}\n\nvoid write_data_line( )\n{\n    // channel A is on pin A0 and channel B is on A1\n    char a = intToChar(analogRead(A0));\n    char b = intToChar(analogRead(A1));\n    Serial.print(a);\n    Serial.print(b);\n    Serial.flush();\n}\n```\n\nA sketch is available in `SerialScopeArduino/` directory. Open it in your\narduino IDE and upload to your Arduino board. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdilawar%2Fserialscope","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdilawar%2Fserialscope","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdilawar%2Fserialscope/lists"}