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: HEPTA_EPS HEPTA_SENSOR mbed
main.cpp
- Committer:
- csmk18112
- Date:
- 2022-08-19
- Revision:
- 3:ffb2234dadb7
- Parent:
- 2:6fdd18473e85
- Child:
- 4:e4048da4453e
File content as of revision 3:ffb2234dadb7:
#include "mbed.h"
#include "HEPTA_EPS.h"
#include "HEPTA_SENSOR.h"
Serial pc(USBTX, USBRX);
HEPTA_EPS eps(p16,p26);
HEPTA_SENSOR sensor(p17,
p28,p27,0x19,0x69,0x13,
p13, p14,p25,p24);
int main()
{
pc.baud(9600);
float mx,my,mz;
pc.printf("Magnetometer Mode\r\n");
for(int i = 0; i<50; i++) {
sensor.sen_mag(&mx,&my,&mz);
pc.printf("mag : %f,%f,%f\r\n\r\n",mx,my,mz);
wait(1.0);
}
}