I've been playing with my Arduio Nano now for a few day,
and i'm trying to have my serial display, display these characters ( | / - \ ) as
an indication that something is running,
but for some reason when it gets to \ it does not work.. I believe its a special character
I even tried using the decimal value of the ASCII character
my test code,
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Set the LCD I2C address
char Show[] = {"|/-\0"};
//char Show[]{'|', '/', '-','\0'};
//int Show[4] = {124,47,45,92}; // | / - \
int displaycount = 0;
void setup()
{
lcd.begin(16,2); // initialize the lcd for 16 chars 2 lines, turn on backlight
lcd.backlight(); // finish with backlight on
}
void loop()
{
displaycount = displaycount + 1;
if (displaycount > 3){
displaycount = 0;
}
lcd.setCursor(15,1);
lcd.print(Show[displaycount]);
// lcd.print(char(Show[displaycount]));
delay (1000);
}
It took a little while to figure it out,
I had a issue when using "createChar", it was not a function in the library
so some more googling, and its working now,