Final Project for ECE-4180 Fall 2022. Interface with ENS160 AQI sensor and display the readings on uLCD.
Dependencies: 4DGL-uLCD-SE ENS160_Library mbed PinDetect mbed-rtos
Revision 4:25a266a74a4c, committed 2013-11-18
- Comitter:
- 4180_1
- Date:
- Mon Nov 18 03:06:14 2013 +0000
- Parent:
- 3:454d1f4c8fd7
- Child:
- 5:a1ef40ff0f78
- Commit message:
- ver 1.02
Changed in this revision
| 4DGL-uLCD-SE.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 |
--- a/4DGL-uLCD-SE.lib Sun Nov 17 04:37:03 2013 +0000 +++ b/4DGL-uLCD-SE.lib Mon Nov 18 03:06:14 2013 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/4180_1/code/4DGL-uLCD-SE/#edae99e4abe7 +http://mbed.org/users/4180_1/code/4DGL-uLCD-SE/#9ba47197d94f
--- a/main.cpp Sun Nov 17 04:37:03 2013 +0000
+++ b/main.cpp Mon Nov 18 03:06:14 2013 +0000
@@ -27,6 +27,7 @@
int main()
{
+ int pixelcolors[400];
// basic printf demo = 16 by 18 characters on screen
uLCD.printf("\nHello uLCD World\n"); //Default Green on black text
uLCD.printf("\n Starting Demo...");
@@ -70,6 +71,14 @@
uLCD.printf("TxtLine %2D Page %D\n",i%16,i/16 );
i++; //16 lines with 18 charaters per line
}
+//draw an image pixel by BLIT (Block Image Transfer)
+ uLCD.background_color(BLACK);
+ uLCD.cls();
+ for(int i=0; i<400; i++) {
+ pixelcolors[i] = RED;
+ }
+ uLCD.BLIT(50, 50, 20, 20, &pixelcolors[0]);
+ wait(5);
//draw an image pixel by pixel
uLCD.background_color(BLACK);
uLCD.cls();
