I'm new to this, so please take it easy on me lol

Now I know what you are probably going to say. "Why don't you read some tutorials...", I have, and I have found and read as much source material as I can find on the components I have and what i am trying to accomplish. I just need a nudge in the right direction. I am building a tank, and I am using an Arduino Uno R3, Adafruit MotorShield V2 and a FlySky FS-I6 to run it. I have a base code (what I have created from information I have found), and I have the boards/motors wired up. Any help would be greatly appreciated, and any questions will be answered. Thank you.
Test2.ino (837 Bytes)

We don't know what that is....

As will yours, but afaics you aren't asking anything.

Not everyone will know what a FlySky is (I'm one of them) so you should post a link to some details of that.

Here is some help: this is what your post should have included.

the link to the controller:

and the user manual
https://static1.squarespace.com/static/5bc852d6b9144934c40d499c/t/5c0787e10e2e721a7f17c998/1543997593953/FS-i6+User+manual+20160819.pdf

and your code:

#include <Wire.h>
#include <Adafruit_MotorShield.h>
#include "utility/Adafruit_MS_PWMServoDriver.h"
// Left motor backward=forward, forward=backward
Adafruit_MotorShield AFMS = Adafruit_MotorShield();
Adafruit_DCMotor *MotorLeft = AFMS.getMotor(1);
Adafruit_DCMotor *MotorRight = AFMS.getMotor(2);
//#define LeftStick = (D3) 
//#define RightStick = (D5) 
const int LeftStick = 3;
const int RightStick = 5;

void setup() {
 AFMS.begin();
  pinMode(LeftStick, INPUT);
  pinMode(RightStick, INPUT);
}

void loop() {
 if (LeftStick,1500) 
  MotorLeft->run(RELEASE);
  else if (LeftStick>1500)
    MotorLeft->run(FORWARD);
  else
    MotorLeft->run(BACKWARD);

if (RightStick,1500) 
  MotorRight->run(RELEASE);
  else if (RightStick>1500)
    MotorRight->run(FORWARD);
  else
    MotorRight->run(BACKWARD);
}

The connections to the receiver look like this

@verse1 I see from your user profile that you have not yet read the forum rules, it gives help on what information to post with your question in order for us to be able to offer help immediately, without all the questions and answers that can take dozens of posts to clear up.

Therefore you may want to read this before you proceed:-
how to get the best out of this forum

1 Like

You should probably install and use the "Adafruit Motor Shield V2" library.

Comma is not a comparison operator.
Did you mean:
if (LeftStick == 1500)
if (LeftStick <= 1500)
if (LeftStick >= 1500)
if (LeftStick < 1500)
if (LeftStick > 1500)
???

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.