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:
- 16:2159a3dc888e
- Parent:
- 15:edec8fd4f69c
- Child:
- 19:a8d8f1ef04f6
--- a/main.cpp Tue Apr 12 07:44:10 2016 +0000 +++ b/main.cpp Wed Apr 13 06:22:38 2016 +0000 @@ -8,7 +8,9 @@ DigitalOut myled(LED1); int main() { - X_NUCLEO_IKA01A1 *analog_expansion_board = X_NUCLEO_IKA01A1::Instance(X_NUCLEO_IKA01A1_PIN_PHOTO_SENSOR, + X_NUCLEO_IKA01A1 *analog_expansion_board = X_NUCLEO_IKA01A1::Instance(X_NUCLEO_IKA01A1_PIN_INSTRUMENTATION_AMP, + X_NUCLEO_IKA01A1_PIN_CURRENT_SENSING, + X_NUCLEO_IKA01A1_PIN_PHOTO_SENSOR, X_NUCLEO_IKA01A1_PIN_WINDOWS_COMP_SIGNAL_1, X_NUCLEO_IKA01A1_PIN_WINDOWS_COMP_SIGNAL_2, X_NUCLEO_IKA01A1_PIN_PWM_LED_DRIVER_OUTPUT, @@ -26,9 +28,9 @@ unsigned int opAmpVoltage = instrAmp->GetVoltage(); unsigned int opAmpCurrent = instrAmp->GetCurrent(); // pass the analog pin name on which voltage is to be read (e.g. A3 on LPCxpresso lpc11u68) - unsigned int photoSensorVoltage = photoSensor_windComp->Get_PhotoSensor_GetVoltage(); - unsigned int windComPin1 = photoSensor_windComp->WindComp_Get_Signal1(); - unsigned int windComPin2 = photoSensor_windComp->WindComp_Get_Signal2(); + unsigned int photoSensorVoltage = photoSensor_windComp->GetVoltage(); + unsigned int windComPin1 = photoSensor_windComp->GetSignal1(); + unsigned int windComPin2 = photoSensor_windComp->GetSignal2(); pc.printf("\nopAmp measured voltage(mV): %u \n", opAmpVoltage); pc.printf("\nopAmp measured Current(mA): %u \n", opAmpCurrent);