Final Project
/
UltrasonicSensor
Just trying to read values into Terraterm
main.cpp@0:a4ee67431356, 2015-04-23 (annotated)
- Committer:
- jkangwi
- Date:
- Thu Apr 23 23:49:13 2015 +0000
- Revision:
- 0:a4ee67431356
- Child:
- 1:68153aa41971
Just reading values
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jkangwi | 0:a4ee67431356 | 1 | #include "mbed.h" |
jkangwi | 0:a4ee67431356 | 2 | #include "Motor.h" |
jkangwi | 0:a4ee67431356 | 3 | AnalogIn sonic(p15); |
jkangwi | 0:a4ee67431356 | 4 | float data; |
jkangwi | 0:a4ee67431356 | 5 | |
jkangwi | 0:a4ee67431356 | 6 | int main() { |
jkangwi | 0:a4ee67431356 | 7 | while(1) { |
jkangwi | 0:a4ee67431356 | 8 | data=bed.read(); |
jkangwi | 0:a4ee67431356 | 9 | printf("%f \n",data); |
jkangwi | 0:a4ee67431356 | 10 | } |
jkangwi | 0:a4ee67431356 | 11 | } |