George timmermans
  • About Me
    • Resume
    • Press releases
  • Blog
  • Projects
    • Long Range WiFi Link
    • Embedded Systems >
      • Photo Booth
      • Classroom VU meter
      • USB Media Controller
      • Weather Station
      • Arduino Swimming Pool Controller
      • GRBL Android Controller
      • Arduino Serial Driver
      • Arduino Multitasking
      • 8x8x8 LED Cube
      • Analog -> Digital Geiger Counter
    • 3D Printing >
      • Simplify3d Configuration
      • 3D print repairs
    • Home Brewing >
      • Mead Recipes >
        • Cinnamon Mead
        • Sweet Chili Mead
        • Lemon & Ginger Mead
        • Mead Liqueur
        • Honey Beer
      • Glühwein (Spiced Wine)
      • Limoncello
    • House
    • Toolmaking
    • Laser Cutting
  • Weather Cam
  • Contact

Arduino Multitasking Demo

To make most of your microprocessor a form of multitasking is required. Most people new to Arduino and C++ use the function delay() to stop execution for a certain period of time. Unfortunately this prevents the microprocessor from doing anything useful in the meantime. 

The following video is a demonstration of multitasking on the Arduino using timers and state machines. By exchanging delay() for timed events the example in the video updates the display while gathering new sensor data and populating the array that holds the last 60 readings. Even though the GUI might show a different interface at a time the other tasks are executed in the background.
The hardware used in the video:
  • Arduino Uno Rev2 
  • Chronodot RTC
  • Adafruit Monochrome 1.3" 128x64 OLED graphic display
  • DHT22 temperature/humidity sensor

Code

The code is available on my github page here.
Powered by Create your own unique website with customizable templates.
  • About Me
    • Resume
    • Press releases
  • Blog
  • Projects
    • Long Range WiFi Link
    • Embedded Systems >
      • Photo Booth
      • Classroom VU meter
      • USB Media Controller
      • Weather Station
      • Arduino Swimming Pool Controller
      • GRBL Android Controller
      • Arduino Serial Driver
      • Arduino Multitasking
      • 8x8x8 LED Cube
      • Analog -> Digital Geiger Counter
    • 3D Printing >
      • Simplify3d Configuration
      • 3D print repairs
    • Home Brewing >
      • Mead Recipes >
        • Cinnamon Mead
        • Sweet Chili Mead
        • Lemon & Ginger Mead
        • Mead Liqueur
        • Honey Beer
      • Glühwein (Spiced Wine)
      • Limoncello
    • House
    • Toolmaking
    • Laser Cutting
  • Weather Cam
  • Contact