January was exam season, so I did not work on the micromouse then, I picked it back up in February. During February I had completed the vera board construction of the LDR circuit for white line following. This year we are using the seesaw breakout board to give us extra ports for the microcontroller; I then connected each sensor to an analogue port on the seesaw, whilst Luke glued the seesaw board to the bottom of the micromouse. Once the sensors were correctly set up in the analogue ports, and the circuit was firmly attached to the micromouse I started on the coding. The first part of the code was using the arduino’s ‘analogRead();’ function to accurately measure the analog reading of the sensors when on white and black. Taking the median value of the white and black analog readings will determine the threshold. This threshold will be used to communicate to the microcontroller that is detecting white or black, for example if it is reading a value greater than the threshold it is on a dark surface. I then started working on our calibration feature, which is one of our special features, where pressing the left touch bar will take analog readings of white surface, and then pressing the left touch bar again after a few seconds take analog readings of the black surface, it will then calculate the threshold itself rather than us taking manual recordings.


0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *