Got the challenge to start working. We are using the follow the left side of the maze technique. The robot does a fine job of getting around the first two bends. However, have not figured out a way for the robot to turn around the U bend though. Once we get this working challenge I think should be complete.
This allows robot to dectect if wall is in front and then turn right as a result keeping the wall always on its left.
Added each pixel colour values to for loops to determine if red wall or a gap.
Changes:
Changed all the whiteCount to redCount for challenge.
Removed the additional for loops in challenge that did not do anything. Just went through column = 0 to cameraView.width but nothing was done with value. Means code is slightly tidier.
Change the vLeft and vRight ot just vSpeed as we were always using the same value for this. Did testing for each core, completion and what of challenge works so far. No issue with the speed change value.
Queries:
Is our FOVArraySize actually correct?... we go up to side size of 10 but we get the whole height for when determining the arraySize.
Any help with U bend turn would be amazing.
Got the challenge to start working. We are using the follow the left side of the maze technique. The robot does a fine job of getting around the first two bends. However, have not figured out a way for the robot to turn around the U bend though. Once we get this working challenge I think should be complete.
Added: "if (averagePos > 100 && averagePos < 200 && get_pixel(cameraView, rowSelected, cameraView.width/2, 3) < 250)"
This allows robot to dectect if wall is in front and then turn right as a result keeping the wall always on its left. Added each pixel colour values to for loops to determine if red wall or a gap.
Changes: Changed all the whiteCount to redCount for challenge. Removed the additional for loops in challenge that did not do anything. Just went through column = 0 to cameraView.width but nothing was done with value. Means code is slightly tidier. Change the vLeft and vRight ot just vSpeed as we were always using the same value for this. Did testing for each core, completion and what of challenge works so far. No issue with the speed change value.
Queries: Is our FOVArraySize actually correct?... we go up to side size of 10 but we get the whole height for when determining the arraySize. Any help with U bend turn would be amazing.