I need to split up code which I've already developed for one micro into two different Arduinos connected by serial. The "remote" micro is directly connected to a 20x4 character LCD and the main micro will be sending it a command set to print, move cursor, etc.
My plan was to make functions that used existing code such as lcd.print("This or that"); to replace the lcd library on the main micro and send command bytes and data bytes up to the remote micro. Seems pretty straightforward.
Then I discovered that apparently lcd.print cannot be a function name. Fine, so I changed it to lcd_print(). So far, so good. But in the existing library, lcd.print accepts strings, bytes, just about anything any length. For example: lcd_print("any string of any length"); lcd_print(a_2d_array [x] [y]); lcd_print(this_byte); lcd_print(this_integer);
Now it's getting over my head. I know I can painstakingly turn a single function into many different functions, but wouldn't it be nice to replicate the functionality of the Arduino LCD library with a single command:
Then all I have to do is create the function and keep the existing code and send the bytes up to the slave micro. Wouldn't that be nice! I appreciate any thoughts. Thanks.