Menu

Code

Flashing the ATTiny85

  1. You will need to install the board in your Arduino IDE:
    Just open the board manager in the IDE and installattiny by David A Mellis. The board is the attiny85 with 16Mhz internal clock. It's recommended to use an ISP programmer, so you can avoid any bootloader, or there is a high chance that it won't fit in the attiny85.
  2. Only one external library is required, so open the Libraries Manager and install AccelStepper by Mike McCauley. More info about this library: http://www.airspayce.com/mikem/arduino/AccelStepper/

If you are advanced user you may ask why the reset pin is still active, and why are we connecting buttons and resistances to it. We use a small trick to get around this "problem", so we can use the pin as a button too. You don't have to worry about this if you copy the schematics correctly.

Digispark ATTiny85 clones

If you are planning to use one of these, you will need to install the Micronucleus Agressive bootloader from https://github.com/micronucleus/micronucleus
Digispark ATTin585 clone
It's not recommended to use these, as the upload process can get quite complicated. It randomly fails, and I've killed a few of these in the process. The firmware is too big to fit next to the normal bootloader, and the aggressive bootloader is problematic.
About the Arduino integration, you need to install the boards from here https://github.com/digistump/DigistumpArduino
And the micronucleus binary NEEDS to be upgraded, or it won't recognize the USB device. The board is the Digispark (Default - 16Mhz)
If you manage to get past all that... congratulations, they are equally stable as any other. Only the development process is problematic.

Arduino UNO, MEGA, and other versions

The code can easily run in any of these variations. You can design your own schematics and modify the code to use your ports.
Don't forget to make the following changes:

  1. Update the LED_BUILTIN port.
  2. Set USE_ANALOG_BUTTON to 0 (this is a workaround for the attiny85 and the reset port. You don't need to simulate an analog button)
  3. Update the STEPPER_4PINS to match your schematics for the stepper
  4. Update BUTTON to match your button port

MongoDB Logo MongoDB