I continued the class and added the other functions such as uturn, lights, and shift lane. The functions do no work 100% well yet so I still need to figure out the correct byte code to send. I also wrote a main.py file where I can run the functions from the class, created objects for each type of car I have and made aliasis for those objects to use in the code. I then wrote a simple program to start the car and then use command line input to trigger a specific function. I was able to successfully change the speed but the other functions did not work 100%. The stop function was also buggy so I replaced the stop code with just forwarding at a zero speed so the car stops. I played around and figured out a higher accel will cause the car to break more suddenly. Next time I want to figure out the byte codes for uturn and shift lane and proably start receiving data from the tracks as well.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.