Simple test application for X-NUCLEO-IKA01A1 expansion board.
Dependencies: X_NUCLEO_IKA01A1 mbed
Fork of HelloWorld_IKA01A1 by
Simple test application for X-NUCLEO-IKA01A1 expansion board.
Platform compatibility issues
- NUCLEO-F302R8: use pin D5 for LED Driver configuration
- LPCXpresso11U68: use pin D3 as PWM for LED Driver configuration. Use a free Dx pin as Signal2 for Windows Comparator configuration.
Diff: main.cpp
- Revision:
- 1:d7c55044d4b7
- Parent:
- 0:0f16e14940d0
- Child:
- 2:af24b3afa99d
--- a/main.cpp Wed Feb 24 12:16:43 2016 +0000 +++ b/main.cpp Tue Mar 01 14:09:29 2016 +0000 @@ -1,17 +1,23 @@ #include "mbed.h" +#include "tsz124_class.h" -PwmOut mypwm(PWM_OUT); +Serial pc(SERIAL_TX, SERIAL_RX); DigitalOut myled(LED1); int main() { + + DevI2C i2c(D14, D15); + TSZ124 opAmp(0, i2c); + unsigned int voltage = 100; + + pc.printf("\nhello world\n"); - mypwm.period_ms(10); - mypwm.pulsewidth_ms(1); - - printf("pwm set to %.2f %%\n", mypwm.read() * 100); - - while(1) { + while(1) { + pc.printf("\nwhile loop\n"); + pc.printf("\nopAmp measured voltage: %u \n", opAmp.GetVoltage()); + pc.printf("\nopAmp measured Current: %u \n", opAmp.GetCurrent()); + pc.printf("\nphotodiode sensor output voltage: %u \n", opAmp.GetPhotoSensorValue()); myled = !myled; wait(1); }