Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

rcservo_Initialize help

Based on DMP's Vortex processor / SoC this board is a full computer capable of running a standard Windows and Linux installation on the backpack of your robot.
7 postsPage 1 of 1
7 postsPage 1 of 1

rcservo_Initialize help

Post by comds » Thu Mar 11, 2010 3:23 pm

Post by comds
Thu Mar 11, 2010 3:23 pm

Issue:

rcservo_Initialize(RCSERVO_USECHANNEL0) returns false in:



Code: Select all

#include "stdafx.h"
#include <stdio>
#include <iostream>
#include <windows>
#include <roboard>
using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
cout << "Started Main \n";

  if(rcservo_Initialize(RCSERVO_USECHANNEL0)){

  cout << "Finished servo Initialize \n";

  rcservo_EnterPWMMode();cout << "Entered PWM Mode \n";

  rcservo_SendPWMPulses(int(0), 10000L, 1500L, 100L); cout << "Pulse \n";

  Sleep(3000);
  rcservo_Close(); cout << "RC Close \n";   
}
else{
  cout << "Servo Initialize Fail \n";

}

return 0;
}




Note: VS2008 C++ dev enviroment and using the librarys from http://www.roboard.com/Files/Code/RoBoI ... p-2008.zip

Any ideas?
Issue:

rcservo_Initialize(RCSERVO_USECHANNEL0) returns false in:



Code: Select all

#include "stdafx.h"
#include <stdio>
#include <iostream>
#include <windows>
#include <roboard>
using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
cout << "Started Main \n";

  if(rcservo_Initialize(RCSERVO_USECHANNEL0)){

  cout << "Finished servo Initialize \n";

  rcservo_EnterPWMMode();cout << "Entered PWM Mode \n";

  rcservo_SendPWMPulses(int(0), 10000L, 1500L, 100L); cout << "Pulse \n";

  Sleep(3000);
  rcservo_Close(); cout << "RC Close \n";   
}
else{
  cout << "Servo Initialize Fail \n";

}

return 0;
}




Note: VS2008 C++ dev enviroment and using the librarys from http://www.roboard.com/Files/Code/RoBoI ... p-2008.zip

Any ideas?
comds
Robot Builder
Robot Builder
Posts: 14
Joined: Thu Mar 04, 2010 5:17 pm

Post by comds » Thu Mar 11, 2010 8:24 pm

Post by comds
Thu Mar 11, 2010 8:24 pm

After looking at the example I modified the else statement to try to get the the error message

Code: Select all
else{
cout << "ERROR: RCSERVO lib fails to initialize \n";
cout << roboio_GetErrMsg();
}


That yeilds:

ERROR: RCSERVO lib fails to initialize
I/O library fails to initialize
After looking at the example I modified the else statement to try to get the the error message

Code: Select all
else{
cout << "ERROR: RCSERVO lib fails to initialize \n";
cout << roboio_GetErrMsg();
}


That yeilds:

ERROR: RCSERVO lib fails to initialize
I/O library fails to initialize
comds
Robot Builder
Robot Builder
Posts: 14
Joined: Thu Mar 04, 2010 5:17 pm

Post by comds » Thu Mar 11, 2010 8:34 pm

Post by comds
Thu Mar 11, 2010 8:34 pm

When I did this step on the roboard software training:

Copy all files in Roboard\Winioto your application directory or Window’s System32 directory

I put the winio directory intothe system32.

Doesn't work.

When I copy the winio files into my application directory it works.

So I answered my own question. Thanks self :)
When I did this step on the roboard software training:

Copy all files in Roboard\Winioto your application directory or Window’s System32 directory

I put the winio directory intothe system32.

Doesn't work.

When I copy the winio files into my application directory it works.

So I answered my own question. Thanks self :)
comds
Robot Builder
Robot Builder
Posts: 14
Joined: Thu Mar 04, 2010 5:17 pm

Post by comds » Fri Mar 12, 2010 8:25 pm

Post by comds
Fri Mar 12, 2010 8:25 pm

New issue:

Got all the software working an I can generate a PWM pulse at will on the ports. But now I have a new problem. The Amplitude of the pulses is 3.3 volts. It looks clean. There is something clamping it at 3.3 volts but now sure what. I have a 12V power supply, and the power pin on the PWM ports is showing the 12V. This signal pin is way to low for the Servoes to even read it. And I get no movement when the servoes are acually hooked up.
New issue:

Got all the software working an I can generate a PWM pulse at will on the ports. But now I have a new problem. The Amplitude of the pulses is 3.3 volts. It looks clean. There is something clamping it at 3.3 volts but now sure what. I have a 12V power supply, and the power pin on the PWM ports is showing the 12V. This signal pin is way to low for the Servoes to even read it. And I get no movement when the servoes are acually hooked up.
comds
Robot Builder
Robot Builder
Posts: 14
Joined: Thu Mar 04, 2010 5:17 pm

Post by comds » Sun Mar 14, 2010 2:33 am

Post by comds
Sun Mar 14, 2010 2:33 am

OK after much fret. I am just a total newb. I had the motor controller and the roboard on diffrent power supplies... so the grounds where floating from each other. Signals all work. Roboard drives the motor controller like a dream.
OK after much fret. I am just a total newb. I had the motor controller and the roboard on diffrent power supplies... so the grounds where floating from each other. Signals all work. Roboard drives the motor controller like a dream.
comds
Robot Builder
Robot Builder
Posts: 14
Joined: Thu Mar 04, 2010 5:17 pm

Post by PaulL » Sat Mar 20, 2010 5:01 am

Post by PaulL
Sat Mar 20, 2010 5:01 am

Congrats on figuring it out!!! The Roboard is really a pretty sweet piece of hardware, and there isn't much it can't do, it's just a matter of getting the software setup / written / in place to make it do! :) I have NO complaints with the Roboard's physical capabilities, there really isn't much it CAN'T do! :D

In it's ultimate incarnation, I see my Roboard filling up as:

TTL Serial Port: Driving 2 Pololu Serial Servo Controllers to 10 servos for finger movement.
A/D: Battery monitor per LiPo cell (2 lines)
A/D: 3 Axis Accelerometer (3 lines)
A/D: Light sensor (1 line)
Sound Card, Signal Out: Driving small amplifier to run speaker - Text to Speech, audible alarms.
Sound Card, Mic In: Microphone for Speech to Text voice commands.
PWM Out: Control Main Servos (21, 16 "stock" servos of my RN-1, 2 hip, 2 wrist, 1 head)
I2C: Compass
I2C or GPIO: Fiber optic lighting effects
USB: Webcam
GPIO: Power On / Off for Servo Power (power save at rest, 1 line)
GPIO: Power Throttle (high power, low power modes) could be a digital potentiometer via I2C or serial to control output on a DC to DC converter, we'll see.
GPIO: Auto Power Off (When new BIOS is available to support it!)
MiniPCI Slot: WiFi Card

Perhaps a gyro at some point, I2C, serial, who knows.

Even at this, I haven't "filled" the board! It's got a lot of capability, the mix of connections is FANTASTIC! But, it'll take a significant amount of time to get all this set up, hooked up, and have the software written to handle it all! Definitely not a "shake and bake" solution yet, but I think in time such a solution is a strong possibility. This board's got enough horsepower to make the possibilites of such a configuration virtually endless. I'm actually working on a plugin-based multithreading architecture to support what I ultimately want to be able to do with this board, to help realize what I have in my head that I should be able to do. Ultimately, I'd like him to have a bit of a personality about him, and there are some open-source neural network bits and pieces on the web that might facilitate that at some point. And, if I manage to reach limits in processing power, there's the option of offloading via WiFi to a "server" that can process data and send results back to Roboard! Lots of options. If only I had a team of programmers at the ready... LOL!

Take Care,
Paul
Congrats on figuring it out!!! The Roboard is really a pretty sweet piece of hardware, and there isn't much it can't do, it's just a matter of getting the software setup / written / in place to make it do! :) I have NO complaints with the Roboard's physical capabilities, there really isn't much it CAN'T do! :D

In it's ultimate incarnation, I see my Roboard filling up as:

TTL Serial Port: Driving 2 Pololu Serial Servo Controllers to 10 servos for finger movement.
A/D: Battery monitor per LiPo cell (2 lines)
A/D: 3 Axis Accelerometer (3 lines)
A/D: Light sensor (1 line)
Sound Card, Signal Out: Driving small amplifier to run speaker - Text to Speech, audible alarms.
Sound Card, Mic In: Microphone for Speech to Text voice commands.
PWM Out: Control Main Servos (21, 16 "stock" servos of my RN-1, 2 hip, 2 wrist, 1 head)
I2C: Compass
I2C or GPIO: Fiber optic lighting effects
USB: Webcam
GPIO: Power On / Off for Servo Power (power save at rest, 1 line)
GPIO: Power Throttle (high power, low power modes) could be a digital potentiometer via I2C or serial to control output on a DC to DC converter, we'll see.
GPIO: Auto Power Off (When new BIOS is available to support it!)
MiniPCI Slot: WiFi Card

Perhaps a gyro at some point, I2C, serial, who knows.

Even at this, I haven't "filled" the board! It's got a lot of capability, the mix of connections is FANTASTIC! But, it'll take a significant amount of time to get all this set up, hooked up, and have the software written to handle it all! Definitely not a "shake and bake" solution yet, but I think in time such a solution is a strong possibility. This board's got enough horsepower to make the possibilites of such a configuration virtually endless. I'm actually working on a plugin-based multithreading architecture to support what I ultimately want to be able to do with this board, to help realize what I have in my head that I should be able to do. Ultimately, I'd like him to have a bit of a personality about him, and there are some open-source neural network bits and pieces on the web that might facilitate that at some point. And, if I manage to reach limits in processing power, there's the option of offloading via WiFi to a "server" that can process data and send results back to Roboard! Lots of options. If only I had a team of programmers at the ready... LOL!

Take Care,
Paul
PaulL
Savvy Roboteer
Savvy Roboteer
Posts: 423
Joined: Sat Sep 15, 2007 12:52 am

Post by comds » Sun Mar 21, 2010 2:06 am

Post by comds
Sun Mar 21, 2010 2:06 am

Yeah the more I use the roboard the more I like it. Just need to find a good webcam that works on it, as you can see on my other thread.

But I agree when maxed out it will be amazing.

My software is going to be multi processed all interfacing with a single SQL database. Both from onboard to offboard.
Yeah the more I use the roboard the more I like it. Just need to find a good webcam that works on it, as you can see on my other thread.

But I agree when maxed out it will be amazing.

My software is going to be multi processed all interfacing with a single SQL database. Both from onboard to offboard.
comds
Robot Builder
Robot Builder
Posts: 14
Joined: Thu Mar 04, 2010 5:17 pm


7 postsPage 1 of 1
7 postsPage 1 of 1