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:
- 20:c52e148d933f
- Parent:
- 19:22e264bd960d
- Child:
- 21:f13e39291d80
--- 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) {