Today we continued using Pico Blocks. We learned how to create programs using Bang-Bang control. Bang- Bang Control means that the you are either doing one thing, or the other.
Programs for forward, backward, break, spin right, spin left, bear right, bear left. This way if we want to turn or move forward, we don't have to write out the whole code, we can just pull over the forward or bear right block.
This is our program to get the car to respond to delrin. The light sensor senses the delrin, and when the sensor reads over 15 (the delrin is farther away) it it moves forward. If less than 15, it moved backwards. The only problem was that it would start to spaz out when the sensor reads exactly 15. We put in a wait so that there would be time for the 'dot' to read the program.
Here we began to follow the line assignment using the light sensor
white line: 420
masonite: 560
Want we wanted to happens was if the sensor read less than 480, it would go forward, other wise we wanted it to scan left and right until it read less than 480 again. This didn't exactly happen.
This is almost the same thing but we added a waituntil so that the program scan left until it read less 480 then continue forward.
We tried changing the contraints to the sensor reading value between 550 and 560 (masonite) and a simpler if else command.
We embedded an If-then-else statement to try and clarify the command
Fiddling around some more. We tried to make things more specific but it still was working inconstantly.