Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: Grove_LCD_RGB_Backlight mbed
Fork of Grove_LCD_RGB_Backlight_HelloWorld by
main.cpp
- Committer:
 - cmatz3
 - Date:
 - 2016-03-15
 - Revision:
 - 0:be3b212d1b17
 - Child:
 - 1:d16e423537ed
 
File content as of revision 0:be3b212d1b17:
#include "Grove_LCD_RGB_Backlight.h"
#include "mbed.h"
Grove_LCD_RGB_Backlight rgbLCD(p9, p10);
//I2C i2c(p9, p10);
//Serial pc(USBTX, USBRX);
int main()
{
   rgbLCD.setRGB(0xff, 0xff, 0xff);                 //set the color 
   rgbLCD.print("Hello World!");
   rgbLCD.locate(0,1);
   rgbLCD.print("This is a test");
   wait(5);
   int count = 0;
   while(1)
   {
     if (count == 0)
     {
         rgbLCD.setRGB(0xff, 0x00, 0x00);
     }   
     else if (count == 1)
     {
         rgbLCD.setRGB(0x00, 0xff, 0x00);
     }
     else if (count == 2)
     {
         rgbLCD.setRGB(0x00, 0x00, 0xff);
     }
     wait(1);
     count++;
     if(count == 3)
     {
         count = 0;
     }
     
   }
}
            
    