How to change LED Patterns using one button-11-LED!! 16-Pattern.LED-Arduino Project!!!

preview_player
Показать описание
Creating videos is to improve my a bit of knowledge of Arduino. Are there any mistakes or doubts you can comment to correct! Hope you like it and hope it is useful for some need!

Рекомендации по теме
Комментарии
Автор

Thank u this is what iam looking patterns ❤

aurharananase
Автор

Hi, quick question: Do you have a wiring diagram and which parts are needed ?

matthiash.
Автор

Mode 1 but 10 LEDs (One RED and One Green when begins)


int AM1 = 2;
int AM2 = 3;
int AM3 = 4;
int AM4 = 5;
int AM5 = 6;
int AM6 = 7;
int AM7 = 8;
int AM8 = 9;
int AM9 = 10;
int AM10 = 11;
int button= 12;
int A= 0;
int B = 0;
int count = 0;

void setup() {
// put your setup code here, to run once:
pinMode (2, OUTPUT);
pinMode (3, OUTPUT);
pinMode (4, OUTPUT);
pinMode (5, OUTPUT);
pinMode (6, OUTPUT);
pinMode (7, OUTPUT);
pinMode (8, OUTPUT);
pinMode (9, OUTPUT);
pinMode (10, OUTPUT);
pinMode (11, OUTPUT);
pinMode (12, INPUT);
}
void loop () {
// put your setup code here, to run repeatedly:
A= digitalRead(button);
if (A!=B) {
if(A==HIGH){
count++; }
}
B=A;
if (count==1) {
digitalWrite (2, 1);}
if (count==2) {
digitalWrite (3, 1);}
if (count==3) {
digitalWrite (4, 1);}
if (count==4) {
digitalWrite (5, 1);}
if (count==5) {
digitalWrite (6, 1);}
if (count==6) {
digitalWrite (7, 1);}
if (count==7) {
digitalWrite (8, 1);}
if (count==8) {
digitalWrite (9, 1);}
if (count==9) {
digitalWrite (10, 1);}
if (count==10) {
digitalWrite (11, 1);}
if (count==11) {
count= 0;
digitalWrite (2, 0);
digitalWrite (3, 0);
digitalWrite (4, 0);
digitalWrite (5, 0);
digitalWrite (6, 0);
digitalWrite (7, 0);
digitalWrite (8, 0);
digitalWrite (9, 0);
digitalWrite (10, 0);
digitalWrite (11, 0);
}
}

alexbarces
Автор

The code can be shortened by For Loops.

shahirmostafa
Автор

Do you do this with timer interrupts? I couldn't do it with if‚else, switch case, commands, can you help me?

fatihylmaz
Автор

How do you make an animated on and off button for the lights?

pughjr
Автор

Thanks for sharing such an Awesome project.
Can you please add one more feature to this
by storing the different selected sequence patterns to Arduino eeprom memory by same push button to be automatically displayed on power up.
Awaiting your earliest response. Thanks & kind regards.

yawarsaeed
Автор

Nice video. can you make it run on ATTINY84 chip?

mikes
Автор

There's no "how" in this video whatsoever.

EightiesTV
Автор

i came here for code and i see bullshit

Nioeer
Автор

I am getting these messages, can you help?
In function 'void loop()':
error: 'pattern1' was not declared in this scope
pattern1();

note: suggested alternative: 'extern'
pattern1();

extern
error: 'pattern2' was not declared in this scope
pattern2();

note: suggested alternative: 'atan2'
pattern2();

atan2
error: 'pattern3' was not declared in this scope
pattern3();

note: suggested alternative: 'extern'
pattern3();

extern
error: 'pattern4' was not declared in this scope
pattern4();

note: suggested alternative: 'extern'
pattern4();

extern
error: 'pattern5' was not declared in this scope
pattern5();

note: suggested alternative: 'extern'
pattern5();

extern
error: 'pattern6' was not declared in this scope
pattern6();

note: suggested alternative: 'extern'
pattern6();

extern
error: 'pattern7' was not declared in this scope
pattern7();

note: suggested alternative: 'extern'
pattern7();

extern
error: 'pattern8' was not declared in this scope
pattern8();

note: suggested alternative: 'extern'
pattern8();

extern
error: 'pattern9' was not declared in this scope
pattern9();

note: suggested alternative: 'extern'
pattern9();

extern
error: 'pattern10' was not declared in this scope
pattern10();

error: 'pattern11' was not declared in this scope
pattern11();

error: 'pattern12' was not declared in this scope
pattern12();

error: 'pattern13' was not declared in this scope
pattern13();

error: 'pattern14' was not declared in this scope
pattern14();

error: 'pattern15' was not declared in this scope
pattern15();

error: 'pattern16' was not declared in this scope
pattern16();

error: 'pattern17' was not declared in this scope
pattern17();

error: a function-definition is not allowed here before '{' token
{
^
error: a function-definition is not allowed here before '{' token
{
^
error: a function-definition is not allowed here before '{' token
{
^
error: a function-definition is not allowed here before '{' token
{
^
error: a function-definition is not allowed here before '{' token
{
^
error: a function-definition is not allowed here before '{' token
{
^
error: a function-definition is not allowed here before '{' token
{
^
error: a function-definition is not allowed here before '{' token
{
^
error: a function-definition is not allowed here before '{' token
{
^
error: a function-definition is not allowed here before '{' token
{
^
error: a function-definition is not allowed here before '{' token
{
^
error: a function-definition is not allowed here before '{' token
{
^
error: a function-definition is not allowed here before '{' token
{
^
error: a function-definition is not allowed here before '{' token
{
^
error: a function-definition is not allowed here before '{' token
{
^
error: a function-definition is not allowed here before '{' token
{
^
error: a function-definition is not allowed here before '{' token
{
^
error: expected '}' at end of input
}
^

exit status 1

Compilation error: 'pattern1' was not declared in this scope

ben-zzrm
welcome to shbcf.ru