Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
BT.cpp@0:ef171b42a496, 2018-11-01 (annotated)
- Committer:
- djinn77
- Date:
- Thu Nov 01 23:27:19 2018 +0000
- Revision:
- 0:ef171b42a496
- Child:
- 1:991cdc24ec5e
BT capta y muestra un solo dato en App inventor
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| djinn77 | 0:ef171b42a496 | 1 | |
| djinn77 | 0:ef171b42a496 | 2 | #include "mbed.h" |
| djinn77 | 0:ef171b42a496 | 3 | |
| djinn77 | 0:ef171b42a496 | 4 | AnalogIn analog_value(A0); |
| djinn77 | 0:ef171b42a496 | 5 | Serial deviceBT(D8, D2); |
| djinn77 | 0:ef171b42a496 | 6 | |
| djinn77 | 0:ef171b42a496 | 7 | int main() { |
| djinn77 | 0:ef171b42a496 | 8 | deviceBT.baud(9600); |
| djinn77 | 0:ef171b42a496 | 9 | float d; |
| djinn77 | 0:ef171b42a496 | 10 | while(1){ |
| djinn77 | 0:ef171b42a496 | 11 | d= analog_value.read()*1024; |
| djinn77 | 0:ef171b42a496 | 12 | deviceBT.printf("%f \n",d); |
| djinn77 | 0:ef171b42a496 | 13 | |
| djinn77 | 0:ef171b42a496 | 14 | } |
| djinn77 | 0:ef171b42a496 | 15 | |
| djinn77 | 0:ef171b42a496 | 16 | } |