Dependencies:   dispBoB mbed PCA9635

Committer:
d_worrall
Date:
Fri Jul 08 15:14:55 2011 +0000
Revision:
0:ba39353df5e7
Child:
1:1d49d49b77f8
version1

Who changed what in which revision?

UserRevisionLine numberNew contents of line
d_worrall 0:ba39353df5e7 1 #include "mbed.h"
d_worrall 0:ba39353df5e7 2 #include "dispBoB.h"
d_worrall 0:ba39353df5e7 3 #include "TMP102.h"
d_worrall 0:ba39353df5e7 4
d_worrall 0:ba39353df5e7 5 dispBoB db(p28, p27, p26); //instantiate a dispBoB object
d_worrall 0:ba39353df5e7 6 TMP102 temperature(p9, p10, 0x90); //instantiate a TMP102 object
d_worrall 0:ba39353df5e7 7
d_worrall 0:ba39353df5e7 8 int main() {
d_worrall 0:ba39353df5e7 9 db.cls(); //clear screen
d_worrall 0:ba39353df5e7 10 while(1){
d_worrall 0:ba39353df5e7 11 db.locate(0); //position to start
d_worrall 0:ba39353df5e7 12 db.printf("%f", temperature.read()); //print temperature
d_worrall 0:ba39353df5e7 13 db.printf("%c", ".C"); //degrees celsius
d_worrall 0:ba39353df5e7 14 wait(1); //wait 1 second before looping
d_worrall 0:ba39353df5e7 15 }
d_worrall 0:ba39353df5e7 16 }