{"id":16099223,"url":"https://github.com/ivan-alone/tinyir","last_synced_at":"2026-05-18T01:02:48.006Z","repository":{"id":170044217,"uuid":"334508833","full_name":"Ivan-Alone/TinyIR","owner":"Ivan-Alone","description":"Samsung IR Protocol decoder written for ATTiny13 and MicroCore","archived":false,"fork":false,"pushed_at":"2021-01-31T08:11:02.000Z","size":141,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-05T22:44:30.510Z","etag":null,"topics":["arduino","arduino-library","attiny","attiny13","attiny13a","ir","protocol","samsung"],"latest_commit_sha":null,"homepage":"","language":"C","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/Ivan-Alone.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}},"created_at":"2021-01-30T20:51:43.000Z","updated_at":"2023-08-29T20:30:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"d6bf9d7d-0f87-4a4a-ab85-0601a3fee3cf","html_url":"https://github.com/Ivan-Alone/TinyIR","commit_stats":null,"previous_names":["ivan-alone/tinyir"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Ivan-Alone/TinyIR","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ivan-Alone%2FTinyIR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ivan-Alone%2FTinyIR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ivan-Alone%2FTinyIR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ivan-Alone%2FTinyIR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ivan-Alone","download_url":"https://codeload.github.com/Ivan-Alone/TinyIR/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ivan-Alone%2FTinyIR/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263868247,"owners_count":23522317,"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-library","attiny","attiny13","attiny13a","ir","protocol","samsung"],"created_at":"2024-10-09T18:26:22.641Z","updated_at":"2026-05-18T01:02:37.973Z","avatar_url":"https://github.com/Ivan-Alone.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TinyIR\nSamsung IR Protocol decoder written for ATTiny13 and MicroCore.\n\n### [Download](https://github.com/Ivan-Alone/TinyIR/raw/main/TinyIR.zip)\n\n## Information and requirements:\nExamples of resulting sizes:\n- Empty MicroCore project: 142 bytes memory, 4 bytes RAM\n- MicroCore project with just included TinyIR: 220 bytes memory, 20 bytes RAM\n- MicroCore project with TinyIR and checking 1 IR code: 798 bytes memory, 20 bytes RAM\n- MicroCore project with TinyIR and checking 4 IR codes: 862 bytes memory, 20 bytes RAM\n\nYou **must** enable **micros()** in your project. Clocking frequency is not important, but must be more than 38 kHz (carrier frequency of IR Sensor).\n\nThis library using hardware interrupt **INT0** on **PB1** pin on **ATTiny13**, you CAN'T connect IR Receiver to other pin.\n\n## Sensor Connection\n![Connection Diagram](https://raw.githubusercontent.com/Ivan-Alone/TinyIR/main/tinyir_connection.png)\n\n## Functions: \n```C++\nvoid IR_Init();\n```\n\nMust be called in setup() function. Initialize **INT0** on **PB1**, thats doing all data receiving and processing functions.\n\n```C++\nbool IR_CheckCode(uint32_t code);\n```\n\nChecking receivced code. Returns **TRUE** if code was received. Can be used in loop, in constuction like:\n\n```C++\nif (IR_CheckCode(0x7070FF00) {\n    // Doing some stuff when 0x7070FF00 code received\n}\n```\n\n## Configuration\nYou can reduce memory usage used by this library! We have 2 configuration constants. All those constants **MUST** be defined **BEFORE** including TinyIR. Take care - you CAN'T edit this settigs in your code logic - it's *hard* settigns, that applies on compiling stage.\n\n```C++\n#define TinyIR_NO_ACCURATE_DECODING\n```\n\nDisables accurate decoding. Samsung remote control sends impulse ~1640 μS long for \"1\" bit value, and ~500 μS long for \"0\". Using disabled accurate decoding we don't check lenght of \"0\" impulse (checking just lenght of \"1\" impulse), so we can reduce memory usage for 20-22 bytes in ROM.\n\n```C++\n#define TinyIR_DISABLE_REPEAT\n```\n\nSome remote control that uses Samsung protocol doesn't resend code if button is hold. Those RC sends some \"repeat code\", that can be decoded in 0x0 or 0x1. So, if we don't need hold tracking, or our RC sends real codes if button is hold, we can disable decoding of repeat codes, that can reduce memory usage for 112-114 bytes in ROM.\n\nRemember - some RC sends \"repeat codes\", some sends real code (RC from Samsung TV does that, f.e.)\n\n## Example\n\n```C++\n// Disable accurate decoding\n#define TinyIR_NO_ACCURATE_DECODING \n// Disable repeat decoding\n#define TinyIR_DISABLE_REPEAT\n\n#include \u003cTinyIR.h\u003e\n\n\nint8_t horisontalOffset = 0;\nint8_t verticalOffset = 0;\n\n#define KEY_UP    0x7070FF00\n#define KEY_DOWN  0x707055AA\n#define KEY_LEFT  0x70700000\n#define KEY_RIGHT 0x70700FF0\n\n\nvoid setup() {\n  IR_Init();\n}\n\nvoid loop() {\n  if (IR_CheckCode(KEY_UP)) { // If KEY_UP pressed, do things: \n    verticalOffset++;\n  }\n  if (IR_CheckCode(KEY_DOWN)) {\n    verticalOffset--;\n  }\n  if (IR_CheckCode(KEY_LEFT)) {\n    horisontalOffset--;\n  }\n  if (IR_CheckCode(KEY_RIGHT)) {\n    horisontalOffset++;\n  }\n}\n```\n\nThis code will take: 784 bytes in ROM, 18 bytes RAM. Very *tiny*, I think.\n\n## Resume\nI hope this library will useful. I can't find good libraries/examples of IR for ATTiny before, so I wrote own.\n\nEnjoy ;)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivan-alone%2Ftinyir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivan-alone%2Ftinyir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivan-alone%2Ftinyir/lists"}