Hi! New here.
I'm trying to make a two-wheeled robotic car using Arduino UNO, IR sensors (one on each of 4 sides), an Ultrasonic sensor, and 2 wheel encoders. It will map out a path as to cover the entire room (and then move along that path in normal operation, along with obstacle avoidance). My main worry is with the mapping part, so that's what I'll focus on here.
The pic shows a rough outline of the movement pattern during mapping. As a generic case I'll consider a rectangular (table) somewhere in the room. The car is placed is one corner of the room and moves in the zigzag gridlike pattern shown. The encoder data between the turning points are saved. When it encounters a fixed object like the table, it's movement (vertically) will be limited. When the object is no longer there, the front IR sensor will tell us that (as we can now move forward more than before). The encoder data is also used to find the width of the table (in encoder tics), and when the left sensor detects that we've "gone ahead" of the table (start of green line), the car will move left (= table width) and resume the normal pattern.
I realize the explanation might be a bit oversimplified but otherwise we'd be stuck here for a while. What I want to know: is there any code for a similar project out there? I'm prepared to do it from scratch, but since I'm juggling a few projects with a tight deadline, having something similar and making adjustments would save a lot of my time.
P.S. The IR sensor at the back would be used for a path corrective mechanism using black and white markers, but that'll be handled by another group member.
Any tips and resources are appreciated!
