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 HeptaBattery Hepta9axis
Fork of Lab7-01_template by
main.cpp@14:8d870350014c, 2017-09-07 (annotated)
- Committer:
- HEPTA
- Date:
- Thu Sep 07 13:41:33 2017 +0000
- Revision:
- 14:8d870350014c
- Parent:
- 13:a1fa75a002f6
- Child:
- 15:53779160ad9d
Hepta Lab4
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| mbed_official | 0:bdbd3d6fc5d5 | 1 | #include "mbed.h" |
| umeume | 2:1c5cdb2c3e0f | 2 | #include "Hepta9axis.h" |
| umeume | 2:1c5cdb2c3e0f | 3 | |
| umeume | 2:1c5cdb2c3e0f | 4 | Serial pc(USBTX,USBRX); |
| HEPTA | 10:4d6870d0caa0 | 5 | Hepta9axis n_axis(p28,p27,0xD0,0x18); |
| umeume | 5:c5ccb1b07e8f | 6 | |
| umeume | 2:1c5cdb2c3e0f | 7 | int main() |
| umeume | 2:1c5cdb2c3e0f | 8 | { |
| HEPTA | 14:8d870350014c | 9 | pc.baud(9600); |
| HEPTA | 14:8d870350014c | 10 | float ax,ay,az; |
| HEPTA | 14:8d870350014c | 11 | pc.printf("Accel Sensor Mode\r\n"); |
| HEPTA | 14:8d870350014c | 12 | for(int i = 0; i<50; i++) { |
| HEPTA | 14:8d870350014c | 13 | n_axis.sen_acc(&ax,&ay,&az); |
| HEPTA | 14:8d870350014c | 14 | pc.printf("%f,%f,%f\r\n",ax,ay,az); |
| HEPTA | 14:8d870350014c | 15 | wait(1.0); |
| HEPTA | 14:8d870350014c | 16 | } |
| umeume | 2:1c5cdb2c3e0f | 17 | } |
