{"id":30237701,"url":"https://github.com/chanulee/cupid","last_synced_at":"2026-02-11T10:33:36.394Z","repository":{"id":305263541,"uuid":"1019586532","full_name":"chanulee/cupid","owner":"chanulee","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-19T03:00:08.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-15T02:18:53.154Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/chanulee.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-07-14T14:57:24.000Z","updated_at":"2025-07-19T03:00:12.000Z","dependencies_parsed_at":"2025-07-19T08:46:46.507Z","dependency_job_id":"8add6717-b8ce-4559-8119-d85e63234f6a","html_url":"https://github.com/chanulee/cupid","commit_stats":null,"previous_names":["chanulee/cupid"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chanulee/cupid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chanulee%2Fcupid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chanulee%2Fcupid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chanulee%2Fcupid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chanulee%2Fcupid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chanulee","download_url":"https://codeload.github.com/chanulee/cupid/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chanulee%2Fcupid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29332277,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T06:13:03.264Z","status":"ssl_error","status_checked_at":"2026-02-11T06:12:55.843Z","response_time":97,"last_error":"SSL_read: 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":[],"created_at":"2025-08-15T02:07:42.353Z","updated_at":"2026-02-11T10:33:36.378Z","avatar_url":"https://github.com/chanulee.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cupid: Interactive GSR Data Visualizer\n\nCupid is an interactive art project that captures and visualizes Galvanic Skin Response (GSR) data in real-time. The project uses an Arduino and a GSR sensor to measure a user's physiological state, which is then translated into a generative, halftone-style visual on a web browser.\n\nThe system follows a distinct interaction flow: it waits for a user to touch the sensor, measures their GSR for a short period, and then displays a final \"result\" visualization based on the collected data before entering a cooldown phase.\n\n## Features\n\n-   **Real-time Data Visualization:** Live generative art powered by physiological data.\n-   **State-Driven Interaction:** The visualization changes dynamically through `IDLE`, `MEASURING`, and `RESULT` states.\n-   **Automatic Hardware Detection:** The Node.js server automatically finds and connects to the Arduino.\n-   **Configurable Visuals:** A GUI allows for real-time tweaking of the visual parameters (toggle with the 'v' key).\n-   **WebSocket Communication:** Robust, real-time communication between the server and the browser.\n\n## System Architecture\n\nThe project consists of three main components that work together:\n\n1.  **Arduino:** Reads analog data from the GSR sensor.\n2.  **Node.js Server:**\n    -   Serves the frontend web page.\n    -   Automatically detects and connects to the Arduino via a serial port.\n    -   Forwards the serial data to the frontend using WebSockets.\n3.  **Frontend (p5.js):**\n    -   Connects to the server via WebSocket.\n    -   Receives GSR data and updates the visualization state and parameters accordingly.\n\n```mermaid\ngraph TD\n    A[User Touches GSR Sensor] --\u003e B(Arduino);\n    B -- Serial Data --\u003e C{Node.js Server};\n    C -- WebSocket --\u003e D[Frontend - p5.js];\n    C -- Serves HTML/JS --\u003e D;\n    D -- Renders Visuals --\u003e E[User's Screen];\n```\n\n## Required Hardware\n\n-   Arduino Uno (or a compatible board)\n-   GSR (Galvanic Skin Response) Sensor\n-   Jumper wires\n\n## Required Software\n\n-   [Arduino IDE](https://www.arduino.cc/en/software)\n-   [Node.js](https://nodejs.org/) (which includes npm)\n\n## Setup and Installation\n\n### 1. Hardware Setup\n\n1.  Connect the GSR sensor to your Arduino. The default pin in the sketch is `A3`.\n    -   **Signal/SIG** → `A3` on Arduino\n    -   **VCC/+** → `5V` on Arduino\n    -   **GND/-** → `GND` on Arduino\n2.  Connect the Arduino to your computer via USB.\n\n### 2. Upload Arduino Sketch\n\n1.  Open the `hug_workshop_1/hug_workshop_1.ino` file in the Arduino IDE.\n2.  Go to **Tools \u003e Board** and select your Arduino board (e.g., \"Arduino Uno\").\n3.  Go to **Tools \u003e Port** and select the port your Arduino is connected to.\n4.  Click the **Upload** button.\n\n### 3. Run the Server\n\n1.  Open a terminal and navigate to the root directory of the project.\n2.  Install the required Node.js packages by running:\n    ```bash\n    npm install\n    ```\n3.  Start the server:\n    ```bash\n    node server.js\n    ```\n    The server will automatically look for the Arduino and connect to it. You should see a confirmation message in the terminal.\n\n### 4. View the Visualization\n\n1.  Once the server is running, open a web browser and navigate to:\n    [http://localhost:3000](http://localhost:3000)\n2.  The visualization should appear in its `IDLE` state. You can press the `v` key to toggle the controls panel.\n\n## How It Works\n\nThe system operates on a simple state machine driven by the Arduino:\n\n1.  **IDLE:** The visualization is in a calm, ambient state. The Arduino waits for the GSR sensor reading to pass a certain threshold, which indicates a user is touching it.\n2.  **DETECTING \u0026 MEASURING:** Once a user's touch is detected for 2 continuous seconds, the Arduino sends a `0` to the server. The frontend enters the `MEASURING` state, changing the visuals to indicate that data is being collected. This phase lasts for 15 seconds.\n3.  **RESULT:** After 15 seconds, the Arduino calculates the average GSR value and sends it to the server. The frontend receives this value and transitions to the `RESULT` state, displaying a unique, static visualization based on the data. The final score is also displayed at the bottom of the screen.\n4.  **COOLDOWN:** The system remains in the `RESULT` state for 40 seconds, after which it automatically transitions back to the `IDLE` state, ready for the next interaction.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchanulee%2Fcupid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchanulee%2Fcupid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchanulee%2Fcupid/lists"}