Turn-key PCB assembly services in prototype quantities or low-volume to mid-volume production runs

How to make Arduino run multiple tasks

Microcontroller on Arduino is usually Atmega328p which has very limited resources like 32K of Flash and 2K of RAM. Trying to run RTOS or any other real time operating system doesn’t make sense. It is possible, but not forth and it is not effective. But if you sill want to run multiple tasks on Arduino there is a way out. Adafruit walks us through simple tricks how to implement your own real time scheduler. The idea they are talking about is not RTOS, but state machine. All you have to do is to keep an eye on Arduino internal clock which counts miliseconds (returned by millis() function) from program start. Each separate task is considered to be separate state machine which keeps track of time. Once its time comes – it executes task and goes low until its time comes again. This way there is no problem to run many tasks like blinking LEDs at different rate or turning servo motors at different rates and angles. Once you get used to it, you can go further and create object oriented… Continue reading

Mini arcade machine on AVR Atmega328p

Do you remember yourself sitting by one of these arcade machines and playing games like Space Invaders? Well these were really popular before PC’s took over. But still they are available in many public areas and seem to be popular. Put a coin and get ready. I see one major advantage of arcade machines – they are designed to be convenient to play with few handy controls and big screen in front of you. But don’t get too comfortable because arcade machine may be very tiny so you can step on it without noticing. Actually this project tries to mimic real arcade machine. It is built around AVR Atmega328p microcontroller and 1.5 inch OLED display. Machine runs on RTOS so called FunkOS that is specially designed for low resource microcontrollers. Currently mini arcade machine allows playing Tetris, Space Invaders and Breakout. Keep eyes on it there is more to come. Continue reading