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.
Dependencies: mbed
main.cpp@0:9525cf87fb78, 2020-02-03 (annotated)
- Committer:
- EISR
- Date:
- Mon Feb 03 10:44:41 2020 +0000
- Revision:
- 0:9525cf87fb78
V1_fonctionnel_transmission bluetooth.; Manque : traitement de reception ; Creation trame forme Start-Reg-data-stop
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
EISR | 0:9525cf87fb78 | 1 | #include "bluetoothV1bibli.h" |
EISR | 0:9525cf87fb78 | 2 | |
EISR | 0:9525cf87fb78 | 3 | int val=5; //la data |
EISR | 0:9525cf87fb78 | 4 | |
EISR | 0:9525cf87fb78 | 5 | void data_on_blueth(void); //fonction d'interruption |
EISR | 0:9525cf87fb78 | 6 | int main(void) |
EISR | 0:9525cf87fb78 | 7 | { |
EISR | 0:9525cf87fb78 | 8 | Ticker timer; |
EISR | 0:9525cf87fb78 | 9 | |
EISR | 0:9525cf87fb78 | 10 | |
EISR | 0:9525cf87fb78 | 11 | init_blueth(); |
EISR | 0:9525cf87fb78 | 12 | timer.attach(&data_on_blueth,0.005); // creation de l'interruption |
EISR | 0:9525cf87fb78 | 13 | while(1) {} |
EISR | 0:9525cf87fb78 | 14 | } |
EISR | 0:9525cf87fb78 | 15 | |
EISR | 0:9525cf87fb78 | 16 | void data_on_blueth(void) |
EISR | 0:9525cf87fb78 | 17 | { |
EISR | 0:9525cf87fb78 | 18 | send_data(val); //A chaque IT |
EISR | 0:9525cf87fb78 | 19 | } |