{"id":23821344,"url":"https://github.com/returnstring/node-gsr","last_synced_at":"2026-06-19T02:31:53.795Z","repository":{"id":57256397,"uuid":"66601165","full_name":"returnString/node-gsr","owner":"returnString","description":"collect galvanic skin response data in realtime using Node.js","archived":false,"fork":false,"pushed_at":"2016-09-11T21:02:08.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-02T12:05:46.059Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/returnString.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":"2016-08-25T23:50:33.000Z","updated_at":"2016-08-27T10:04:28.000Z","dependencies_parsed_at":"2022-08-25T02:30:52.417Z","dependency_job_id":null,"html_url":"https://github.com/returnString/node-gsr","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/returnString%2Fnode-gsr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/returnString%2Fnode-gsr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/returnString%2Fnode-gsr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/returnString%2Fnode-gsr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/returnString","download_url":"https://codeload.github.com/returnString/node-gsr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240102416,"owners_count":19748009,"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":"2025-01-02T08:39:11.084Z","updated_at":"2026-05-10T06:30:21.092Z","avatar_url":"https://github.com/returnString.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-gsr\nTools for collecting galvanic skin response data in realtime using Node.js.\n\n# Requirements\nUses Node 6.x. Tested on Windows, needs confirmation for Linux/OSX.\n\nSupported hardware:\n- [NeuLog](https://neulog.com/gsr/)\n\nOptional dependencies:\n- R, for `gsr-plot` graphing tool\n\t- libs: ggplot2\n\n# Installation\nFor a specific project:\n```\nnpm install gsr --save\n```\n\nGlobally, for the CLI tools:\n```\nnpm install gsr -g\n```\n\n# Usage\n## Scripts\nYou can retrieve GSR data inside your own Node.js scripts and apps.\n\nYou can choose to use a specific port, but the static `NeuLogGsr.find` is also available.\nIt will query all serial ports for connected hardware, returning the first device that responds.\n\n```javascript\nconst { NeuLogGsr } = require('gsr');\nconst co = require('co');\n\nconst needsSpecificLogger = true; // try changing me!\n\nfunction *getLogger()\n{\n\tif (needsSpecificLogger)\n\t{\n\t\treturn new NeuLogGsr('COM3'); // this value depends on your configuration\n\t}\n\telse\n\t{\n\t\treturn yield NeuLogGsr.find();\n\t}\n}\n\nfunction *main()\n{\n\tconst logger = yield getLogger();\n\n\tlogger.on('data', (value, timestamp) =\u003e\n\t{\n\t\tconsole.log(value, timestamp);\n\t});\n\n\tlogger.start();\n}\n\nco(main);\n```\n\n## CLI\nAs a quick start, you can use the bundled CLI scripts to generate CSV data.\nYou get the absolute/relative timestamps and the value in μS.\n\nAll time-based parameters accept strings like `100ms`, `10s`, `30m`, `2h`.\n\nAvailable parameters:\n- `-p`, `--port`: attach to a specific port; if omitted, will search through all connected devices and try connecting until one succeeds\n- `-d`, `--duration`: run the logger for a fixed amount of time\n- `-i`, `--interval`: control the frequency at which values are recorded\n\nAs an example, record 20 seconds of data with 10 events per second:\n\n```\n$ gsr-neulog -d 20s -i 100ms \u003e experiment.csv\n$ head experiment.csv\ntimestamp,offset,value\n1472306294526,0,1.2792\n1472306294626,100,1.283\n1472306294726,200,1.2898\n1472306294826,300,1.2983\n1472306294926,400,1.3037\n1472306295026,500,1.3071\n1472306295126,600,1.3095\n1472306295226,700,1.3085\n1472306295326,800,1.3056\n```\n\nTo generate graphs from the csv files:\n```\n$ gsr-plot experiment.csv experiment.png\n```\n\nIt should output something like this:\n\n![](http://i.imgur.com/t3RMze6.png)\n\nTo overlay the graph on some kind of source video, such as gameplay footage, use `gsr-video`:\n\n```\n$ gsr-video data.csv source_footage.mp4 output_video.mp4\nInput gameplay runs at 29.97002997003 FPS at 1280x720\nRendering 588 frames using 8 cores\nRendering video from frames: C:\\Users\\ruan\\AppData\\Local\\Temp\\RtmpoPUvpa/frames.mp4\nMerging with gameplay\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freturnstring%2Fnode-gsr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freturnstring%2Fnode-gsr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freturnstring%2Fnode-gsr/lists"}