Kevin Rhyne / Whiffy

Dependencies:   4DGL-uLCD-SE mbed

LCDControl.cpp

Committer:
rproctor6
Date:
2015-10-16
Revision:
4:15165d60fb85
Parent:
2:03181ee070d3

File content as of revision 4:15165d60fb85:

//import LCD stuff
#include "mbed.h"
#include "uLCD_4DGL.h"

uLCD_4DGL uLCD(p9,p10,p8); // serial tx, serial rx, reset pin;

class LCDControl{
    int strength;
    bool mode;
    public:
    void update(int, bool);
    void printStrength(int);
    };
    
    void LCDControl::update(int x, bool y) { //do update stuff on LCD
        strength = x;
        mode = y;
        printStrength(strength);
    }
    
    void LCDControl::printStrength(int x) {
        uLCD.cls();
        uLCD.printf("Signal Strenght: %d", x);
    }