HEPTA2温度センサー

Dependencies:   HeptaTemp mbed

Committer:
hepta2ume
Date:
Thu Jul 20 02:16:19 2017 +0000
Revision:
2:040881be9718
Parent:
0:85b965694fa1
HEPTA2

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hepta2ume 0:85b965694fa1 1 #include "mbed.h"
hepta2ume 0:85b965694fa1 2 #include"HeptaTemp.h"
hepta2ume 0:85b965694fa1 3
hepta2ume 0:85b965694fa1 4 Serial pc(USBTX, USBRX);
hepta2ume 0:85b965694fa1 5 HeptaTemp temperature(p17);
hepta2ume 0:85b965694fa1 6
hepta2ume 0:85b965694fa1 7 int main()
hepta2ume 0:85b965694fa1 8 {
hepta2ume 0:85b965694fa1 9 float temp;
hepta2ume 0:85b965694fa1 10 while (1) {
hepta2ume 0:85b965694fa1 11 temperature.temp_sense(&temp);
hepta2ume 0:85b965694fa1 12 pc.printf("temp = %f\r\n",temp);
hepta2ume 0:85b965694fa1 13 }
hepta2ume 0:85b965694fa1 14 }