conversion from pointer type 'const char (*)[2]' to arithmetic type 'int' in a c

Hi, im new on arduino and i have this problem and i cant fix.

Arduino:1.8.7 (Windows Store 1.8.15.0) (Windows 10), Tarjeta:"Arduino/Genuino Uno"

C:\Users\vipal\Documents\Arduino\sketch_sep18a\sketch_sep18a.ino: In function 'void loop()':

C:\Users\vipal\Documents\Arduino\sketch_sep18a\sketch_sep18a.ino:195:20: warning: invalid conversion from 'const char*' to 'char' [-fpermissive]

pulsar_elemento("1");

^

C:\Users\vipal\Documents\Arduino\sketch_sep18a\sketch_sep18a.ino:329:6: note: initializing argument 1 of 'void pulsar_elemento(char)'

void pulsar_elemento(char num_color)

^

C:\Users\vipal\Documents\Arduino\sketch_sep18a\sketch_sep18a.ino:199:24: warning: invalid conversion from 'const char*' to 'char' [-fpermissive]

verificar_secuencia("1");

^

C:\Users\vipal\Documents\Arduino\sketch_sep18a\sketch_sep18a.ino:239:6: note: initializing argument 1 of 'void verificar_secuencia(char)'

void verificar_secuencia(char color)

^

C:\Users\vipal\Documents\Arduino\sketch_sep18a\sketch_sep18a.ino:207:20: warning: invalid conversion from 'const char*' to 'char' [-fpermissive]

pulsar_elemento("2");

^

C:\Users\vipal\Documents\Arduino\sketch_sep18a\sketch_sep18a.ino:329:6: note: initializing argument 1 of 'void pulsar_elemento(char)'

void pulsar_elemento(char num_color)

^

C:\Users\vipal\Documents\Arduino\sketch_sep18a\sketch_sep18a.ino:211:24: warning: invalid conversion from 'const char*' to 'char' [-fpermissive]

verificar_secuencia("2");

^

C:\Users\vipal\Documents\Arduino\sketch_sep18a\sketch_sep18a.ino:239:6: note: initializing argument 1 of 'void verificar_secuencia(char)'

void verificar_secuencia(char color)

^

C:\Users\vipal\Documents\Arduino\sketch_sep18a\sketch_sep18a.ino:219:20: warning: invalid conversion from 'const char*' to 'char' [-fpermissive]

pulsar_elemento("3");

^

C:\Users\vipal\Documents\Arduino\sketch_sep18a\sketch_sep18a.ino:329:6: note: initializing argument 1 of 'void pulsar_elemento(char)'

void pulsar_elemento(char num_color)

^

C:\Users\vipal\Documents\Arduino\sketch_sep18a\sketch_sep18a.ino:223:24: warning: invalid conversion from 'const char*' to 'char' [-fpermissive]

verificar_secuencia("3");

^

C:\Users\vipal\Documents\Arduino\sketch_sep18a\sketch_sep18a.ino:239:6: note: initializing argument 1 of 'void verificar_secuencia(char)'

void verificar_secuencia(char color)

^

C:\Users\vipal\Documents\Arduino\sketch_sep18a\sketch_sep18a.ino: In function 'void pulsar_elemento(char)':

C:\Users\vipal\Documents\Arduino\sketch_sep18a\sketch_sep18a.ino:335:6: warning: invalid conversion from 'const char*' to 'int' [-fpermissive]

case "1":;

^

sketch_sep18a:335:6: error: conversion from pointer type 'const char (*)[2]' to arithmetic type 'int' in a constant-expression

C:\Users\vipal\Documents\Arduino\sketch_sep18a\sketch_sep18a.ino:349:6: warning: invalid conversion from 'const char*' to 'int' [-fpermissive]

case "2":

^

sketch_sep18a:349:6: error: conversion from pointer type 'const char (*)[2]' to arithmetic type 'int' in a constant-expression

C:\Users\vipal\Documents\Arduino\sketch_sep18a\sketch_sep18a.ino:363:6: warning: invalid conversion from 'const char*' to 'int' [-fpermissive]

case "3":

^

sketch_sep18a:363:6: error: conversion from pointer type 'const char (*)[2]' to arithmetic type 'int' in a constant-expression

exit status 1
conversion from pointer type 'const char (*)[2]' to arithmetic type 'int' in a constant-expression

Este reporte podría tener más información con
"Mostrar salida detallada durante la compilación"
opción habilitada en Archivo -> Preferencias.

There's a handy-dandy link at the top of every forum page titled: Read this before posting a programming question ...

Despite this rather obvious title, you appear to have either not read the post or ignored the advice it contains. Please (re)read it now. Pay particular attention to Item #6 which tell you how to post your code using CODE TAGS. Also, type 'ctrl-t' in the Arduino IDE to format you code with proper indentations.

Doing these things will make your posts and code much more readable. Remember, you're asking people on the forum to help you for FREE. The easier you make it for them, the more inclined they will be to do so. On the other hand, ignoring the well-documented forum guidelines displays a disrespect that will discourage people from helping you.

For something like this:

verificar_secuencia("3");

try:

verificar_secuencia((char *) "3");

The problem is that the prototype for the verificar_sequencia() function is written similar to:

verificar_sequencia(char *msg);

However, since you are passing a string constant (e.g., "3"), that constant looks like a const char *, so there's a type mismatch on the function parameter. A few IDE's ago, this was not flagged as an error, but the latest compiler does.

You are passing a string to a function that is expecting a char.
If you use single quotes when calling the functions it should work.

Eg.
Change:
pulsar_elemento("2");
To:
pulsar_elemento('2');

Also your switch statement will need changing to use single quotes aswell.
Alternatively you could also just use 8 bit integers by using something like 'unsigned char' or 'byte'