This was a video of my servo moving in tinkercad.
/* 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
}
}
This is a video of my servo moving.
This is a video of both my servos moving.
This is a video of two separate code servos moving
This is a video of my servo robot
This is a video of my robot moving forwards backwards left and right.
#include <Servo.h>
Servo left; //This line of code introduces an object thas a servo and its name is my servo
Servo right;
void setup() {
left.attach(9);//arduino i attached myservo to pin 9
right.attach(10);
}
void loop() {
left.write(0); //this is the command to make my servo go counterclockwise
right.write(180); //this is the command to make my servo go counterclockwise
delay(5000); //this is how long it does the above command
left.write(180); //this is the command to make my servo go counterclockwise
right.write(0);
delay(5000);
left.write(170); //this is the command to make my servo go counterclockwise
right.write(180); //this is the command to make my servo go counterclockwise
delay(3000);
left.write(90); //this is the command to make my servo go counterclockwise
right.write(90); //this is the command to make my servo go counterclockwise
delay(1000);
left.write(0); //this is the command to make my servo go counterclockwise
right.write(10); //this is the command to make my servo go counterclockwise
delay(3000);
}
This is my robot's attempt at traveling a set path
I changed my base/ the cardboard out to make it move better because it was pretty heavy at first.
I added almost a pattern of codes to my arduino to make it turn certain ways. The only difference was that the degrees were changed to switch how my robot turns.
#include <Servo.h>
Servo left; //This line of code introduces an object thas a servo and its name is my servo
Servo right;
void setup() {
left.attach(9);//arduino i attached myservo to pin 9
right.attach(10);
}
void foward(){
left.write(0); //this is the command to make my servo go counterclockwise
right.write(180); //this is the command to make my servo go counterclockwise
}
void backwards(){
left.write(180); //this is the command to make my servo go counterclockwise
right.write(0);
}
void left (){
left.write(170); //this is the command to make my servo go counterclockwise
right.write(180); //this is the command to make my servo go counterclockwise
}
void right (){
left.write(0); //this is the command to make my servo go counterclockwise
right.write(10); //this is the command to make my servo go counterclockwise
}
void loop() {
left.write(0); //this is the command to make my servo go counterclockwise
right.write(180); //this is the command to make my servo go counterclockwise
delay(5000); //this is how long it does the above command
left.write(180); //this is the command to make my servo go counterclockwise
right.write(0);
delay(5000);
left.write(170); //this is the command to make my servo go counterclockwise
right.write(180); //this is the command to make my servo go counterclockwise
delay(3000);
left.write(90); //this is the command to make my servo go counterclockwise
right.write(90); //this is the command to make my servo go counterclockwise
delay(1000);
left.write(0); //this is the command to make my servo go counterclockwise
right.write(10); //this is the command to make my servo go counterclockwise
delay(3000);
}
This is a video of my ultrasonic sensor working.
The ultrasonic sensor works by sending out a sound pulse and detecting how fast it comes back.
This is a video of my servo stopping when my sensor detects something close.
I took apart my robot this is just a demonstration of its function.
This is the gearbox we created in class. The main parts are a parent gear which is directly connected to the servo and the child gear which is controlled by the parent gear
We used our bluetooth module to control an LED. We used the app dabble to connect and control the moduel.
This is a video of the exterior of my robot which holds everything together. If you open up the flap you can see everything inside.
Here are some pictures of my robot at different angles This is to try and capture the aesthetic the best. We had to have two complementary colors on our robot which are opposite of each other on the color wheel.
This is when I used my bluetooth module to make my robot move left, right, fowards and backwards. I had to add a new function named "halt" to make my robot stop so it wouldn't go forward forevor. If I press up on the controller I coded my robot to go forward for example.
#include <Servo.h> // this refers to a "library" that knows how to control servos
Servo rightservo; //defines a "servo" object and names it "firstservo"
Servo leftservo; //defines a "servo" object and names it "secondservo"
#define CUSTOM_SETTINGS
#define INCLUDE_GAMEPAD_MODULE
#include <Dabble.h>
void setup() {
// put your setup code here, to run once:
leftservo.attach(9); // attach the "servo" object named "myservo" to pin 9
rightservo.attach(10); // attach the "servo" object named "myservo" to pin 10
Serial.begin(250000); // make sure your Serial Monitor is also set at this baud rate.
Dabble.begin(9600); //Enter baudrate of your bluetooth.Connect bluetooth on Bluetooth port present on evive.
}
void forward(){
leftservo.write(0); //make the "servo" object named "firstservo" rotate at full speed counterclockwise
rightservo.write(180);
}
void backwards(){
leftservo.write(180); //make the "servo" object named "firstservo" rotate at full speed counterclockwise
rightservo.write(0);
}
void left(){
leftservo.write(180); //make the "servo" object named "firstservo" rotate at full speed counterclockwise
rightservo.write(180);
}
void right(){
leftservo.write(0);
rightservo.write(0);
}
void halt() {
leftservo.write(90);
rightservo.write(90);
}
void loop() {
Dabble.processInput(); //this function is used to refresh data obtained from smartphone.Hence calling this function is mandatory in order to get data properly from your mobile.
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");
halt();
}
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();
}
Using my ultrasonic sensor, my robot was able to reverse and turn in a radius of 10. Once it reached less than 10 it moved backwards then turned, then proceeded to move forwards.
This is the guideline we have to follow for the LockBox.
These are the stamps we must get for our LockBox progress to be graded.
This is documentation process that we have to follow for our lockbox.
The table saw cut wood primarily along the length of the wood
it cuts straight lines
to be safe with saw
Do(safety glasses when operating, remove loose clothing, use the rip fence or the miter gauge, use the feather board, rip cuts with fence , cross cuts with fence, cross cuts with miter gauges, use a push stick.)
Don't(don't put fingers within 6 inches of saw, cross cut with rip fence, standing in front of the blade, operate with tripping hazards in the area, don't leave without vacuuming)
Straight cuts are made with a table saw. We utilized the table today to cut 2x4s into flatter pieces for our Lockboxes.
Do's( wear ear protection, wear safety glasses, adjust the cutting thickness to within the 1/16' of the material thickness prior to cutting, unplug when finished, attached the vacuumed before using
Don'ts (put fingers near the opining, Pass any material but wood through the machine, pass wood with screws through the planer
The Planer just shaves the thickness of the wood planks to a thinner version. We made it thinner to fit better with our blueprint for the lockbox.
Cuts across the length of the wood can be used to make frames.
wear safety glasses
firmly secure the material with your hand outside of the hand placement line and up against the fence
vaccum after use
unplug the saw after use
reduce esposure to blade
I cut 12 pieces of wood using the miter saw's measurement tool, following the dimensions on a cut list we made for the box project. Ten 7-inch pieces and two 6-inch pieces were available.
VCARVE 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.
Safety tips: Run the dust collector vacuum after
use, wear ear protection, wear safety goggles,
secure your material (with screws or clamps), and
design around your screws. Don't leave the CNC
while it is running, and don t go near the gantry
while it is running
This is what the CNC machine carved out.
This tool cuts biscuit shaped holes on your material
so that you can assemble your parts to be both.
1) Perfectly Aligned
2) Sturdy
Once vou biscuit. you glue your parts together
creating what is called a "plue up".
Safetv rules: Wear safety glasses, make sure it I5
set tor the appropriate size amount, make sure
you set the height in the middle of the material
mark both sides of the material, camp a block in
front of material each time, Don't put your fingers
near the blade when it is plugged in, and don't
assume the blade will come out of the material
ReplyForward
Creates a dip in the side of the wood.
Used to smooth out surfaces and get rid of jagged
edges
Safety rules: Wear safety glasses, keep your sander
moving at all times, be careful not to place sander
on your skin. Don't operate the sander without
asking the teacher, don't touch the sand paper while
the sander is operational, and put the sander on
surfaces that can be damaged by the sander
All it does is just sand the wood down and make it smoother.
This is a cardboard-based combination lock. It can be made in class and can be made out of a variety of materials. But the only difference between our box and theirs is the combination. I'm not positive if we can create something like this right now though.
This is a puzzle/combination lock in which you place the wooden stick behind the lock and must guess the combination to unlock it. We have the resources and can make it in class, but I'm not sure if we have the knowledge.
This is a key lock made of wood. It has a molded impression on the inside of the lock that twists a certain way when the key is inserted, then the gears turn and the lock unlocks. It cannot be made in class, in my view, because some of these cuts require a large amount of accuracy that we dont have the skill for
This is a key lock with a safe, made of cardboard. It has a molded impression on the inside of the lock that twists a certain manner when the key is inserted, then the gears turn and the lock unlocks opening the safe.  I believe we can make this one because it does not require as many exact cardboard cuts and overall just looks like a fun project.
This is a cardboard key lock with a safe inside. When the key is inserted, a molded impression on the inside of the lock twists in a specific way, causing the gears to revolve and the lock to unlock, allowing the safe to be opened. I feel we will be able to make this one because it does not require as many precise cardboard cuts and appears to be a fun activity overall.
After the rotors are all aligned, this piece has a bolt done across the congruent version to secure them in place. The actuator piece has the function of locking and unlocking when it is twisted by the dowel. To make this, I started by drawing a mirror line and then sketching the majority of the bottom and long diagonal lines. I added more lines, a lengthy arc, and a circle for the center point. Then, based on the dimensions, I adjusted the distance and size.
The front and back walls of the lock are made up of these. Inside the rings are holes for the dowel to fit into. The lock would have no bounds if this portion was missing. Sketching a rectangle from the corner was a simpler task for the front planar. I made another corner rectangle for the rear, then an arc inside of that, trimming the extra with trim tools. Finally, I inserted center point circles.
Rotors come in three different variations. One is turned in either lateral direction and is controlled by a rotor. The other two eventually catch on and align themselves with the long gaps (to the right). The actuator is then used to lock and unlock the door. To make this, I sketched an overarching form with a center point circle, then traced a rectangle, a rectangle, and an arc, then matched the dimensions.
We used a combination of wood glue and nails for the connecting dowels once we finished designing and printing all of the necessary parts. This video shows how it works, which involves three rotors being aligned with a bolt on the actuator, causing both to become caught, or "locked," and restricting movement of each of these elements. The latch between the two walls is the ideal way to represent this locked/unlocked condition.
So far this is the prototype for the first day of making my lock.
This is how everything has come together on day 2
This was the box that goes around the mechanics
This is the how my final lock looks.
Hat
Shirt
Shorts
Shoes
In this project we had to scan 4 items onto the file. The items I chose were clothing items. I chose a Hat, a Shirt, Shorts, and Shoes.
Shorts
Shoe
The collection process required me to scan 4 images. Here are two of them. Once you run the module, a grayed out image will appear made of 2500 pixels.
This is a link to my model. The model contains all the necessary code for it to run properly. It is the backbone of the entire project essentially and without it, it would not be completed. It gives the accuracy and the resulting images.
Here are two accurately labeled images of my model
I have nun because my model has 100% accuracy.