Update README.md
This commit is contained in:
@@ -4,6 +4,8 @@ This project controls a small two-wheel robot that travels toward a target based
|
||||
|
||||
The OLED screen, LED, and buzzer provide clear status feedback throughout the process.
|
||||
|
||||
<a href="url"><img src="./images/connections.png" width="600"></a>
|
||||
|
||||
## Features
|
||||
|
||||
- Button-controlled start
|
||||
@@ -85,16 +87,6 @@ Beep three times
|
||||
Pause, then reset
|
||||
```
|
||||
|
||||
## Core functions
|
||||
|
||||
### `wait_button_press()`
|
||||
|
||||
Waits until the physical button is pressed. The function deliberately blocks so the robot cannot begin moving before user confirmation.
|
||||
|
||||
### `get_steps_from_distance(distance)`
|
||||
|
||||
Converts the ultrasonic sensor's distance measurement into the number of steps required by the motors. Keeping this calculation in a separate function makes it easy to recalibrate the robot for different wheels, motors, or measurement units.
|
||||
|
||||
## Tilt detection
|
||||
|
||||
After every pair of motor movements, the program reads `AcY`. A reading outside the permitted range indicates that the robot has tilted and may no longer be driving safely.
|
||||
|
||||
Reference in New Issue
Block a user