ATtiny 85 Programmable Shield for Arduino Uno R3 Made by Jandre Snijman 16 June 2024
// Define the pin where the LED is connected
#define LED_PIN 0
void setup() {
// Set the LED pin as an output
pinMode(LED_PIN, OUTPUT);
}
void loop() {
// Turn the LED on (HIGH is the voltage level)
digitalWrite(LED_PIN, HIGH);
// Wait for a second
delay(1000);
// Turn the LED off by making the voltage LOW
digitalWrite(LED_PIN, LOW);
// Wait for a second
delay(1000);
}
setup() function, we set the LED pin as an output.loop() function, we turn the LED on, wait for one second, turn it off, and wait for another second. This cycle repeats indefinitely.To upload the code to your ATtiny85, follow these steps:
Install ATtiny Board Package:
File > Preferences.Additional Boards Manager URLs field, add this URL: https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json.OK.Select ATtiny85 Board:
Tools > Board > Boards Manager.attiny by David A. Mellis package.ATtiny25/45/85 from the Tools > Board menu.ATtiny85 under Tools > Processor.8 MHz (internal) under Tools > Clock.Programmer:
Arduino as ISP under Tools > Programmer.Upload the Code:
Tools > Burn Bootloader to set the fuses.Upload button.This setup should get your LED blinking on pin 0 of your ATtiny85.

©Chemcool Electronics Privacy Policy