This class encapsulates all the algorithms required for the displaying strings and time dependent patterns on the lcd.
Dependents: 200943412_QuickClick
Diff: Display.cpp
- Revision:
- 17:1c52ff51c028
- Parent:
- 16:8d158d39d438
--- a/Display.cpp Mon May 01 17:04:13 2017 +0000 +++ b/Display.cpp Tue May 02 14:02:25 2017 +0000 @@ -93,7 +93,7 @@ for (int _a = 0; _a < 8; ++_a) { //printf("for loop (a):- %d\n",a); - _drawArc(lcd, _a); + _drawArc(lcd, _a); //run through _drawArc function drawing octant specific to a value lcd.refresh(); float Brightness = ctrl.pot_value(); //set brightness to petentiometer value lcd.setBrightness(0.0); @@ -101,7 +101,7 @@ //printf("Wait used:- %3.2f\n",_w); wait(_w); lcd.setBrightness(Brightness); //Variable brightness will change with petentiometer value - wait(_w); + wait(_w); //changes after every circle is drawn to make the game more exciting. } } @@ -116,6 +116,9 @@ _x0 = 42; _y0 = 24; +//the algorithm below is a modified version of the midpoint circle algorithm from: +//https://en.wikipedia.org/wiki/Midpoint_circle_algorithm + while(_x >= _y) { switch(_a) {