Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 18:21de1a131213
- Parent:
- 17:085fff8287d0
- Child:
- 19:22e264bd960d
--- 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) {