I would like to set certain pins in my class constructor. I've tried the following but without any luck:
PWM PWMpinENA;
InputPort DirectionPinIN1;
InputPort DirectionPinIN2;
SecretLabs.NETMF.Hardware.AnalogInput ReadmAPin;
InterruptPort RPMpin;
public MotorControl(Pins pwmpin, Pins Direction1, Pins Direction2, Pins mapin, Pins rpmpin)
{
PWMpinENA = new PWM(pwmpin);
DirectionPinIN1 = new InputPort(Direction1, true, ResistorModes.PullUp);
DirectionPinIN2 = new InputPort(Direction2, true, ResistorModes.PullUp);
ReadmAPin = new SecretLabs.NETMF.Hardware.AnalogInput(mapin);
RPMpin = new InterruptPort(rpmpin, false, Port.ResistorMode.Disabled, Port.InterruptMode.InterruptEdgeLevelHigh);
RPMpin.OnInterrupt += new NativeEventHandler(RPMpin_OnInterrupt);
}The class initiation would be:
MotorControl MotorLeft = new MotorControl(Pins.GPIO_PIN_D6, Pins.GPIO_PIN_D9, Pins.GPIO_PIN_D5, Pins.GPIO_PIN_A1, Pins.GPIO_PIN_D10);
However this is not correct. Can anyone point me in the right direction?
Thanks in advance.











