I've been working on my robot, and after messing up a shield, i'm taking the time to rethink how i'm controlling the robot. It has a servo arm and a 4 wheel drive as well as various sensors, but I was wondering if it would be better to control through trying to learn how to multitask one board, or just using multiple boards on it to make it able to move around and its arm at the same time from a controller. I already installed a second arduino uno with a new shield, but I wanted to know if it was better to just multitask, or if it's even possible.
DaveX
February 20, 2024, 2:31pm
2
Yes, it would be better to learn to multitask on one board.
These are some good starting points:
The venerable BlinkWithoutDelay example is common, but look at the different ways folks multitask BWOD:
Introduction
A common question is to ask how to flash 2 (or more) LEDs at the same time. Typically the person asking will be using delay and will be experiencing the main problem with delay: it blocks and stops anything else from happening.
This tutorial contains several different approaches to the problem of flashing 2 or more LEDs at the same time with independent timing for each LED. The basic principles for each can all be adapted for other situations requiring multiple timers working inde…
NOTE for newcomers. The demo is entirely contained in this Post and Reply #1. There is no need to read further unless you are interested. ...added 25Sep2014
There have been a few occasions recently where newcomers seemed to have difficulty applying the "blink without delay" and "state" concepts to a sketch that is intended to manage a number of concurrent actions.
Its very time consuming to respond with suitable code examples - particularly as every case is a little different.
I have prepared…
Once you have mastered the basic blinking leds, simple sensors and buzzing motors, it’s time to move on to bigger and better projects. That usually involves combining bits and pieces of simpler sketches and trying to make them work together. The...
A nice top-down design is:
From what I can see there are many tutorials about doing specific tasks with an Arduino but I have not come across any that guide a newcomer through the process of planning and implementing a program to make it easy to understand and debug.
The following 9 posts in this Thread are an attempt to fill that gap.
...R
1 Like
system
Closed
August 18, 2024, 2:31pm
3
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.