Arduino w/ Servo help

Hello, everyone. I am new to OF and I’m learning as much as I can from this forum. Thanks for all the effort.

I have reached a stumbling point and I’m really banging my head against the wall. I just want to get a servo connected to my Arduino Duemilanova and have it respond to a slider. It seems nothing I do can get the servo to move. The only thing that seems to actually do anything is to set my pin mode to ARD_PWM then setPwm( pinNum, sliderNum ). But, the behavior seems almost random, not really controlled by the gui slider.

I can’t find any documentation on how to do this? Anyone ever control a servo through OF using an Arduino?

I am running StandardFirmata on my board. Am I crazy, or is ofArduino not for use with Firmata?

Any help would be greatly appreciated!!

Here is my code. After Arduino starts up, it does nothing.

  
void testApp::setupArduino(){  
	  
	ard.sendDigitalPinMode( servoPin, ARD_OUTPUT );  
	  
	ard.sendServoAttach( servoPin );  
}  
  
// Called on update loop  
void testApp::updateArduino(){   
	  
	ard.update();  
	  
	ard.sendServo( servoPin, sliderNum ); //sliderNum is an instance var  
}  
  
  

Ok, so I dug deeper into the ofAndruino code.

It appears there are a couple conditionals in the sendServo() function.

I changed the pin mode from ARD_OUTPUT to ARD_SERVO. duuh, my bad.

But now I have a runtime error, and it’s a strange one. Anyone have any idea what this could mean?

  
warning: Could not find object file "/Users/theo/Documents/CODE/__OPENFRAMEWORKS/SANDBOX/COMPILE_LIBRARIES/buildGlutFramework/libForeground.a(macx_foreground.o)" - no debug information available for "/Users/mcast/Code/GLUT-ToPost/macx_foreground.m".  
  
warning: .o file "/Developer/usr/lib/gcc/i686-apple-darwin9/4.0.1/libgcc.a(_eprintf.o)" more recent than executable timestamp  
(gdb) continue  
Program received signal:  “EXC_BAD_ACCESS”.  

Why is the project referencing /Users/theo…??? Should be my name.

My apologies for the newbie questions. I’m just a guy with a bunch of wires and code trying to keep my mind in one piece.