aaaaa

Dependencies:   mbed Grove_LCD_RGB_Backlight

Files at this revision

API Documentation at this revision

Comitter:
sjoly
Date:
Wed Mar 09 20:31:19 2022 +0000
Parent:
1:d800035aa2d9
Commit message:
aaaa

Changed in this revision

Grove_LCD_RGB_Backlight.lib Show annotated file Show diff for this revision Revisions of this file
lab4b.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r d800035aa2d9 -r 8bb42c039d39 Grove_LCD_RGB_Backlight.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Grove_LCD_RGB_Backlight.lib	Wed Mar 09 20:31:19 2022 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/cmatz3/code/Grove_LCD_RGB_Backlight/#5ce38ef7a7db
diff -r d800035aa2d9 -r 8bb42c039d39 lab4b.cpp
--- a/lab4b.cpp	Thu Oct 08 17:51:31 2020 +0000
+++ b/lab4b.cpp	Wed Mar 09 20:31:19 2022 +0000
@@ -1,42 +1,8 @@
-/*
-Title:  Using Pushbuttons to selectively blink a RED/Green Led
-Author: Your Name,Student Id, Course Code, Lab Section
-Date:   Today's Date
-Description:    This program will turn ON/OFF the red led if the
-                left pushbutton is pressed or the green led if the
-                right pushbutton is pressed.
-*/
-
-#include "mbed.h"                   // include the mbed library
-
-DigitalOut led_red(LED_RED);        // led_red is set to RED LED pin
-DigitalOut led_green(LED_GREEN);    // led_green is set to GREEN LED pin
-DigitalIn left_pb(SW3);             // left_pb is set to left pb pin
-DigitalIn right_pb(SW2);            // right pb is set to right pb pin
-
-int main() 
+#include "Grove_LCD_RGB_Backlight.h"
+#include "mbed.h"
+int main(void)
 {
-    led_red=led_green=1;            // turn red and green leds off
-    for(;;)
-    {
-        if(left_pb==1)              // if left pb is pressed
-        {
-           led_red=1;               // red led is off
-           wait_ms(500);
-           led_red=0;               // red led is on
-           wait_ms(500);       
-        }
-        else
-           if(right_pb==1)          // else if rigth pb is pressed
-           {
-              led_green=1;          // green led is off
-              wait_ms(500);
-              led_green=0;          // green led is on
-              wait_ms(500);            
-           } 
-           else 
-           {
-              led_red=led_green=1;  // turn red and green leds off
-           }     
-    } 
-}
+ Grove_LCD_RGB_Backlight lcd(D14, D15);
+ lcd.print("Hello World");
+ for(;;);
+}
\ No newline at end of file