![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
TUK Workshop
Dependencies: mbed lib_workshop_2019
Diff: src/test_cny/ft_print_value_cny.cpp
- Revision:
- 2:8153195b1672
- Child:
- 7:c7ff04228b11
diff -r 7a8764e627b5 -r 8153195b1672 src/test_cny/ft_print_value_cny.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test_cny/ft_print_value_cny.cpp Wed Oct 23 13:56:30 2019 +0000 @@ -0,0 +1,29 @@ +/** + * @author geoffrey Vaquette + * + * @section DESCRIPTION + * + * Testing value from ultrasonic sensors on robot + * + */ + +#include "mbed.h" +#include "CNY70.h" + + +void ft_print_cny_analog_voltage(AnalogIn &analog_input, Serial &pc) +{ + /* TO BE IMPLEMENTED */ + const double max_voltage = 3.3; + double value = analog_input.read(); + double voltage = value * max_voltage; + pc.printf("voltage value : %lf V ", voltage); + return; +} + + +void ft_print_cny_library_voltage(CNY70 &cny_sensor, Serial &pc) +{ + /* TO BE COMPUTED */ + return; +} \ No newline at end of file