4124183780
Add AK8975 to be implemented
2018-05-13 21:54:29 +02:00
520c1161ad
Refactor after ff6be09 upstream
2018-05-13 20:26:57 +02:00
646f21833f
Add mgos_imu module!
2018-05-13 15:47:06 +02:00
449d51aae8
Some dev changes
...
- Only have 1 baro
- Add MPU9250 beginnings
- print type of baro
- add i2c_dumpregs() to the i2c_scanner()
2018-05-13 12:53:18 +02:00
e6f02daa60
Follow symlinks for SRC/INC
2018-04-22 16:57:16 +02:00
bad1fc3951
Avoid libs/ in this repo
2018-04-22 16:55:56 +02:00
c9b29def6c
Move to their own repos
2018-04-22 16:55:12 +02:00
a6edfa4c3b
allow logger to (left)truncate long file and func names
2018-04-22 14:39:17 +02:00
2d738835f9
Set up compiler warnings as errors
2018-04-22 14:22:46 +02:00
b33daf2981
Move mgos_imu to libs/
2018-04-22 14:18:47 +02:00
bc4321cbd4
Make code -Wstrict-prototypes compliant
2018-04-22 14:16:23 +02:00
38c3cdf27e
Make code -Wall -Wextra -pedantic -Wmissing-prototypes -Wold-style-definition
2018-04-22 14:15:35 +02:00
64fe69d3e3
Introduce 'libs'
...
Recursively search libs/* for source and include dirs
Move mgos_barometer code to its own subdir, in preparation for release
to GitHub.
2018-04-22 14:04:54 +02:00
e30784fcad
Add BME680 sheet
2018-04-22 13:43:08 +02:00
55c7e78427
Single-line baro logging
2018-04-22 12:53:52 +02:00
0b3fd0d684
Add Datasheets
2018-04-22 12:49:31 +02:00
d18c451f42
Add correct datasheet -- add todo for humidity
2018-04-22 12:23:47 +02:00
d998301bef
Improve driver
...
- switch to continuous measurement
- switch to double precision compensation formulas (datasheet section 8.1)
- uncrustify
Output of BMP280 and MPL3115 are now quite similar:
INFO src/main.c i2c_scanner | I2C Address 0x60 true
INFO src/main.c i2c_scanner | I2C Address 0x76 true
DEBUG src/mgos_barometer.c mgos_barometer_create_i2c | Successfully detected mgos_barometer_type 2 at I2C 0x60
DEBUG src/mgos_barometer.c mgos_barometer_create_i2c | Successfully created mgos_barometer_type 2 at I2C 0x60
DEBUG src/mgos_barometer.c mgos_barometer_create_i2c | Successfully detected mgos_barometer_type 3 at I2C 0x76
DEBUG src/mgos_barometer.c mgos_barometer_create_i2c | Successfully created mgos_barometer_type 3 at I2C 0x76
INFO src/main.c do_baro | Pressure 96623.25Pa
INFO src/main.c do_baro | Temperature 16.75C
INFO src/main.c do_baro | Pressure 96629.70Pa
INFO src/main.c do_baro | Temperature 18.45C
INFO src/main.c do_baro | Pressure 96620.50Pa
INFO src/main.c do_baro | Temperature 16.75C
INFO src/main.c do_baro | Pressure 96633.49Pa
INFO src/main.c do_baro | Temperature 18.43C
2018-04-22 11:54:59 +02:00
e7367d1cec
Attempt to run BME280 in default 'Android' mode -- See datasheet para 3.5.3
2018-04-22 10:23:05 +02:00
498d2d8e03
Remove debugging statement
2018-04-22 10:21:41 +02:00
4a89c9540b
Off-by-10 error (HPa vs kPa)
2018-04-22 09:54:08 +02:00
b9dd5fd2ce
Small changes
2018-04-22 09:47:58 +02:00
1b3d8ac7ca
Move from has_* to capabilities bits
2018-04-22 09:42:47 +02:00
0f933dda31
Add partial BMP280/BME280 driver
2018-04-22 09:37:45 +02:00
b9bb70d4cf
Remove DEBUG logging
2018-04-22 09:37:17 +02:00
e4d908ebf3
Create empty BME280 driver
2018-04-22 08:11:52 +02:00
b2f71583a1
Set timeout of 1s on reads
2018-04-21 23:33:58 +02:00
38fca7c650
Add MPL3115 driver; It's a bit slow (takes ~1s for DataReady to be set), should take a look
2018-04-21 23:18:43 +02:00
f4aa4f7844
Add empty MPL3115 driver
2018-04-21 17:55:37 +02:00
d142cb37d3
Add finished MPL115 barometer
2018-04-21 17:47:56 +02:00
9d9cd1d00a
Add Read Cache and Stats
...
- baro.cache_ttl_ms avoids multiple reads
- by default, cache is off (cache_ttl_ms=0)
- stats are updated (similar to how prometheus-sensors does this)
2018-04-21 15:39:57 +02:00
89ec34dc1d
Add mgos_barometer API
2018-04-21 15:17:24 +02:00
acec109ae8
Rename 'sensor' to 'imu' consistently
2018-04-19 17:52:06 +02:00
88e287770c
Skeleton of mgos_imu_{mag,acc,gyro}.c; restructure header files
2018-04-19 16:01:12 +02:00
37d26eb65f
Move private IMU data into its mgos_imu_internal.h
2018-04-19 15:32:00 +02:00
d693631b70
First stab at generic gyro/mag/accel -- mgos_imu.h
2018-04-18 23:50:23 +02:00
1e1c3087cd
Add MPU9250
2018-04-18 22:54:06 +02:00
e4bb9e39cc
Add CCS811 driver
2018-04-10 21:36:10 +02:00
d2e64c0f45
Reformat with bcpp
...
Used commandline: bcpp -i 2 -yq -ya -s -bcl -tbcl $i
2018-04-09 18:30:46 +02:00
0337487a0c
Add Copyright headers (AP2.0)
2018-04-03 14:15:56 +02:00
50d59ae313
Finished MCP9808 driver.
2018-04-03 14:09:40 +02:00
90003f705c
Reverse byte-order of 16 bit register read
2018-04-03 13:54:48 +02:00
62da8aa283
Initial checkin of empty MCP9808 driver
2018-04-03 13:46:08 +02:00
9f0cdbb821
Initial driver for HTU21DF
2018-04-02 22:36:46 +02:00
aa73394f0d
Add skeleton for HTU21DF driver
2018-04-02 22:18:20 +02:00
38500aa8d4
Add public header documentation.
2018-04-02 22:05:53 +02:00
7263edee15
Add Adafruit datasheets
2018-04-02 21:58:01 +02:00
e4ed4d005d
Loop once per 5 seconds.
...
Clean up CRC8 functions (style, no caps).
2018-04-02 21:50:30 +02:00
97310e3e03
Refactor main.
...
Only create sensors once, then loop over them with do_si7021() and
do_sht31().
2018-04-02 21:46:54 +02:00
37838f0062
SI7021: Implement Status
...
This allows us to detect if the I2C device is indeed an Si7021.
By reading status, turning the heater on, reading status, and turning
the heater off, reading status, we will see three different states:
status bit13 is 'heater on' (0=off, 1=on).
In status0, bit13 will be 0,
In status1, bit13 will be 1, (the heater is now on)
In status2, bit13 will be 0.
2018-04-02 21:40:42 +02:00