mbed library for STMicroelectronics' X-NUCLEO-IKA01A1 expansion board.
Dependents: HelloWorld_IKA01A1
Fork of X_NUCLEO_IKA01A1 by
Library for STMicroelectronics' X-NUCLEO-IKA01A1 multifunctional expansion board based on operational amplifiers.
Revision 20:169bdc228a7b, committed 2016-04-11
- Comitter:
- hemddabral
- Date:
- Mon Apr 11 07:32:53 2016 +0000
- Parent:
- 19:af35fc938d88
- Child:
- 21:8d0624950dd1
- Commit message:
- updated x_nucleo_ika01a1_config.h file
Changed in this revision
--- a/Components/tsz124/tsz124_class.h Mon Apr 11 05:50:58 2016 +0000
+++ b/Components/tsz124/tsz124_class.h Mon Apr 11 07:32:53 2016 +0000
@@ -72,6 +72,7 @@
* #include "../Interfaces/Temperature_class.h" *
*----------------------------------------------------------------------------*/
#include "../Interfaces/Instrumentation_amp_class.h"
+#include "x_nucleo_ika01a1_config.h"
/* Classes -------------------------------------------------------------------*/
@@ -135,7 +136,7 @@
virtual unsigned int GetVoltage(void)
{
const unsigned int ADC_RANGE_12_BIT = 0xFFF;
- AnalogIn ain(A1);
+ AnalogIn ain(X_NUCLEO_IKA01A1_PIN_INSTRUMENTATION_AMP);
return ((double)ain.read())*805.0*ADC_RANGE_12_BIT/1000.0;
}
@@ -146,7 +147,7 @@
virtual unsigned int GetCurrent(void)
{
const unsigned int ADC_RANGE_12_BIT = 0xFFF;
- AnalogIn ain(A2);
+ AnalogIn ain(X_NUCLEO_IKA01A1_PIN_CURRENT_SENSING);
return ((double)ain.read())*1000.0*805.0*ADC_RANGE_12_BIT/1000.0/1586.0;
}
--- a/x_nucleo_ika01a1_config.h Mon Apr 11 05:50:58 2016 +0000 +++ b/x_nucleo_ika01a1_config.h Mon Apr 11 07:32:53 2016 +0000 @@ -63,6 +63,13 @@ * // Interrupts. * * #define EXPANSION_BOARD_PIN_INT_1 (A2) * *----------------------------------------------------------------------------*/ + + /* instrumentation amplifier configuration */ + #define X_NUCLEO_IKA01A1_PIN_INSTRUMENTATION_AMP (A1) + + /* Current sensing configuration */ + #define X_NUCLEO_IKA01A1_PIN_CURRENT_SENSING (A2) + /* Photo sensor configuration output pin. */ #define X_NUCLEO_IKA01A1_PIN_PHOTO_SENSOR (A3)

X-NUCLEO-IKA01A1 Multifunctional board based on operational amplifiers.