In this project, we will learn about robotics and their importance in the world.
By the end of this project, I will have a functioning robot that I can control with my phone.
In this video, we learned how to wire a servo to make it move back and forth.
/* 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 myservo;Â // create servo object to control a servo
// twelve servo objects can be created on most boards
int pos = 0;Â Â // variable to store the servo position
void setup() {
  myservo.attach(9); // attaches the servo on pin 9 to the servo object
}
void loop() {
  for (pos = 0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees
    // in steps of 1 degree
    myservo.write(pos);       // tell servo to go to position in variable 'pos'
    delay(15);            // waits 15ms for the servo to reach the position
  }
  for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
    myservo.write(pos);       // tell servo to go to position in variable 'pos'
    delay(15);            // waits 15ms for the servo to reach the position
  }
}
In this video we made the servo go back and forth based on the wiring and code we used in Tinkercad.
In this video we made an additional servo move back and forth by wiring it to the same places as the first servo.
We coded the Servos to function independently. In the video, they turn and move at different times.
/* 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 myservo;Â // create servo object to control a servo
// twelve servo objects can be created on most boards
Servo myservo2;
int pos = 0;Â Â // variable to store the servo position
void setup() {
  myservo.attach(9);
  myservo2.attach(11); // attaches the servo on pin 11 to the servo object
}
void loop() {
  for (pos = 0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees
    // in steps of 1 degree
    myservo.write(pos);       // tell servo to go to position in variable 'pos'
    delay(15);            // waits 15ms for the servo to reach the position
  }
  for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
    myservo.write(pos);       // tell servo to go to position in variable 'pos'
    delay(15);            // waits 15ms for the servo to reach the position
  }
  for (pos = 0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees
    // in steps of 1 degree
    myservo2.write(pos);       // tell servo to go to position in variable 'pos'
    delay(15);            // waits 15ms for the servo to reach the position
  }
  for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
    myservo2.write(pos);       // tell servo to go to position in variable 'pos'
    delay(15);            // waits 15ms for the servo to reach the position
  }
}
This is the wiring we will use to make the independently functioning servos that are battery powered.
In this video, we made two independently functioning servos that are battery powered.
This is the cardboard prototype I made to hold the breadboard, batteries, and wires.
/* 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 leftservo;Â // create servo object to control a servo
// twelve servo objects can be created on most boards
Servo rightservo;
int pos = 0;Â Â // variable to store the servo position
void setup() {
  leftservo.attach(9);
  rightservo.attach(11); // attaches the servo on pin 11 to the servo object
}
void loop() {
    leftservo.write(180);
    rightservo.write(0);
    delay(2000);
    leftservo.write(0);
    rightservo.write(180);
    delay(2000);
    leftservo.write(180);
    rightservo.write(180);
    delay(1000);
    rightservo.write(0);
    leftservo.write(0);
    delay(1000);
  }Â
Â
/* 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 leftservo;Â // create servo object to control a servo
// twelve servo objects can be created on most boards
Servo rightservo;
int pos = 0;Â Â // variable to store the servo position
void setup() {
  leftservo.attach(9);
  rightservo.attach(11); // attaches the servo on pin 11 to the servo object
}
void forward() {
    leftservo.write(180);
    rightservo.write(0);
}
void left() {
    leftservo.write(0);
    rightservo.write(90);
}
void right() {
    leftservo.write(90);
    rightservo.write(0);
}
void backward() {
    leftservo.write(0);
    rightservo.write(180);
}
void loop() {
    forward();
    delay(3000);
    backward();
    delay(3000);
    left();
    delay(3000);
    right();
    delay(3000);
}
Â
In this video, I coded my robot to move forward for two seconds, backward for two seconds, left for one second, then right for one second.
In this video, we started coding our robot to move through a path. One physical iteration I made was when I put too much weight in the front of the robot.  The robot's wheels would stutter, so I used batteries to add weight to the back of the robot. I also coded the robot to move in a direction for too long, or turn too far, so I had to go back and decrease the delay.
/* 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 leftservo;Â // create servo object to control a servo
// twelve servo objects can be created on most boards
Servo rightservo;
int pos = 0;Â Â // variable to store the servo position
void setup() {
  leftservo.attach(9);
  rightservo.attach(11); // attaches the servo on pin 11 to the servo object
}
void loop() {
    leftservo.write(180);
    rightservo.write(0);
    delay(5000);
    leftservo.write(180);
    rightservo.write(180);
    delay(1000);
    leftservo.write(180);
    rightservo.write(0);
    delay(7400);
    leftservo.write(0);
    rightservo.write(0);
    delay(1000);
    leftservo.write(180);
    rightservo.write(0);
    delay(5000);
    leftservo.write(180);
    rightservo.write(180);
    delay(2100);Â
  }Â
Â
In this video, we coded and wired an Ultrasonic sensor. It shows the distance between the sensor and objects by emitting an ultra sound at 40,000 Hz. The ultra sound waves travel through the air and bounce back when they hit an object. It then uses the travel time and speed of the waves to calculate the distance between the sensor and the object.
This is the Circuit Diagram I made on TinkerCAD. It has the breadboard, servos, Arduino, ultrasonic sensor, and wires.
/* 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 leftservo;
Servo rightservo;
const int trigPin = 4;
const int echoPin = 6;Â
long duration;
int distance;
void setup() {
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);
  Serial.begin(9600);
  leftservo.attach(10);
  rightservo.attach(9);
}
void forward() {
  leftservo.write(180);
  rightservo.write(0);
}
void left() {
  leftservo.write(0);
  rightservo.write(90);
}
void right() {
  leftservo.write(90);
  rightservo.write(0);
}
void backward() {
  leftservo.write(0);
  rightservo.write(180);
}
void loop() {
  digitalWrite(trigPin, LOW);
  delayMicroseconds(2);
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);
  duration = pulseIn(echoPin, HIGH);
  distance = duration * 0.034 / 2;
  Serial.print("Distance: ");
  Serial.println(distance);
 Â
if (distance < 5) {
right ();
delay (700);
forward ();
}
}
In this video, we coded and made a gearbox for the wheels of the final robot. In the gearbox, the parent gear moves the child gear faster so that we don't have to increase wheel size.
I coded my robot to stop and turn when it gets close to a wall. If the distance between the sensor and an object is less than three, the robot will turn right for 1.25 seconds then go forward.
Today in class, we learned how to code and make our Bluetooth module work. We can change the light brightness of the LED on our phone, or how often it blinks.
#include <Servo.h> // this refers to a "library" that knows how to control servos
Servo rightservo;Â
Servo leftservo;
#define CUSTOM_SETTINGS
#define INCLUDE_GAMEPAD_MODULE
#include <Dabble.h>
void setup() {
  Serial.begin(250000);     Â
  Dabble.begin(9600);  Â
  leftservo.attach(9);
  rightservo.attach(10);
}
void forward(){Â
  leftservo.write(0);
  rightservo.write(180);
}
void backwards(){
  leftservo.write(180);
  rightservo.write(0);
}
void left(){
  leftservo.write(0);
  rightservo.write(0);
}
void right(){
  leftservo.write(180); Â
  rightservo.write(180);Â
}
void stopping () {
  leftservo.write(90);
  rightservo.write(90);
}
void loop() {
 Dabble.processInput();           Â
  Serial.print("KeyPressed: ");
  if (GamePad.isUpPressed())
  {
    Serial.print("UP");
    forward ();
  }
  if (GamePad.isDownPressed())
  {
    Serial.print("DOWN");
    backwards ();
  }
  if (GamePad.isLeftPressed())
  {
    Serial.print("Left");
    left ();
  }
  if (GamePad.isRightPressed())
  {
    Serial.print("Right");
    right ();
  }
  if (GamePad.isSquarePressed())
  {
    Serial.print("Square");
    stopping ();
  }
  if (GamePad.isCirclePressed())
  {
    Serial.print("Circle");
  }
  if (GamePad.isCrossPressed())
  {
    Serial.print("Cross");
  }
  if (GamePad.isTrianglePressed())
  {
    Serial.print("Triangle");
  }
  if (GamePad.isStartPressed())
  {
    Serial.print("Start");
  }
  if (GamePad.isSelectPressed())
  {
    Serial.print("Select");
  }
  Serial.print('\t');
  int a = GamePad.getAngle();
  Serial.print("Angle: ");
  Serial.print(a);
  Serial.print('\t');
  int b = GamePad.getRadius();
  Serial.print("Radius: ");
  Serial.print(b);
  Serial.print('\t');
  float c = GamePad.getXaxisData();
  Serial.print("x_axis: ");
  Serial.print(c);
  Serial.print('\t');
  float d = GamePad.getYaxisData();
  Serial.print("y_axis: ");
  Serial.println(d);
  Serial.println();
Â
}
This is a video of my phone controlling my robot. I made coded five functions; forward, backwards, left, right, and stop.
The robot it stable and doesn't slip on the floor. It turns perfectly, as the video shows.
These are photos of my robot. The top opens up to reveal the wires, batteries, wheels, gearboxes, servos, breadboard, and arduino.Â
In this video, we controlled our robot to go through a course.Â
This page describe the requirements for our lockbox projects.
This page shows all of the box benchmarks that we are going to need to document for this project
This page shows all of the lock benchmarks that we are going to need to document for this project
The table saw is used to make straight cuts. Its primary use is for rip cuts, which are wooden cuts parallel to the grain.Â
In class, we used the table saw to make rip cuts.
The planer removes material from the top of the object to perform three functions; reduce the thickness of your material, make the material a uniform thickness, and make your material smooth and nice.
After using the table saw, we used the planer to even out the surface of the wood.
The miter saw is used to make cuts across the length of the wood or cut angles.
We used the miter saw to cut the planed wood into smaller pieces for our lock box project.
This is the Introduction to Sketching self-guided course on Onshape I completed.
This is the Navigation Onshape self-guided course on Onshape I completed.
This is what I learned to make after finishing the Navigating Onshape course.
Cuts "biscuit shaped" holes in your material is that you can assemble your parts to be both perfectly aligned and sturdy. Once you make your biscuit cut, you can glue your parts together creating what is called a "glue-up". When using the biscuit joiner, wear safety glasses, make sure it is set for the appropriate size of biscuit, make sure you set the hieght in the middle of the material, mark both sides of the material, and clamp a block of material each time.
The CNC router uses inputs from a CAD file to cut and carve parts/pieces. When using it, you should wear safety glasses, ear protection, secure your material, design around your screws, vaccuum after use, and run the dust collector. vCARE PRO is used to develop simple designs for cutting/engraving. OnShape files are used for more complex designs. Shopbot software actually controls the machine and runs the CAD files.
Smoothes out flaws, and prepares wood for staining. It can ven resolve edges that perfectly mathc up. To use it, wer=ar safety glasses, keep your sander moving at all time. and be careful not to place sander on your skin.
In a pin tumbler lock, the outside part is called the case and the inside part is called the plug. The opening is called the keyway. On the inside, there are several vertical shafts that go through the case and the plug. Each shaft has a spring, a driver pin, and a key pin. The springs press all the parts down so that they are resting on the ledge. The pins meet at a different level for each shaft. In order for the plug to turn, the pins must line up with the shear line. When the correct key is inserted, the pins line up with the shear line and the plug can turn. This lock fits all of the constraints and is feasible to make in class if we make it in wood rather than metal.
In a combination lock, there is a case that holds all the parts. The curved metal part is called the shackle, which doesn't come out until the right combination is entered. Inside the cover is the lever, which slides onto the bar and moves counterclockwise. There is a outward curved metal piece attached to the latch. This piece makes the lever want to spring back to its original position, and it would keep going if it weren't stopped by the tiny bump in the cover. The lever also has a latch that is spring loaded from the inside. In order for it to lock, the shackle has to come down, push the latch in, and then the latch will fit into the groove of the shackle. When the shackle is pulled out, the latch is forced to rotate in order to allow the shackle to come all the way out. Then the lever springs back into place. The black plate has a bar sticking out of it which holds the three cams, washers in between, and a spring. The spring makes sure that everything is pressed together. The first cam is attached to the dial, but cam two and three can spin freely, so when the dial turns, the first cam turns, too. Each of the cams have an indentation in them. The lock can open when all three of the indentations are aligned because the lever can only rotate when it has the space that the indentation gives it to rotate. Each cam has a tooth in it. When you turn cam three far enough, the tooth will contact cam two, and if you keep turning, all three cams will move together. This is how the cams move in order for the indentation to align. This lock fits all the constraints and could be feasible to make in class if we make it in wood rather than metal.Â
In the Arduino based RFID door lock, the serial numbers for the accepted tags are stored in an array at the beginning of the code. When the tag number is read, it is sent to a function which checks to see if the number is in the list of accepted numbers. If it is, then the green LED will flash, indicating that the RFID tag has been successfully authenticated and will then trigger the mechanism to lock or unlock. If the tag number is not in the list of accepted numbers, then the red LED will flash, indicating that the RFID tag has been read but not authenticated. This lock is feasible to make in class and meets the constraints of the project.
To make the fingerprint door lock, an Adafruit Fingerprint Sensor, solenoid 12-volt lock, Arduino Uno r3, and batteries are required. Once everything is set up correctly, the fingerprint sensor will read your fingerprint. If it is the correct fingerprint, then the door lock will unlock. When you place the correct fingerprint on the sensor again, then the door lock will lock.
When wood staining, where gloves, always stain over a drop cloth, use a cotton cloth to apply stain, and put a small amount of stain on your rag. Do not mix stains or leave staining materials out.
These three are parts of the lock I recreated on Onshape using the dimension, 3 point arc, tangent arc, center point circle, 3 point circle, center point rectangle, line, construction, and trim tool. After we designed the lock parts on Onshape, we used the laser cutter to cut them out.Â
In class, I made a combination lock on onshape and cut it out using the glowforge. This video is the lock assembled and functioning.
Today in class, I started prototyping my lock by drawing out shapes on cardboard and using the band saw to cut them out.
Create your file in Onshape
Right click on the file or sketch and click export to DXF
Open the inkscape software
Open your file in Inkscape
Save your file to another file name (SVG filetype)
Login to glowforge
Click Create New
Click Upload
Select your file
For cardboard select 1/8" corrugated cardboard
For material, select 1/8" corrugated cardboard
Make sure your drawing is on top of the material (within the limits of the material)
Click print
push the blinking button on the glowforge
Monitor the glowforge for the duration of the cut for fire
Remove your material with the cuts
Following these steps, this is the practice piece we made using onshape, inkscape, and the glowforge.
In today's class, I started designing my lock on Onshape.
In today's class, we practiced using the glowforge and I started designing more pieces of my lock.
This is the combination lock I made out of cardboard, paper, super glue, hot glue, wood glue, and a coat hanger. In order for it to unlock, I have to turn the dial, entering the right combination. There are three rotors that have to align. The first rotor has one wooden tooth, the middle one has two, and the third one has one. There are paper cylinders going through each rotor. When the first tooth comes into contact with the middle tooth, it turns the middle rotor, then when the middle tooth comes into contact with the third tooth, it turns the third rotor. When the right combination is entered, the holes will align and you can slide the shackle out. On my final wooden lock, there will be four holes total. Two where the wire shackle goes in, and two where the paper cylinders go.
I used the glowforge to cut the box of my lock.
I desinged more parts on Onshape.
I cut out all the pieces and assembled the lock
This is my fully functioning combination lock. I designed each part on onshape and inkscape, then used the glowforge to cut them out.Â
This is a summary and examples on unsupervised machine learning.
This is an explanation and examples of body detection using machine learning.
paint
marker
gluebottle
paintbrush
These were the four objects I used for my data. The goal of this project is for the computer to accurately predict each object's label, which is listed under the images.
paint
marker
gluebottle
paintbrush
These are one of the 200 images of each object that I am using as my data. There are 48 by 48 pixels in each image.
In this block of code, we wrote one dense layer the of size 1024 and a sigmoid activation function. There is another dense layer whose output has the number of objects, four, and a softmax function.
TheseTheTheseThTheseTheTheseTheseseesese three images are the computer choosing random images and labeling them what it thinks they are. The true object is the actual label of the object, so the computer was right when labeling these three images. Since my model has 100% accuracy, there are no mislabeled images.
This photo is a link to my model. In this project, we had to choose four or more objects and create a model that would label them. The model pulls data from "myartdata" in google drive, where all my photos are. We had to test and train the model so that it would accurately predict the label for each image. My model has a 100% accuracy, so there are no mislabeled images.
For my brother's birthday, I used Onshape to design a flat skateboard with his name. I used the CNC Router to cut it out and then sanded it with an orbital sander and sandpaper.