arduino uno led sequence with button need shematic

Reloadron

Joined Jan 15, 2015
7,891
It's not modes it's just data.Go to the chip datasheet which spells out the limits. Then consider the chip when using an Arduino comes with a pre loaded boot loader. If you load a sketch and actually read the Arduino software it tells you what you are asking:

Arduino Sketch.png

Read the bottom where it says: Done Uploading

Pretty much covers it doesn't it? Get a handle on what memory is and how it workks.

Ron
 

Thread Starter

a Rob

Joined May 14, 2017
151
on your snapshot is shows
variables user 40bytes (1%) out of dynamic memory leaving 2008 bytes etc
is that the limit value shown.

maximum 2048 bytes
 

Reloadron

Joined Jan 15, 2015
7,891
MEMORY:
There are three pools of memory in the microcontroller used on avr-based Arduino boards :

  • Flash memory (program space), is where the Arduino sketch is stored.
  • SRAM (static random access memory) is where the sketch creates and manipulates variables when it runs.
  • EEPROM is memory space that programmers can use to store long-term information.
Flash memory and EEPROM memory are non-volatile (the information persists after the power is turned off). SRAM is volatile and will be lost when the power is cycled.

The ATmega328 chip found on the Uno has the following amounts of memory:

Flash 32k bytes (of which .5k is used for the bootloader)
SRAM 2k bytes
EEPROM 1k byte

I suggest you read the above Memory link and understand the types of memory and how memory is used. This is why many sketches point out the importance of keeping the code streamlines. Don't use several lines of code where a single well written line will suffice.

Ron
 

Reloadron

Joined Jan 15, 2015
7,891
Just as a side note I mentioned this earlier and will mention it again. While playing around with individual LEDs if you enjoy this sort of stuff you should consider some RGB LEDs where you have a Red, Green and Blue LED is a single package. I bought a 16.4 foot spool (5 meters) LED spool from Amazon for about $11 USD. That was 300 of the 5050 LEDs ready for 12 volts and you just cut what you want.

The merit of 3 colors in a single package is you get to mix the colors so beyond RGB you get to make for example Red, Green, Blue, Yellow, Purple, Aqua, White as well as others simply using code. Then with that include fade in and fade out.

Ron
 

Thread Starter

a Rob

Joined May 14, 2017
151
i have the rgb strip wil try it.
by the way the car horn on drone is working good , when the horn goes of u can hear loud echo in air and people look up
 

Reloadron

Joined Jan 15, 2015
7,891
Glad you found a light enough horn. :) Neighbor used his drone to film his fireworks display for our 4th of July party. Actually worked out pretty cool.

Ron
 
Top