ATtiny is a super cheap, low power, Arduino compatible microcontroller. This repository contains all of the technical info and code necessary to complete the "Shrinking the Arudino: Introduction to ATtiny" workshop. It is a result of me sifting through and gathering my favorite tools and information for programming the Atmel ATtiny84/85 with the Arduino IDE. If you feel that I missed something important or did something stupid, feel free to send a pull-request, message, or issue.
Previous:
- Eastern Bloc in Montreal, QC
Coming soon:
- Beakerhead in Calgary, AB
- TBA in Lethbridge, AB
- ATtiny84A-20PU
- CR2032
- 20mm Battery Holder
- Simple Vibration Switch
- RGB LED (I'm using 5mm diffused common anode)
- 220 Ohm 1/4 watt resistor
- 8 pin DIP socket
- Female header
- 10uF Capacitor
- Arduino UNO (for programming)
- probably some wire scraps
- 6 jumper wires
- probably a bread board
- Soldering iron, solder, wire snips, hot glue
- Install the arduino-tiny core and copy relevant board information from "Prospective Boards.txt" to "boards.txt". Start with ATtiny84 @ 8MHz (internal, no BOD) and any others you want (probably also 1Mhz internal)
- Breadboard the ATtiny circuit according to schematic
- Upload file/examples/ArduinoISP to UNO. Connect ATtiny RESET, MOSI, MISO, SCK to UNO pins 10, 11, 12, 13 respectively. Connect VCC to UNO 3.3V and GND to GND and place a 10uF capacitor across RESET and GND on UNO.
- Choose tools/boards/ATtiny84 @ 8MHz (internal, no BOD) (or the chip you are using)
- Select UNO COM port
- Select tools/programmer/Arduino as ISP
- Tools/Burn Bootloader (first time only or when changing frequency or BOD)
- Upload your code (if you get an error that starts with: "avrdude: please define PAGEL and BS2" you can ignore it - It's possible to get rid of it but a huge pain and not necessary)
- Solder your circuit
If you choose to include female header on your circuit, you can reprogram the ATtiny without removing it. Probably best to disconnect the battery and power with 3.3V from UNO.
- arduino-tiny core
- Alternate core and tutorial by MIT high-low tech
- Great info on AVR interrupts & sleep
- Specific to ATtiny - pin change interrupt, down to 500nA!
- Make Magazine ATtiny intro
- Quick prototyping, forum, & modified libraries: Digispark
- Watchdog timer-based sleep/interrupt: H2OhNo! Tutorial
- Chip info & datasheets: Atmel tinyAVR
- AVR fuse calculator
- Paperduino
- Usb Bootloader on DigiSpark & Paperduino: micronucleus
- TinyTX
- Pre-built sensor code: TinyTX github