I’ve updated the firmware using tera term, tested the motors, and the reflective sensors with the sample codes from the GHI website… they all work fine… I got a problem with the Servo Port… I load the code from the GHI page and it moves my DC motors instead… ??? … I load this code (see below), load the proper “References” that are needed; (I’ve even loaded all the References), but still only the DC motors in port A and B move… :think: I’ve even tested the other servo codes from GHI (for the sake of space I’ll not post all the code just name it… public static partial class FEZ_Components with the Main method code that calls the “Components” class. ) I still I get nothing or an error from these codes. On this code I have tried changing Di5 pin to the ones available like Di9, Di6, etc and still only the DC motors run :wall: …Im not a prof C# user, but not a newbie… the servos are fully rotational from a Boe Bot. Im just interested to get the Servo Port working…
Thanks
using System;
using System.Threading;
using Microsoft.SPOT;
using GHIElectronics.NETMF.Hardware;
using GHIElectronics.NETMF.FEZ;
namespace FEZ_Mini_Application1
{
class Program
{
public static void Main()
{
PWM servo = new PWM((PWM.Pin)FEZ_Pin.PWM.Di5);
while (true)
{
// 0 degrees. 20ms period and 1.25ms high pulse
servo.SetPulse(20 * 1000 * 1000, 1250 * 1000);
Thread.Sleep(1000);//wait for a second
// 90 degrees. 20ms period and 1.50ms high pulse
servo.SetPulse(20 * 1000 * 1000, 1500 * 1000);
Thread.Sleep(1000);//wait for a second
// 180 degrees. 20ms period and 1.75ms high pulse
servo.SetPulse(20 * 1000 * 1000, 1750 * 1000);
Thread.Sleep(1000);//wait for a second
}
}
}
}