Simple test application for X-NUCLEO-IKA01A1 expansion board.

Dependencies:   X_NUCLEO_IKA01A1 mbed

Fork of HelloWorld_IKA01A1 by ST Expansion SW Team

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.
Revision:
20:7f25e4cedd1a
Parent:
19:a8d8f1ef04f6
Child:
21:3b3d7bfcf94b
--- a/main.cpp	Tue May 09 11:58:20 2017 +0000
+++ b/main.cpp	Thu Jul 13 15:46:19 2017 +0000
@@ -75,9 +75,9 @@
         unsigned int op_amp_voltage = instr_amp->get_voltage();
         unsigned int op_amp_current = instr_amp->get_current();
         // pass the analog pin name on which voltage is to be read (e.g. A3 on LPCxpresso lpc11u68)
-        unsigned int photoSensorVoltage = photoSensor_windComp->get_voltage();                
-        unsigned int windComPin1 = photo_sensor_wind_comp->get_signal1();               
-        unsigned int windComPin2 = photo_sensor_wind_comp->get_signal2();                  
+        unsigned int photo_sensor_voltage = photo_sensor_wind_comp->get_voltage();                
+        unsigned int wind_com_pin1 = photo_sensor_wind_comp->get_signal1();               
+        unsigned int wind_com_pin2 = photo_sensor_wind_comp->get_signal2();                  
         
         pc.printf("\nopAmp measured voltage(mV): %u \n", op_amp_voltage);  
         pc.printf("\nopAmp measured Current(mA): %u \n", op_amp_current); 
@@ -86,12 +86,14 @@
         pc.printf("\nWindows comparator: signal 1 value(pin D4): %u \n", wind_com_pin2);   
 
         duty_cycle += 0.1; 
-        if (duty_cycle >= 1) 
+        if (duty_cycle >= 1) {
             duty_cycle = 0;
+        }
                      
-        pc.printf("\nLED Driver: duty cycle: %.2lf percent \n", led_Driver->set_duty_cycle(duty_cycle));              
+        pc.printf("\nLED Driver: duty cycle: %.2lf percent \n", led_driver->set_duty_cycle(duty_cycle));              
                                           
         myled = !myled;
         wait(1);      
     }    
 }
+