This project is an autonomous smart car developed for the DEU ETE3007 Fundamentals of Robotics Robot Challenge (Spring 2025). The car uses a modular event-driven control system, relying solely on onboard sensors and logic to navigate the competition track featuring hills, wall obstacles, and color zones.
Build an autonomous mobile robot capable of navigating the challenge track from start to finish, without remote control, in accordance with competition rules. The robot must:
- Start autonomously after a reset
- Pass over a hill and through three wall obstacles
- React accurately to colored track zones
- Reach the finish line while earning checkpoints and time bonuses
Component | Description |
---|---|
π§ Arduino Uno | Main microcontroller |
βοΈ Adafruit Motor Shield | Controls 4 DC motors |
π 4x DC Motors | Provides locomotion |
π Ultrasonic Sensor | Used for obstacle detection and alignment |
π Battery Pack | Powers motors and Arduino |
The robot is driven by a custom event queue system, where each event contains:
- An action function (what the robot should do)
- A condition function (when to do it)
- An optional duration (how long the action should run)
struct Event {
ActionFunction action;
ConditionFunction condition;
unsigned long duration; // in ms
};
- Event Queue Logic: Modular movement instructions that run under given conditions or time constraints
- Distance Alignment:
AdjustMiddle()
aligns the robot to a target distance using PID-like speed control - Actions Supported:
- Forward, Backward
- Left and Right Turn
- Stop
- Obstacle Handling: Ultrasonic sensor helps maintain spacing from obstacles (walls, checkpoints)
- Connect hardware as follows:
- Motors to M1βM4 on AFMotor Shield
- Ultrasonic sensor:
TRIG_PIN
β A1ECHO_PIN
β A0
- Upload the sketch to the Arduino.
- Place robot at the start line.
- Press the reset button to start execution after refereeβs start signal.
The robot proceeds through a sequence of actions such as:
- Drive forward for specified durations
- Use
AdjustMiddle()
to align distance (e.g., before a wall or obstacle) - Turn left or right at specific checkpoints
- Stop at the finish line
Example event:
addEvent(
[]() { AdjustMiddle(26); },
[]() { return CorrectFlag; },
0
);
The robot is designed to maximize the following:
- β Passing Checkpoints (walls and hill)
- β± Time Efficiency via optimized speed and smooth transitions
- π€ Complexity & Embedded Control using event-based logic
- π Distance Adjustments for obstacle safety
- π¨ Future additions may enhance aesthetics if needed
smart-car/
βββ smart_car.ino # Main Arduino code
βββ README.md # Project documentation (this file)
βββ competition_doc.pdf # ETE3007 competition guidelines
β
No remote control used
β
Fully autonomous and self-contained
β
Communication modules (Bluetooth/WiFi) not used during execution
β
Final reset logic triggered manually before starting
MIT License β free to use, modify, and learn from for educational and competitive purposes.