TVout.h error: invalid conversion from 'char' ....
hi guys, evening :-)
i trying create kind of typewriter effect tvout.h
but error when compiling: error: invalid conversion 'char' 'char*'
i guess trouble library cause serial.print got working fine.
is there work around this?
i trying create kind of typewriter effect tvout.h
but error when compiling: error: invalid conversion 'char' 'char*'
i guess trouble library cause serial.print got working fine.
is there work around this?
code: [select]
#include <tvout.h>
tvout tv;
int movevert=0;
int movehorz=0;
char mystring[]={"i wondering why complicated"};
void setup() {
tv.start_render(_pal);
serial.begin(9600);
}
void loop() {
movevert=0;
movehorz=0;
tv.clear_screen();
//working:
for (unsigned int x = 0; x < strlen(mystring); x++) {
serial.print(mystring[x]);
delay(random(200));}
serial.println(" ");
// gives error:
for (unsigned int x = 0; x < strlen(mystring); x++){
tv.print_str(movehorz,movevert,mystring[x]);
movehorz=movehorz+5;
if (movehorz >= 100) {movevert=8;movehorz=0;}
delay(random(200));
}
}
the tv.print_str function expects 3rd argument string, not single character. calling function single character, mystring
- , not string, mystring.
Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > TVout.h error: invalid conversion from 'char' ....
arduino
Comments
Post a Comment