I am not sure exactly how many parts this series will be. As I publish more of the parts I will return to this post and modify it to have links here to the other parts.
The first thing I did is decide on a goal. I wanted to have a potentiometer control the direction and speed of a motor as I turned it. The reason I wanted this was because my next project is going to be having the motor respond to inputs from sensors that I have not used before, so I wanted to make sure that when the time comes to learn how to wire and program with those sensors that I will have the wiring and programming already correct for the motor part. Everything is baby steps.
After coming up with the goal I reflected on what I already knew and what I would need to adapt from this.
- I already knew how to use LEDs and I knew that putting a stronger resistor with an LED will make it glow dimly while putting a weak one will make it glow strongly.
- I also knew that a potentiometer is a variable resistor. This means that as you rotate the dial it will go from being a weak resistor to being a strong one.
- So what I needed to do first was figure out how to make it so that the potentiometer is set as an input with the middle value set as a neutral and anything below that value triggering a red light and anything above that value triggering a green value.
- I had found good tutorials for Arduino at Learn Sparkfun before and decided to look there for a potentiometer tutorial. I found one, copied it and within 5 minutes had a blinking LED. As I turned the potentiometer the light blinked faster or slower. (I used their code exactly as it appeared, so if you are trying to replicate this. Follow their wiring guide and their code.)
- Now to figure out the motor. I knew that the motor and motor controller were from FingerTech Robotics in Saskatoon, so I thought I would start with their website. They had a video of a guy using the ESC (electronic speed controller) with a RC controller (a radio controller) not an arduino. Hmm. I knew from the robot competition last year that I saw students from other schools using an Arduino to control their motors, but how? I googled Arduino TinyESC tutorial and found a tutorial at tech valley projects, it looked hopeful so I dutifully copied it.
- The motor started to turn. That is fun. I have no idea why. So I think I have the hardware setup, now I have to figure out the programming.
Figuring out the programming turned out to be a lot harder process. Join me in part 2 as I go through the tech valley programming and discover that while the hardware setup is correct that the programming is almost completely wrong and I need to go in a different direction if I actually want to have control over the motor.
The other thought I have about all of this is that it reminds me of one of the lessons from my ECI 831 class on the importance of remixing. There was a great video series that I watched on remixing and the role it plays in creativity and learning called Everything is a Remix. Right now I am in the copy stage of the copy –> Transform –> Combine. Part 2 I will enter into the transform portion of the project as I start to change things in the code.
Thanks for stopping by, hope you enjoyed the read.