Use an ultrasonic sensor to measure altitude (when very close to the ground) and display it in the cockpit of an airplane.
- Arduino Nano
- MaxBotix MB1000, MB1010, MB1020, MB1030, or MB1040 LV-MaxSonar-EZ
- 128x64 I2C OLED Display
- PlatformIO
pio run --target upload
We read the PWM (pulse width modulation) output of the ultrasonic sensor by connecting it to one of the Arduino Nano's digital pins with PWM capability (D3, D5, D6, D9, D10 or D11).
We control the OLED Display using the Arduino Nano's I2C pins A4 (SDA) and A5 (SCL).