Giter Site home page Giter Site logo

koenvervloesem / digispark_blink_platformio Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 4 KB

PlatformIO example project to build the canonical blink code for the Digispark USB development board with an Atmel AVR ATtiny85 microcontroller

License: MIT License

Makefile 59.82% C 40.18%
atmel atmel-avr atmel-avr-microcontroller avr avr-programming attiny85 digispark digispark-usb platformio blink

digispark_blink_platformio's Introduction

Digispark Blink example for PlatformIO

Continuous integration License

This is an example project for PlatformIO to build the canonical blink code for the Digispark USB development board with an Atmel AVR ATtiny85 microcontroller.

Note

This doesn't use the Arduino framework, but directly uses the native AVR registers.

You can use this project as a template to build your own AVR code for the Digispark with PlatformIO.

Requirements

You need PlatformIO and the Atmel AVR platform in PlatformIO. You can install both with:

pip3 install platformio
pio platform install atmelavr

The Digispark runs the Micronucleus bootloader. If you've bought it recently, the bootloader is a recent version that isn't supported by PlatformIO's older micronucleus command. Therefore, you need to build the newer version of the command. On Ubuntu or Debian this goes like this:

git clone https://github.com/micronucleus/micronucleus.git
cd micronucleus/commandline
sudo apt install libusb-dev
make
sudo make install

The platformio.ini file in this example project defines a custom command to refer to the micronucleus command you've built.

Usage

Build the code with:

pio run

Build and upload the code to the Digispark with:

pio run -t upload

Plug in the device into a USB port of your computer when asked.

If you want to use this project as a template for your own projects, have a look at the GitHub Action file. It automatically builds the code on each push and pull request and checks for errors and warnings. There's also a Makefile to make checking and building code easier.

License

This project is provided by Koen Vervloesem as open source software with the MIT license. See the LICENSE file for more information.

digispark_blink_platformio's People

Contributors

koenvervloesem avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

digispark_blink_platformio's Issues

Error during `cp ./micronucleus /usr/local/bin/`

When using your installation script:

git clone https://github.com/micronucleus/micronucleus.git
cd micronucleus/commandline
sudo apt install libusb-dev
make
sudo make install

I got the following error:
cp: Das Überschreiben des Verzeichnisses '/usr/local/bin/micronucleus' mit einem Nicht‐Verzeichnis ist nicht möglich.
cp: can not overwrite a folder by an file
due to the same naming of the file and the folder.

Its comming from this part:
cp ./micronucleus /usr/local/bin/

I am wondering if this works in your system?

OK: as info I copied the git content also in /usr/local/bin :-)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.