# HG changeset patch # User Ethan Zonca # Date 2014-08-18 23:08:23 # Node ID 4b7449ab32bd649e115d4d0b867a91669dc967c8 # Parent 0f9d3eff7dfc6e8b2e89f3eb55ab412c14cdcc6c Add toggling fun text. Things seem to be working nicely. diff --git a/main.c b/main.c --- a/main.c +++ b/main.c @@ -71,6 +71,7 @@ int main(void) ssd1306_DrawString("Hello World!", 0, 10); // ssd1306_block_write(); + uint8_t toggle = 0; while(1) { //ssd1306_block_write(); @@ -91,7 +92,14 @@ int main(void) if(!sw_btn) { GPIO_ToggleBits(LED_STAT); - ssd1306_DrawString("Douche!", 2, 10); + if(!toggle) { + ssd1306_DrawString("I freaking work!", 2, 10); + toggle = ! toggle; + } + else { + ssd1306_block_write(); + toggle = ! toggle; + } } GPIO_SetBits(LED_POWER);