Today we learned that we are starting the semester with a robot project.
Above are the requirements for the prototype.
At the end of our project we are going to build a sumo battle bot.
Above are the requirements for the sumo battle bot.
Moving Servo
With the help of a reference we coded our first servo to move.
Servo wiring
We used TinkerCad to show a representation of our servo wiring.
Two Independent Servos
Today we learned how to wire and code two independent servos.
Research
Battery Power Wiring
Today we learned how to wire the battery pack through TinkerCAD.
Battery Power
We used what we learned on TinkerCAD to wire battery packs to the breadboard to make our wheels independent from the computer.
Robot Base Built
We built a robot base capable of supporting our robot's movement.
For-Back-Left-Right
Today we coded our robots to move in the 4 fundamental directions.
Function Code
Today we learned how to shorten our code using functions.
/* Sweep
by BARRAGAN <http://barraganstudio.com>
This example code is in the public domain.
modified 8 Nov 2013
by Scott Fitzgerald
http://www.arduino.cc/en/Tutorial/Sweep
*/
#include <Servo.h>
Servo left; // create servo object to control a servo
Servo right; // create servo object to control a servo
int pos = 0; // variable to store the servo position
void setup() {
left.attach(9); // attaches the servo on pin 9 to the servo object
right.attach(11); // attaches the servo on pin 9 to the servo object
}
void Forward(){
left.write(180); // tell servo to go to position in variable 'pos'
right.write(0); // tell servo to go to position in variable 'pos'
}
void Backwards(){
left.write(0); // tell servo to go to position in variable 'pos'
right.write(180); // tell servo to go to position in variable 'pos'
}
void Leftturn(){
left.write(0); // tell servo to go to position in variable 'pos'
right.write(0); // tell servo to go to position in variable 'pos'
}
void Rightturn(){
left.write(180); // tell servo to go to position in variable 'pos'
right.write(180); // tell servo to go to position in variable 'pos'
}
void Stop(){
left.write(90); // tell servo to go to position in variable 'pos'
right.write(90); // tell servo to go to position in variable 'pos'
}
void loop() {
Stop();
delay(6000);
Forward();
delay(8000); // waits 15ms for the servo to reach the position
//Backwards();
delay(0); // waits 15ms for the servo to reach the position
Rightturn();
delay(500); // waits 15ms for the servo to reach the position
Forward();
delay(7000);
Leftturn();
delay(800); // waits 15ms for the servo to reach the position
Forward();
delay(7000);
Stop();
delay(3000); // waits 15ms for the servo to reach the position
// left.write(180); // tell servo to go to position in variable 'pos'
// delay(1000); // waits 15ms for the servo to reach the position
//left.write(0); // tell servo to go to position in variable 'pos'
//delay(1000); // waits 15ms for the servo to reach the position
// left.write(90); // tell servo to go to position in variable 'pos'
// delay(1000); // waits 15ms for the servo to reach the position
// right.write(180); // tell servo to go to position in variable 'pos'
// delay(1000); // waits 15ms for the servo to reach the position
//right.write(0); // tell servo to go to position in variable 'pos'
// delay(1000); // waits 15ms for the servo to reach the position
//right.write(90); // tell servo to go to position in variable 'pos'
//delay(1000); // waits 15ms for the servo to reach the position
}
Mini Track
Today we coded our robots to traverse a mini track.
Learning Technical Sketching
Draw horizontal line
Draw vanishing point
Draw fronts of forms
Draw diagonals to the vanishing point
Draw the backs of forms
Erase construction lines
Shade forms
OnShape and Physical wheels
We designed our wheels with precise measurements on OnShape, then laser cut them and attached them to our hobby motors.
Hobby motor moving.
We coded our first hobby motor to move.
Two hobby motors moving
We coded a second hobby motor to move.
Ultrasonic sensor working
We coded an ultrasonic sensor that shows its distance from objects on a serial monitor.
Robot avoids walls
We coded our robot and ultrasonic sensor to sense the distance from objects to avoid them.
Bluetooth connected
We connected a Bluetooth board to input commands from our phones to control our servo robot. We used a LED to show the connection to the phone.
Robot base built(2)
We built a robot base capable of supporting our new robot's movement.
Final Robot
Robot Idea Development
My plan for making my robot is to design Perry the platypus. I plan on making the body more of a box shape. I will cut holes in the bottom of the design for the wheels to fit. I also plan on making Perry's signature hat and allow it to be removeable.
Built Robot
The final draft of my robot
Robot moving
Video of robot functioning
Kitty Condo or Dog Kennel Calendar
We are tasked with creating a kitty condo or dog house. We have six weeks to do this and a more detailed calendar above.
Project Constraints and Stamps
The constraints for this project are listed above.
4 Sketches
We brainstormed four sketch ideas for our dog house.
Scaling Practice
Today in class we practiced drawing a dog house and scaling dimensions.
Detailed sketch
We were tasked with creating a detailed drawing we would use to plan our builds.
Onshape 1
We created our pieces in Onshape to create a cut-list for the laser cutter.
Prototype 1
We laser cut our pieces and created our first prototype/rough draft.
Onshape 2
We refined our desgin and made sure the pieces fit together for our final prototype.
Prototype 2
We laser cut our pieces from our final Onshape design and put them together.
Imaging practice 1
We created images on our Adafruit Feather using Mu. I chose to create a thundercloud.
Final Machine Learning Model
Our goal was to create a model that could recognize each student with pictures. The data in this model was created by hundreds of pictures of each student. The model turns the pictures into matrices and creates patterns used to differentiate each student. My model was able to do this with 95% accuracy.