First draft HMC5883 magnetometer sensor using physical quantities, outputting via serial port using std::cout on mbed os 5
magnetometer.h@11:de7c9ae7ef65, 2020-03-26 (annotated)
- Committer:
- skyscraper
- Date:
- Thu Mar 26 22:58:21 2020 +0000
- Revision:
- 11:de7c9ae7ef65
- Parent:
- 9:87a7169b4d5c
Changed to use threads
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
skyscraper | 8:c5dc1ce10722 | 1 | #ifndef SKYSCRAPER_MBED_MAGNETOMETER_H_INCLUDED |
skyscraper | 8:c5dc1ce10722 | 2 | #define SKYSCRAPER_MBED_MAGNETOMETER_H_INCLUDED |
skyscraper | 2:9ffb2f18756b | 3 | |
skyscraper | 8:c5dc1ce10722 | 4 | #include <quan/out/time.hpp> |
skyscraper | 2:9ffb2f18756b | 5 | #include <quan/out/magnetic_flux_density.hpp> |
skyscraper | 2:9ffb2f18756b | 6 | #include <quan/three_d/out/vect.hpp> |
skyscraper | 2:9ffb2f18756b | 7 | |
skyscraper | 8:c5dc1ce10722 | 8 | QUAN_QUANTITY_LITERAL(magnetic_flux_density,gauss); |
skyscraper | 8:c5dc1ce10722 | 9 | QUAN_QUANTITY_LITERAL(magnetic_flux_density,milli_gauss); |
skyscraper | 8:c5dc1ce10722 | 10 | QUAN_QUANTITY_LITERAL(magnetic_flux_density,uT); |
skyscraper | 8:c5dc1ce10722 | 11 | |
skyscraper | 8:c5dc1ce10722 | 12 | bool mag_init(); |
skyscraper | 8:c5dc1ce10722 | 13 | bool mag_start_measurement(); |
skyscraper | 8:c5dc1ce10722 | 14 | bool mag_data_ready(); |
skyscraper | 8:c5dc1ce10722 | 15 | bool mag_read(quan::three_d::vect<quan::magnetic_flux_density::uT> & v); |
skyscraper | 8:c5dc1ce10722 | 16 | |
skyscraper | 8:c5dc1ce10722 | 17 | #endif |
skyscraper | 3:2834be4e10ef | 18 |