Hi!
may be I misunderstand something, but it seems me processing NGO with SB much slower then with Arduino, I am playing with step motor and I can see difference, I made everything easy, but still I can not get rotate it quicker, and signal lamps are just visible much slower then with arduino, may be there is any hack or anything I am doing wrong, the same code with arduino just fly. Any advise really appreciated
PS: I use Stepper Motor+ Driver Board ULN2003 5V 4-phase 5 line
public class Program
{
public static void Main()
{
// write your code here
NetduinoGo.ShieldBase sb = new NetduinoGo.ShieldBase((GoBus.GoSocket)4);
OutputPort op1 = new OutputPort(sb.Pins.GPIO_PIN_D8, false);
OutputPort op2 = new OutputPort(sb.Pins.GPIO_PIN_D9, false);
OutputPort op3 = new OutputPort(sb.Pins.GPIO_PIN_D10, false);
OutputPort op4 = new OutputPort(sb.Pins.GPIO_PIN_D11, false);
bool[][] positions = { new bool[] { false, false, false, true }, new bool[] { false, false, true, true }, new bool[] { false, false, true, false }, new bool[] { false, true, true, false }, new bool[] { false, true, false, false }, new bool[] { true, true, false, false }, new bool[] { true, false, false, false }, new bool[] { false, false, false, false } };
Debug.Print("started");
while (true)
{
op1.Write(positions[0][0]);
op2.Write(positions[0][1]);
op3.Write(positions[0][2]);
op4.Write(positions[0][3]);
op1.Write(positions[1][0]);
op2.Write(positions[1][1]);
op3.Write(positions[1][2]);
op4.Write(positions[1][3]);
op1.Write(positions[2][0]);
op2.Write(positions[2][1]);
op3.Write(positions[2][2]);
op4.Write(positions[2][3]);
op1.Write(positions[3][0]);
op2.Write(positions[3][1]);
op3.Write(positions[3][2]);
op4.Write(positions[3][3]);
op1.Write(positions[4][0]);
op2.Write(positions[4][1]);
op3.Write(positions[4][2]);
op4.Write(positions[4][3]);
op1.Write(positions[5][0]);
op2.Write(positions[5][1]);
op3.Write(positions[5][2]);
op4.Write(positions[5][3]);
op1.Write(positions[6][0]);
op2.Write(positions[6][1]);
op3.Write(positions[6][2]);
op4.Write(positions[6][3]);
op1.Write(positions[7][0]);
op2.Write(positions[7][1]);
op3.Write(positions[7][2]);
op4.Write(positions[7][3]);
Thread.Sleep(1);
}
}
}