Skip to content

Instantly share code, notes, and snippets.

@futoase
Last active December 30, 2015 00:39
Show Gist options
  • Select an option

  • Save futoase/7751113 to your computer and use it in GitHub Desktop.

Select an option

Save futoase/7751113 to your computer and use it in GitHub Desktop.
#include <LiquidCrystal.h>
LiquidCrystal g_lcd( 12, 11, 5, 4, 3, 2 ); // rs, enable, d4, d5, d6, d7
int g_iCounter = 0; // カウンター
void setup()
{
g_lcd.begin( 16, 2 ); // 16文字×2行
g_lcd.clear(); // LCD画面消去
g_lcd.setCursor( 0, 0 );
g_lcd.print( "\xbc\xdd\xc1\xae\xb8 \xc4\xde\xb3\xc3\xde\xbd\xb6" );
}
void loop()
{
g_lcd.setCursor( 0, 1 );
// g_lcd.print(g_iCounter);
g_iCounter++;
if (g_iCounter % 2 == 0){
g_lcd.print("(^_^)(^_^)(;_;)");
}
else{
g_lcd.print("(^o^)(^o^)(;o;)");
}
delay( 1000 );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment