ATTiny85 – Small and efficient
When you are in a need to control or measure just one thing and there are no high expectations in speed or memory there is absolutely no reason to use a microcontroller like Atmega328p(the one you can find in Arduino Uno). You should consider the ATTiny85 option which offers :
- 6 I/O Pins
- 8k Flash Memory (about 6k after bootloader)
- I2C and SPI (vis USI)
- PWM on 3 pins (more possible with Software PWM)
- ADC on 4 pins
Personally I am a fan of the Digispark models but recently I bought a few really cheap clones from Aliexpress which seem to work fine in Windows OS. In Linux Mint I had issues with lsusb and after spending 1 hour trying to figure out what’s wrong I finally gave up. On the other hand in Windows 10 everything went smooth. So what you have to do is to grab the latest Arduino software from here, then go to the “File” menu and select “Preferences”.
In the box labeled “Additional Boards Manager URLs” enter: http://digistump.com/package_digistump_index.json and click OK. Go to the “Tools” menu and then the “Board” submenu – select “Boards Manager” and then from the type drop down select “Contributed”. Select the “Digistump AVR Boards” package and click the “Install”. You’ll see the download progress on the bottom bar of the “Boards Manager” window, when complete it will show “Installed” next to that item on the list. When complete the install with pop up a Driver Install Wizard window, click “Next” on this Window to install the drivers. Close the “Boards Manager” window and select the Digispark->“Digispark (Default – 16.5mhz)” in Tools→Boards menu.
Without the microcontroller plugged in write the following sketch and hit the upload button
void setup() { pinMode(1, OUTPUT); //LED on Model A } void loop() { digitalWrite(1, HIGH); delay(100); digitalWrite(1, LOW); delay(100); }
You will get a message to connect the microcontroller. Do that and in a couple of seconds you will have a blinking led. Amazing ? 🙂