... | ... | @@ -44,7 +44,17 @@ |
|
|
>
|
|
|
> [![image alt text](http://img.youtube.com/vi/k6nARWC63OY/0.jpg)](http://www.youtube.com/watch?v=k6nARWC63OY)
|
|
|
>
|
|
|
> ##### Fig. 3: Video showing the robot balancing in a dark room. The PID values are changed using a bluetooth connection. The robot is very shaky and has a hard time balancing.
|
|
|
> ##### Fig. 3 - Video showing the robot balancing in a dark room. The PID values are changed using a bluetooth connection. The robot is very shaky and has a hard time balancing.
|
|
|
>
|
|
|
>Though we managed to make it balance for a few seconds it was constantly moving and shaking in it’s struggle to stay on the pivot-point. This may be due to the physical construction of the robot and will be discussed further in exercise 3.
|
|
|
>
|
|
|
>
|
|
|
>DATALOG offset værdien, så vi kan se hvor længe robotten kan holde sig tæt på værdien før den vælter.
|
|
|
While implementing the datalogger in the SejwayLight class, we learned that the standard datalogger was interfering with the robots ability to balance.
|
|
|
This was because that the standard datalogger interrupts communication to the sensor when it tries to read data from it and write the data right away. We learned that we had to rewrite the datalogger class to make it store the sensor data in the buffer and only write it to a file after the program had finished running.
|
|
|
In the datalogger class we had to replace FileOutputStream with BufferedOutputStream to do this.
|
|
|
>
|
|
|
>
|
|
|
>
|
|
|
>---
|
|
|
>
|
... | ... | |