Prototyping Competition

2014 Francis College of Engineering Prototyping Competition

Prizes:


- $1000 award for 1st place team
- $750 award for 2nd place team
- $500 award for 3rd place team
- $250 award for the people choice team (crowd voting)


Deadlines:


November 10, 2014 - Submit Proposal
November 21, 2014 - Submit Presentation
December 04, 2014 - Finals Competition and Awards


For more details visit:


2014 Francis College of Engineering Prototyping Competition

**********************************************************

Team SubZero did not place in the competition this year but has decided to continue improving and re-enter next year.

Team SubZero

Team SubZero
A capture of the team at the First Dean's Prototyping Challenge

Friday, November 21, 2014

And so the coding begins...

This is the beginning to controlling the 4 motors of the ROV. I wrote this code so that the speed of a motor, using port M1 on the Adafruit MotorShield, is controlled via the position of the potentiometer. Its very rough but its gets the job done!







Team-Subzero
============
/*
William Kammerer
11/21/14
Adafruit Motorshield V2 Team SubZero
*/

#include <Wire.h>
#include <Adafruit_MotorShield.h>
#include "utility/Adafruit_PWMServoDriver.h"

//Create the motor shield object with the default I2C address
Adafruit_MotorShield AFMS = Adafruit_MotorShield();
//Try to designate the address of the shield as 0x1 or 0x61
//Adafruit_MotorShield AFMS = Adafruit_MotorShield (0x1)
//Adafruit_MotorShield AFMS = Adafruit_MotorShield (0x61)

//Select which port M1, M2, M3 or M4
//In this case we are using port M1
Adafruit_DCMotor *Motor1 = AFMS.getMotor(1);
//To select another motor on a port you can use 
//Adafruit_DCMotor *Motor# = AFMS.getMotor(2);

void setup()
{
  //Set up Serial library at 9600 bits per second
  Serial.begin(9600);
  //Print message to serial monitor
  Serial.println("SubZero Motor Controller");
  
  //Create AFMS with a default fequency 1.6KHz
  //Also can be created using a different frequency i.e. 1.0KHz
  //AFMS.begin(1000)
  AFMS.begin();
  
  //Turn motor on
  Motor1->run(FORWARD);
  Motor1->run(RELEASE);
}
  
void loop()
{
  
 int sensorValue = analogRead(A0);

 float dot = sensorValue * (255.0 / 1023.0); 
 
 delay(50);
  
 Serial.println(dot);
 
 //Set the speed of the motor, from the position of the pot
  Motor1->setSpeed(dot);
  
 Motor1->run(FORWARD);
 
}



-WK

No comments:

Post a Comment