by swift » Thu Mar 25, 2010 9:22 pm
by swift
Thu Mar 25, 2010 9:22 pm
Hopefully this is obvious to someone.
I cannot generate a PWM.
Here is the code I borrowed from comds
- Code: Select all
#include <stdio>
#include <iostream>
#include <windows>
#include <roboard>
#include <iostream>
#include "stdafx.h"
#include "rcservo.h"
using namespace System;
unsigned long PWM_period = 10000L;
unsigned long PWM_duty = 1500L;
unsigned long count = 100L;
int main()
{
if(rcservo_Initialize(RCSERVO_USECHANNEL1))
{
rcservo_EnterPWMMode();
rcservo_SendPWMPulses(int(1), PWM_period, PWM_duty, count);
rcservo_Close();
}
else
{
return 1;
}
return 0;
}
I am completely new to programming, I can't even get cout to work

.
Anyway I always get an exit code of 1, and all of the dll's that load say "no symbols loaded" with the exception of winio.dll that says "Binary was not built with debug information."
I have the bias for pwm rather than gpio, I just don't know what's going on here....
I can post the entire output log if anybody wants it, but this post is probably long enough already.
Hopefully this is obvious to someone.
I cannot generate a PWM.
Here is the code I borrowed from comds
- Code: Select all
#include <stdio>
#include <iostream>
#include <windows>
#include <roboard>
#include <iostream>
#include "stdafx.h"
#include "rcservo.h"
using namespace System;
unsigned long PWM_period = 10000L;
unsigned long PWM_duty = 1500L;
unsigned long count = 100L;
int main()
{
if(rcservo_Initialize(RCSERVO_USECHANNEL1))
{
rcservo_EnterPWMMode();
rcservo_SendPWMPulses(int(1), PWM_period, PWM_duty, count);
rcservo_Close();
}
else
{
return 1;
}
return 0;
}
I am completely new to programming, I can't even get cout to work

.
Anyway I always get an exit code of 1, and all of the dll's that load say "no symbols loaded" with the exception of winio.dll that says "Binary was not built with debug information."
I have the bias for pwm rather than gpio, I just don't know what's going on here....
I can post the entire output log if anybody wants it, but this post is probably long enough already.