{"id":15314670,"url":"https://github.com/unframework/tintty","last_synced_at":"2025-10-09T00:32:29.311Z","repository":{"id":49613349,"uuid":"103228754","full_name":"unframework/tintty","owner":"unframework","description":"Arduino source code for the tiny touchscreen VT100 terminal emulator","archived":true,"fork":false,"pushed_at":"2020-11-15T04:36:12.000Z","size":193,"stargazers_count":47,"open_issues_count":4,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-02T08:46:49.016Z","etag":null,"topics":["arduino","console","tty"],"latest_commit_sha":null,"homepage":"https://hackaday.io/project/165821-tintty-v2-tiny-touchscreen-vt100-console","language":"C++","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/unframework.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":"2017-09-12T06:02:53.000Z","updated_at":"2024-06-08T10:38:04.000Z","dependencies_parsed_at":"2022-08-19T19:01:05.523Z","dependency_job_id":null,"html_url":"https://github.com/unframework/tintty","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unframework%2Ftintty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unframework%2Ftintty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unframework%2Ftintty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unframework%2Ftintty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unframework","download_url":"https://codeload.github.com/unframework/tintty/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235781122,"owners_count":19043929,"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","console","tty"],"created_at":"2024-10-01T08:46:37.234Z","updated_at":"2025-10-09T00:32:23.941Z","avatar_url":"https://github.com/unframework.png","language":"C++","readme":"# TinTTY\n\nTiny console terminal implemented in Arduino C.\n\n![using the Arduino-based console with touchscreen stylus](tintty-v2-usage-preview.jpg)\n\n## Prerequisites\n\n- Adafruit GFX\n- MCUFRIEND 2.4inch screen\n\n## Development\n\nTesting on Windows is easy to do from a Vagrant VM running Linux. Arduino usually exposes the USB connection as serial COM3 port, so the VM is configured to forward the COM3 port to `/dev/ttyS0` inside the Linux environment.\n\nFirst, ensure the sketch is uploaded (Vagrant will block further COM3 usage when the VM starts).\n\nStart the VM and log in.\n\n```\nvagrant up\nvagrant ssh\n```\n\nInside the Linux VM, the `/dev/ttyS0` serial port will now be accessible to talk to the Arduino board. The default baud rate is 9600, which matches the test sketch serial settings.\n\nSimple echo will not work as expected because the Uno board resets once a new connection starts. Instead, the simplest test is to use GNU Screen.\n\n```\nsudo screen /dev/ttyS0\n```\n\nKeystrokes will be sent immediately to the sketch. Screen is technically itself a serial terminal, not a host, so certain keys will not behave as expected. But simple letters should produce visual output on the TFT screen. Exit GNU screen by pressing `Ctrl-A` and typing `:quit`.\n\nA proper console test is to start a real shell session using Linux *getty*. The *getty* process continuously waits for terminal availability on a given port and spawns a new login shell when the device is ready for display.\n\nBecause the Arduino has to spend some time booting and setting up, the sketch emits a CR character once it boots, which lets *getty* wake up and prompt for login. We use the *getty* `--wait-cr` option to make it wait for that code.\n\n```\nsudo su -c '/sbin/getty -L --wait-cr ttyS0' \u0026\n```\n\nSome extra notes on launching *getty*:\n\n\u003e The *getty* process should not interact with the shell that spawns it, so we launch it in the background. It is important that the *getty* process is detached from the current ssh session, otherwise the login shell does not get assigned the serial device as its controlling terminal. If that happens, we see a warning like `-bash: cannot set terminal process group` because two login shells now try to control the same device - the original ssh and the new *getty*-spawned one. The *su* command helps perform that detachment.\n\nInside the console, once logged-in, run the sizing command, since the screen is non-standard:\n\n```\nstty rows 16 columns 21\n```\n\nThen just log out from the shell. If the login did not work, to terminate *getty* from the original root shell, just do a normal `kill [pid]` command - it still responds to external SIGTERM.\n\n## References\n\nExisting AVR-based implementation as initial inspiration:\n\n- https://github.com/mkschreder/avr-vt100 (and updated version https://bitbucket.org/scargill/experimental-terminal/src)\n\nGeneral VT100/ANSI docs:\n\n- http://vt100.net/docs/vt100-ug/chapter3.html\n- http://vt100.net/docs/vt220-rm/chapter4.html\n- https://www.gnu.org/software/screen/manual/html_node/Control-Sequences.html#Control-Sequences\n- https://en.wikipedia.org/wiki/ANSI_escape_code#Colors\n\nOther interesting implementations I found:\n\n- http://www.msarnoff.org/terminalscope/ (https://github.com/74hc595/Terminalscope)\n- https://madresistor.com/diy-vt100/ (https://gitlab.com/madresistor/diy-vt100-firmware)\n- http://geoffg.net/terminal.html\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funframework%2Ftintty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funframework%2Ftintty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funframework%2Ftintty/lists"}