Rodrigo Almeida / pqdb

Dependents:   pqdb_demo

You are viewing an older revision! See the latest version

Homepage

This is the demo main for the libraries up to now.

  1. include "mbed.h"
  2. include "ssd.h"
  3. include "lcd.h"
  4. include "keypad.h"
  5. include "ad.h" int main() { int temp; lcdInit(); kpInit(); ssdInit(); wait(0.1f); lcdCommand(0x80); lcdString("pq + mBed = OK!"); lcdCommand(0xC0); lcdString("db Key:"); while (true) { lcdCommand(0xCA); if(kpRead()){ lcdChar(kpReadKey()); }else{ lcdChar(' '); } kpDebounce(); ssdUpdate(); temp = 6789; temp = adRead(2); ssdDigit(1,temp/1000%10); ssdDigit(0,temp/10000%10); temp = adRead(1); ssdDigit(3,temp/1000%10); ssdDigit(2,temp/10000%10);

wait(0.005f); } }


All wikipages