{"id":16951223,"url":"https://github.com/mischnic/arduinosimulator","last_synced_at":"2026-04-24T22:32:45.686Z","repository":{"id":66273962,"uuid":"84738483","full_name":"mischnic/ArduinoSimulator","owner":"mischnic","description":"A minimal Arduino simulator with ncurses \"GUI\"","archived":false,"fork":false,"pushed_at":"2017-10-02T20:20:16.000Z","size":112,"stargazers_count":0,"open_issues_count":10,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-26T02:41:47.374Z","etag":null,"topics":["arduino","ncurses","simulation"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mischnic.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-03-12T16:03:08.000Z","updated_at":"2018-12-19T18:14:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"61a1b9ac-5f4c-41a2-92fb-d7838a514980","html_url":"https://github.com/mischnic/ArduinoSimulator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mischnic/ArduinoSimulator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mischnic%2FArduinoSimulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mischnic%2FArduinoSimulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mischnic%2FArduinoSimulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mischnic%2FArduinoSimulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mischnic","download_url":"https://codeload.github.com/mischnic/ArduinoSimulator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mischnic%2FArduinoSimulator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32243302,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"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":["arduino","ncurses","simulation"],"created_at":"2024-10-13T21:59:38.585Z","updated_at":"2026-04-24T22:32:45.674Z","avatar_url":"https://github.com/mischnic.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ArduinoSimulator\nA minimal Arduino simulator with ncurses \"GUI\"\n\nRun `make` to build the dynamic library\n\nSee [ArduinoSimulatorExample](https://github.com/mischnic/ArduinoSimulatorExample) for how to use it\n\nUses code from https://github.com/arduino/Arduino and https://github.com/damellis/attiny\n\n![screenshot](screenshot.png)\n\n# Usage\n\n- `w` = Start/stop\n- `e` = Start paused/(un)pause\n- `q` = Quit\n\nPressable Buttons have a background color.\nWhen changing a analog input voltage, the simulation will be paused, valid formats are:\n\n- a voltage: `2v` `2V` `3.1V` ...,\n- an integer ranging from 0-1023 (0 = 0V, 1023 = VCC)\n\n\nSpeed:\n\n- normal click for +1 / -1\n- double click for twice / half\n\n\n# API\n\nYou **need** this line at the top of your sketch: `#include \"Sketch.h\"`.\n\nFor code specific to the simulator and not for real devices:\n\n    #ifdef IS_SIM\n        /* This code will only be included when using the simulator */\n    #end\n    \n\n\nTo set pin descriptions and have variables printed in the simulation window (or to have a different VCC apart from 5V), use the following:\n\n    void getState(Data *d, int id){\n        if(id \u0026 DATA_PIN){\n            if((id \u0026 DATA_MASK) == 1){ // pin 1\n                strcpy(d-\u003edesc, \"LED\");\n            }\n        } else if(id \u0026 DATA_INFO){\n            int i = 0;\n            if((id \u0026 DATA_MASK) == i++){\n                strcpy(d-\u003edesc, \"VCC\");\n                d-\u003evtype = Data::afloat;\n                d-\u003ef = 5.0f;\n            } else if((id \u0026 DATA_MASK) == i++){\n                strcpy(d-\u003edesc, \"counter\");\n                d-\u003evtype = Data::aint;\n                d-\u003ei = count;\n            } else if((id \u0026 DATA_MASK) == i++){\n                strcpy(d-\u003edesc, \"counterEven\");\n                d-\u003evtype = Data::abool;\n                d-\u003eb = count%2 == 0;\n            } else if((id \u0026 DATA_MASK) == i++){\n                strcpy(d-\u003edesc, \"counterDec\");\n                d-\u003evtype = Data::afloat;\n                d-\u003ef = count/10.0f;\n            } else if((id \u0026 DATA_MASK) == i++){\n                d-\u003evtype = Data::aMotor;\n                // MotorState::NONE ::LEFT ::RIGHT\n                d-\u003ems.dir = MotorState::Dirs(count%3);\n                // MotorState::RED ::GREEN ::WHITE\n                d-\u003ems.state =  MotorState::States((count/3)%3);\n            }\n        }\n    }\n\n\nSoftwareSerial is supported, although all SoftwareSerial instances print to the same log window. Use `-1` as pin number to recreate for example an USB serial without real pins. If you use valid pin numbers, they will be marked as `SER` in the pin listing\n\n    SoftwareSerial Serial(6, 7);\n    // OR\n    SoftwareSerial Serial(-1, -1);\n    void setup() {\n        Serial.begin(9600);\n        Serial.println(\"Setup called\");\n    }\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmischnic%2Farduinosimulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmischnic%2Farduinosimulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmischnic%2Farduinosimulator/lists"}