Samuel Rusterholz
/
PM2_Example_IRSensor
Workshop 1
Diff: main.cpp
- Revision:
- 20:c52e148d933f
- Parent:
- 19:22e264bd960d
- Child:
- 21:4b708e9bfbf4
--- a/main.cpp Wed Mar 16 10:09:30 2022 +0000 +++ b/main.cpp Wed Mar 16 11:59:06 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() { @@ -46,7 +46,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) {