avr-os: Multitasking on Arduino

Arduino is an open source prototyping platform for electronics. There is so much you can do with Arduino and the community is proof. In playing with Arduino I decided that it would be a great project to create a small multitasking library for use on AVR platforms, which includes Arduino.

A small introduction

avr-os is a library that provides a very basic rutime that enables your program to multitask.

The library uses pre-emptive multitasking to switch tasks and each task has its own stack that is restored when a task is resumed. An AVR timer is used to provide ticks and this interrupt is used to switch tasks.

avr os Multitasking on Arduino

Hello World, avr-os style

The following sketch is a basic example of how multitasking can be used in your Arduino sketches. This sketch has two tasks that continously print the task name and some information to the LCD.

It demonstrates how a task is started, how os_sleep can be used to sleep tasks, and the ability to use spinlocks.


For more detail: avr-os: Multitasking on Arduino

This Post / Project can also be found using search terms:

  • arduino multitasking
  • arduino multitasking avr
  • arduino multitasking with wifi
  • AVR Programming for Multitasking pdf
READ  Call for Arduino music at Gwendalyn Festival 2013

Leave a Comment

= 4 + 3

(Spamcheck Enabled)

Read previous post:
Arduino RFID time-clock system
Build an RFID time-clock system using Arduino

With this project you can build an RFID time-clock system to keep track of employees, children and more. Updated 18/03/2013...

Scroll to top