mBlock makes it easy to do simple state machine type applications like this.
You drag and drop functional blocks into design area of mBlock, and config,
like delays, pin numbers, etc..
So here is rough design :
When it powers up all LEDs turned off. Above delay or speed of sequence set in secs, and
for fade routine delay between each brightness reduction increment.
Then 4 simple subroutines created to handle the total desired patterns/functionality.
One to chk button pressed then released which triggers sequence, ButtChk. Next
SeqLEDs creates the LEDs one thru 5 being turned on in a sequence. Next BurstLED6
to create flashing burst of LED 6 turn on. Last the fade routine for LED 6.
Rest of routines look like :
What mBlock does is turn these user block configurations into Arduino code, and then
programs the dev board. Use a Arduino Nano board to develop / alter this code, and
then to program Arduino chip of choice, board is ~ $2.50. Or just use the Nano board as so-
lution. Note Nano board has excellent stable timing for delays and this sequencing,
has onchip regulator, and connects to PC thru simple USB interface to develop code
with mBlock and program it.
lots of fun, easy to program basic stuff, kids in 6'th grade on using mBlock to program robots.
mBlock is free, just download it.
https://www.mblock.cc/en/
Once you learn this, many videos on net, YouTube, there are many other block programming
languages, very similar. Here is a couple of examples :
Often users, developers, hobbyists need timed and qualified event generators, many resorting to 555 timers and the like. The venerable 555 has had a long run but its limited in accuracy and capability. This approach uses block language to create...
www.electro-tech-online.com
Talking volt/freq/pw meter :
Micro design has for years relied on ASM and C programming and other languages. Often many tasks are fairly simply but these tools were focused and quite a learning curve, especially ASM and C and C++. There are a number of new GUI based tools that essentially take out the "strong typing"...
Attached is this first pass at your design you can look at.
Last you can draw ~ 40 mA from each pin for LEDs but use a series with each LED to limit
current. Note total current cannot exceed 200 mA though total part current. I recommend
10 mA to design to per LED.
Regards, Dana.