This repository for create flashlight using ATtiny13 (DIY).
- Idea from: https://geektimes.ru/post/255004/
- For ATtiny13 support in Arduino IDE: https://github.com/MCUdude/MicroCore
- Library for interrupts support: https://github.com/NicoHood/PinChangeInterrupt
- Install ATtiny13 board support using MicroCore
- Load "ArduinoISP" example sketch
- Remove comment in line
#define USE_OLD_STYLE_WIRING - Swap comments on lines
#define SPI_CLOCK - Define baudrate 250 instead 19200
#define BAUDRATE 250 - Program Arduino
- Connect ATtiny13 to the Arduino like in picture below
- Choose ATtiny13 in Arduino IDE boards
- Choose Arduino as ISP (slow) programmer
- Burn bootloader
- Return baudrate to the programmer (19200 instead 250)
- Now you can program ATtiny13 via Arduino as ISP (not slow!) programmer
- (Don't forget to install PinChangeInterrupt library for this project!)
If it don't work - try to pullup RESET pin to the VDD via 10kOhm resistor. You don't need external pullup to the button - ATtiny have internal pullup.
This diagram shows the pinout and the peripherals of ATtiny13.
Click to enlarge:


