Hello world for Rohm BH1726 ALS dual channel sensor. Uses Rohm sensor hal and bh1726 driver.
Dependencies: mbed rohm-bh1726 rohm-sensor-hal
Fork of rohm-bh1745-hello by
main.cpp
- Committer:
- MACRUM
- Date:
- 2015-12-30
- Revision:
- 0:b5c7d79e5d7c
File content as of revision 0:b5c7d79e5d7c:
#include "mbed.h"
#include "KX022.h"
Serial pc(USBTX, USBRX);
KX022 acc(I2C_SDA, I2C_SCL);
int main() {
pc.printf("\nKX022 Accelerometer library test program.\n");
while(1) {
wait(0.5);
pc.printf("x=%7.4f, y=%7.4f, z=%7.4f\n", acc.getAccX(), acc.getAccY(), acc.getAccZ());
}
}

Rohm BH1726NUC | Ambient Light Sensor