Tuesday, January 29, 2013

Workshop 4

Hi folks,

Workshop 4 will be Wednesday, January 30th at 7pm in Clark A 202.  We will be focusing on hacking.  If you haven't already picked one up, please find a PS/2 mouse to tear apart.  These are the ones that use the green, round connectors and NOT USB.  Check your old electronics boxes, thrift shops, grandma's house, ect.  If you have trouble finding one, I picked up a few extras that you can purchase from me for $5 cash.  Please email me if you want to buy one - first come, first serve.

If you still haven't picked up your servo, you can pick it up during this workshop.  If you have time conflicts, feel free to email me to set up a time/place to pick it up.

I will try to get Workshop 3 online soon.

Best,
Austin

2 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. #include
    #include

    Servo myservo;

    PS2Mouse mouse(6, 5);
    void setup()
    {
    Serial.begin(9600);
    mouse.init();
    myservo.attach(3);
    }

    void loop(){
    MouseInfo mouseInfo;
    mouse.getData(&mouseInfo);

    int xPos = mouseInfo.cX;

    xPos /= 3; //same xPos = xPos/10;
    if (xPos < 10) xPos = 10;
    if (xPos > 170) xPos = 170;

    myservo.write(xPos);



    }

    ReplyDelete