Page 1 of 1

G15 Motor Set Position Not working

PostPosted: Sun Dec 13, 2015 11:32 pm
by ivan
Using CT-UNO, Cytron G15 Shield Rev2.0, 2 G15 Motor.

I'm using the example codes given in the website but it's not working for the Positioning Example. The G15 Motor turns when I use the WheelMode, but it doesn't when using the SetPosition.

Need some help here. Thanks in advance.

Re: G15 Motor Set Position Not working

PostPosted: Mon Dec 14, 2015 10:48 am
by Idris
Hi ivan, try to set the G15 in position mode. Open G15 "Positioning" example, add the following code.

CODE: SELECT_ALL_CODE
void setup()
{
  g15.begin(19200);

  pinMode(LED, OUTPUT);
  digitalWrite(LED, LOW);
  delay(500);
  digitalWrite(LED, HIGH);
 
  // Add these 2 lines
  g15.exitWheelMode(G15_1); // Set G15_1 to angle mode
  g15.exitWheelMode(G15_2); // Set G15_2 to angle mode
}

Let me know the result. Thanks.