pduino crash, computer freeze

am working on a project where i need to control a servo motor through pduino (adc~). the problem i have is that whenever, after installing the firmata servo control example on the arduino and then running the pd arduino-test, my computer tells me that a usb device has been unplugged and then freezes and shuts down. i tried it with the same arduino board on another computer and also tried it on my computer with another arduino board-same thing both times. so i am guessing it can't be a problem with the arduino board or the computer but maybe with the usb drivers? the servo does respond to pd during those few seconds the computer didn't crash yet.

i am working with pduino0.4beta2, arduino 15, Firmata-2.0beta3 and a diecimila with an ATmega168.

Sounds like your project is drawing too much current from the USB port. This can cause all sorts of hilarity on some computers.

Are you driving the servo with a transistor, or directly from a pin? Are you using a power supply for the Arduino or just powering via USB?

i am powering both over the usb, so i guess that could be the problem. also i cleaned out the pd patch and only left the essentials, the computer did crash but not right away. so i am guessing the problem is what you suggest. i'll try external power

i have an external power source for the servo now and it doesn't crash anymore. thanks so much, what a simple fix... another question, what do i need to add to the ServoFirmata sketch to run it properly? or do i just upload that to arduino and control the movement through pd? in the sketch it says: * TODO add message to configure minPulse/maxPulse/degrees

but i am not sure where to implement that into the sketch.

sorry, i am new to any of this... thanks for any help

Just so everyone is on the same page, point us at a URL that has the library and/or sketch details you are using, or post your sketch code here if you have made significant changes.

yes, sorry. my fault this is the code used for arduino plus the pure data arduino-test patch