Severin Kiefer
/
PM2_Example_IRSensor
Workshop 1
Diff: main.cpp
- Revision:
- 18:21de1a131213
- Parent:
- 17:085fff8287d0
- Child:
- 19:ac26dab01633
--- a/main.cpp Mon Mar 14 15:51:51 2022 +0100 +++ b/main.cpp Tue Mar 15 10:40:22 2022 +0100 @@ -25,7 +25,7 @@ // Sharp GP2Y0A41SK0F, 4-40 cm IR Sensor float ir_distance_mV = 0.0f; // define variable to store measurement -AnalogIn ir_analog_in(PC_2); // create AnalogIn object to read in infrared distance sensor, 0...3.3V are mapped to 0...1 +// ??? // create AnalogIn object to read in infrared distance sensor, 0...3.3V are mapped to 0...1 int main() { @@ -47,7 +47,7 @@ if (do_execute_main_task) { // read analog input - ir_distance_mV = 1.0e3f * ir_analog_in.read() * 3.3f; + // ??? // if the mechanical button is pressed the extra led is blinking if (mechanical_button) {