{"id":15066506,"url":"https://github.com/amid68/led-blinking-with-serial-communication","last_synced_at":"2026-01-04T09:07:01.974Z","repository":{"id":256188448,"uuid":"851606993","full_name":"Amid68/LED-Blinking-with-Serial-Communication","owner":"Amid68","description":"A basic \"Hello, World!\" project in Arduino","archived":false,"fork":false,"pushed_at":"2024-09-09T12:07:30.000Z","size":1082,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-21T23:59:27.289Z","etag":null,"topics":["arduino","hello-world"],"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/Amid68.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":"2024-09-03T12:04:48.000Z","updated_at":"2024-09-09T12:07:33.000Z","dependencies_parsed_at":"2024-09-09T13:59:42.547Z","dependency_job_id":null,"html_url":"https://github.com/Amid68/LED-Blinking-with-Serial-Communication","commit_stats":null,"previous_names":["amid68/led-blinking-with-serial-communication"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amid68%2FLED-Blinking-with-Serial-Communication","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amid68%2FLED-Blinking-with-Serial-Communication/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amid68%2FLED-Blinking-with-Serial-Communication/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amid68%2FLED-Blinking-with-Serial-Communication/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Amid68","download_url":"https://codeload.github.com/Amid68/LED-Blinking-with-Serial-Communication/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225820210,"owners_count":17529139,"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","hello-world"],"created_at":"2024-09-25T01:08:45.457Z","updated_at":"2026-01-04T09:07:01.934Z","avatar_url":"https://github.com/Amid68.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LED Blinking with Serial Communication\n\n## Description\nThis repository contains two versions of a basic project that blinks an LED connected to pin 8 and sends \"Hello, World!\" over the serial port every second:\n- **Arduino IDE version**: Uses the Arduino framework and libraries for easy development.\n- **Embedded C version**: Written in pure C, using AVR registers and timers directly for accurate timing and serial communication.\n\n## Project Setup\n![Project Setup](assets/setup.jpg)\n\n## Hardware Requirements\n- Arduino board\n- LED and 220Ω resistor\n- 2 Jumper wires\n- Breadboard\n\n## Files in the Repository\n\n### Arduino Version\n- **Path**: `arduino/hello_world/hello_world.ino`\n- **Description**: This is the original Arduino IDE project. It blinks an LED connected to pin 8 and sends \"Hello, World!\" over the serial port every second using Arduino libraries.\n\n### Embedded C Version\n- **Path**: `src/`\n- **Description**: This version uses AVR libraries and timers in pure C for the same functionality. No Arduino-specific libraries are used.\n  - `src/main.c`: Main logic file.\n  - `src/usart/usart.c` and `usart.h`: Handles serial communication using USART.\n  - `src/timer/timer.c` and `timer.h`: Handles Timer1 for LED blinking.\n  - `src/delay/delay.c` and `delay.h`: Provides accurate delay using Timer0.\n\n## How to Use\n\n### Arduino IDE Version\n1. Connect the LED and resistor in series between pin 8 and ground.\n2. Open the `arduino/sketch/hello_world.ino` file in the Arduino IDE.\n3. Select the correct board and port from the **Tools** menu.\n4. Upload the code to your Arduino board.\n5. Open the Serial Monitor at 9600 baud to see the \"Hello, World!\" message.\n\n### Embedded C Version (Pure C)\n\n#### Prerequisites\n- **GNU AVR Toolchain**: Make sure `avr-gcc`, `avr-libc`, and `avrdude` are installed.\n- **Make**: For building the project using a `Makefile`.\n\n#### Compilation and Upload Steps\n1. Connect the LED and resistor in series between pin 8 and ground.\n2. Clone or download the repository and navigate to the root directory.\n3. **Modify the Makefile**: Open the `Makefile` and update the `AVRDUDE_PORT` line to use the correct port for your system.\n   - For **macOS**, the port may look like `/dev/cu.usbserial-xxxx`.\n   - For **Linux**, it could be `/dev/ttyUSB0` or `/dev/ttyACM0`.\n   - For **Windows**, it might be `COMx` (where `x` is the COM port number).\n   \n   Example:\n   ```makefile\n   AVRDUDE_PORT = /dev/ttyUSB0  # Update this to match your system\n   ```\n\n4. Run the following commands to compile and upload the program:\n\n   ```bash\n   make clean        # Clean any previous build files\n   make              # Compile the project and generate the .hex file\n   make upload       # Upload the compiled .hex file to your Arduino board\n   ```\n\n5. Open your serial terminal or the Arduino IDE Serial Monitor at 9600 baud to see the \"Hello, World!\" message being printed every second.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famid68%2Fled-blinking-with-serial-communication","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famid68%2Fled-blinking-with-serial-communication","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famid68%2Fled-blinking-with-serial-communication/lists"}