Friday, May 3, 2019

AM-90mins-Controlling the servo on the Donkey Car

April 3, 2019

Today, we worked on controlling the servo on the Donkey Car. From last time, we got an independent servo to move with the PS2 wireless controller. We then tried using the servo on the donkey car. For some reason, the servo on the donkey car would not move with the PS2 wireless controller. We did quite a bit of debugging but got stuck. Mr. Burnham came to help us. He read through the code to understand it then recommended that we should go back and use some of the servo code to move the servo back and forth without the controller and then test it with the donkey car controller. When we tried it with the independent servo it work. Then moving it to the donkey car servo, the servo worked. It moved back and forth with the code. This leads us to think that maybe the issue was with the connection between the controller and the servo rather than a faulty servo. In case we need to use a different code, we found a website that may have a clearer process and explanation of what they are doing than the one we have. Here is the link.

Next time:
  • Get donkey car servo to move with wireless controller
  • Connect the motors to the button inputs so that the car can move forward
  • More Arduino coding

Wednesday, April 10, 2019

AM-90mins-Arduino code receiving wireless controller input and servo moving!

April 10, 2019
Break through! Today, we made large strides in our Robo Car project. For one, we got the code to recognize the PS2 wireless controller. The issue last time may have stemmed from the disconnecting wires. This was easily solved with some electrical tape. Once we pressed all the buttons to make sure the code recognized them all, we began adding some servo code to it. Since we didn't remember all the servo code for Arduino, we refreshed our knowledge with the GitHub servo code for Arduino. We first tried to connect up the servo through the servo motor driver. However, none of us could remember how to connect it up to the Arduino, so we simply connected the servo directly to the Arduino. We will figure out how to connect up the servo motor driver to the Arduino later on. Since we only had one servo to test with the code, we wrote in that the servo would move to position 100 when the left button was pushed and to position 30 when the right button was pushed. We got servo to move!!! During the build, the PS2 wireless controller died. Since we replaced the batteries last time, we realized that we were leaving the controller on for an extended period of time. In turn, we started to turn off the controller when we did not need to use it to get output data.

Next time:

  • Connecting Arduino up to Donkey Car
  • Connect up the servo motor driver so we can have more servos connected
  • Connect up Arduino to Donkey Car motors
  • Research about integrating code with Donkey Car
  • Convert C++ to Python?
  • Design and 3D print camera mount
  • Controlling Donkey Car with the PS2 controller

Friday, April 5, 2019

AM- 1 hr 30 min- Deciphering PS2 C++ code...

April 5, 2019

This is what we did today:
Today, we tried out the Arduino code from last time. It took us a while to get back to where we were because we forgot which wires went to which pins. Once we got it, the light would blink and when it connected to the controller, it would not blink. However, Benny found a better code by watching a helpful YouTube video. In the description, the person links you to their website where you can get the PS2 library and the example code. The example code provided much more results than the other one. In regards to how far we got, the Serial Monitor prints "Unknown  Controller," which is an issue because it should print "Dual Shock Controller," or have similar results to the controller in the video because they are the same. Most of the time, we spent trying to debug the "Unknown Controller" problem.

Next Steps:

  • Figure out how to get the program to recognize the controller
  • Have the program read the inputs
  • Design/Mount the camera to the Donkey Car

Wednesday, March 20, 2019

AM-60min-Decipher code and connecting pins


March 20, 2019
Next Steps:

  • Figure out what the code does
  • Get the program to recognize the controller signals
  • Map out the buttons

What We Did Today:
Today we opened up the Arduino code that we found last time. We had troubles getting the code to work because we needed to download the library for it. After a little while fussing with downloading the code, we tried compiling the code again and got it to work. We then connected the pins up according to what the code said. There is data (DAT), command (CMD), clock (CLK), and another pin called SEL. When we connected up the pins to the controller, we got the controller to light up. From the serial monitor, it read "Distance: 0." Since we did not have enough time to figure out what was going on we will read through it next time.

This is the code we used and we had to download the library.


Wednesday, March 13, 2019

AM-30min-Discussing Future Tasks

March 13, 2019
Next Steps:
  • Find and figure out what the Arduino PS2 controller code from the website does
  • Test the code on one of our Arduinos
  • If the C++ code works, convert it to Python 

What We Did Today:
This is a diagram that shows what each pin does on your wireless controller.¹
  • Nic went through resources we collected to find the controller program he found
  • Amy and Benny went through the Interfacing PS2 Wireless Controller With Arduino website with Mr. Burnham  and discussed possible next steps
  • Since the code was for Arduino, Mr. Burnham proposed running the code on Arduino to check if it work, then convert the code to Python

Resources:

Thursday, February 28, 2019

AM-30min-Looking up PS2 wireless controller code

February 28, 2019

Next Steps:




  • Finding Python code for the PS2 wireless controller
  • Test code for PS2 wireless controller
  • Consult Mr. Burnham about PS2 wireless controller code
Today was a research day. We looked up code for the PS2 wireless controller. Most of the code we found was for the Arduino (C++ code), however there is one code that supposedly has a library for an autonomous donkey car. We did not get to explore it fully, but we may come back to test out the code more.

Friday, February 15, 2019

Assignment: Come Up with a Team Name, and a Picture

Mr.Burnham's Assignment/Request: 
If you want to update your DIY Robo Car #1 cover image, post it here on the blog and I'll update the Robot Club link page.

  • Edit this post title to say "DIY Robo Car #1 Project Cover Image"
  • Add Image here that is a square, with your cover art and logo inside