Monday, December 31, 2012

Happy New Year - Living it up with my robot!

 Just wanted to note that, a few minutes prior to the New Year (2013), I was able to successfully upload a basic functioning program to a prototype open source servo.  The servo, which I will detail in a later post, was designed by an MIT graduate student named Brian Mayton, and essentially consists of an attiny44 microcontroller, a full H-bridge, and two hall effect sensors.  Using Arduino as an AVR ISP, I was successfully able to load the following code to the attiny44, which set the gearmotor turning.

int G1 = 10;
int G2 = 9;
int G3 = 8;
int G4 = 7;

void setup()
{
  pinMode(G1, OUTPUT);
  pinMode(G2, OUTPUT);
  pinMode(G3, OUTPUT);
  pinMode(G4, OUTPUT);
}

void loop(){
  digitalWrite(G1, HIGH);
  digitalWrite(G2, LOW);
  digitalWrite(G4, LOW);
  digitalWrite(G3, HIGH);
  delay(1000);
}

Of course, I have a long way to go before I have what I need, but it's a great start. 

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.