Craig Evans
/
1620_App_Board_LDR
LDR
Fork of 1620_App_Board_Temperature_Sensor by
Revision 3:ce5582846693, committed 2017-03-05
- Comitter:
- eencae
- Date:
- Sun Mar 05 20:12:32 2017 +0000
- Parent:
- 2:1c669cb14c5b
- Commit message:
- Updated Nokia LCD method
Changed in this revision
N5110.lib | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 1c669cb14c5b -r ce5582846693 N5110.lib --- a/N5110.lib Tue Feb 28 20:20:49 2017 +0000 +++ b/N5110.lib Sun Mar 05 20:12:32 2017 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/eencae/code/N5110/#5bc91bd44c77 +http://mbed.org/users/eencae/code/N5110/#d80e568a2e18
diff -r 1c669cb14c5b -r ce5582846693 main.cpp --- a/main.cpp Tue Feb 28 20:20:49 2017 +0000 +++ b/main.cpp Sun Mar 05 20:12:32 2017 +0000 @@ -26,15 +26,15 @@ // lcd is 84 pixels wide x 48 pixels high - // x, y, width, height, outline - lcd.drawRect(12,20,60,8,0); + // x, y, width, height, fill type + lcd.drawRect(12,20,60,8,FILL_TRANSPARENT); float value = ldr.read(); // read in the LDR value in range 0.0 to 1.0 int width = int(value*60.0f); // convert to an int in the range 0.0 to 60.0 // draw a bar of the correct width - lcd.drawRect(12,20,width,8,1); // the 1 makes a black rectangle + lcd.drawRect(12,20,width,8,FILL_BLACK); // update the LCD lcd.refresh();