Huff, spring break just passed and I haven’t even written this in advance… I need to stop procrastinating…
But anyways, I think it is week 11, but not too positive, and spring break sure is a time to do stuff. I posted two posts on my “diary” website, but yet again, my crappy server broke down and the website is not accessible. So I will just post some of the pictures I posted there here. These are for V1 of my car, built on Mar. 15, 17. If you are on a mobile device like the iPad, click on the images to view the caption (they’re pretty important). If you’re on PC, I don’t know if captions show, but there are captions on most of the photos.
So, after that, I did a few upgrades, fixed the motor that didn’t really work, and plugged all the Input Outputs! I realized that the Pi can never power the motor, on its own, to make it work as normal. So I basically added another power supply to the motors. This means I will have two battery packs on my car, one for Pi, one for the motors. This is V2.0.
In my meeting with my mentor, I started writing code the car. The first step is to set up the initial initialization, like assigning output to the motor’s pins (24-27). Then, I have to figure out a logic for the car. This includes a exclusive list of the things it will perform under one of the many conditions. So much work for me in the coming weeks…
De Bono Time:
The six hat conversation:
First, I would like to say that most of the time we are talking, we are just confirming our thoughts or proposing a solution that may well be the only one suitable, and we are only talking like 30% of the time in the 2 hours, so I will try to skip over some mumble jumble. OH, and also our conversation is in Chinese, so it is hard for me to translate it into English word for word. I will just say the overall message. Legend on bottom.
Me: Telling my mentor the different things I’ve added since he last saw photos of it. (1.0 to 2.0).
Also tell him of my logic diagram I am working on. Also tell him of my goal for the night, which is to find out if my diagram works, my car’s design works, my motors function, and some python coding if we have time.
Mentor (and me, but mostly him): Confirm what I said, suggest a new method of figuring out what the logic of the car is. Demonstrates the method and work out the car’s reactions to different input values when it is first starting. (put down on the ground and motors are 0) Everyone agrees that this method is a lot better to follow when writing a code. Ask me to list what the car should do in each situation (ex. right IR sensor detects black, nothing else). Discuss about the type of line & and thickness for IR sensor.
20 min. later.
Me: Discuss how to control the motors, and testing a test code to see if motors function.
test code didn’t work,
Mentor: tells me why code won’t work. Deletes, or comments out most of code that didn’t work.
looking up pwm (pulse width modulation or something, it makes the motors spin slower)
Mentor: (don’t know python, but know the usual syntax and logic of the language) Copies a LED code over to the motor, changing some values. It is meant to fade an LED back and forth. He thinks that it should work, because they are both outputs, and there really isn’t much difference between them.
didn’t work at first, but when the work percentage/duty cycle is higher (spin faster) it works. We tested that it can start moving at around 65% when it was stationary through a lot of trials.
50 min. later.
Mentor: Suggest a new code that don’t fade out, and allow us to call it up pretty quickly using the “def” function. We also discovered that it allows us to change the variables pretty quickly (time and duty cycle). Also suggests that I put comments on my code so I can remember what they do later.
Me: It also makes your code easier to read to other people so they can know what you are doing.
Me: commenting code is boring, basically you just label the code, but I feel like I will probably forget what this line means in like two days, so I should probably still label it.
me labeling code for 20 min.
Some other little things we discussed that I won’t document here, and our meeting is finished.
White Hat – info
Red Hat – feelings, instinct
Black Hat – criticism
Yellow Hat – the good stuff about something
Green Hat – brainstorming/creativity
Blue Hat – the agenda