Pages: [1]   Go Down
Author Topic: NEw to programing and need lots of help  (Read 321 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm programing my first robot for a school project and it's a little complex for my first time.
The teacher wants it to use a laser senor to avoid obstacles.
I'd like to start with just making the thing turn and go from there smiley-roll-sweat
Logged

Queens, New York
Offline Offline
Faraday Member
**
Karma: 65
Posts: 2934
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do you have any arduino knowledge? The first place to start would be the Blink and Blink without delay examples.

Also do you plan to use DC motors or servos?
Logged

Created Libraries:
NPV2 (NewPasswordV2),  TFT_Extension, OneWireKeypad, SerialServo.
Will provide libraries if asked in PM or forum.

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 239
Posts: 24371
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Did you read the sticky topic at the top of this section, called "Read this before posting a programming question" ?
Does the senor speak English, or only Spanish?
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do you have any arduino knowledge? The first place to start would be the Blink and Blink without delay examples.

Also do you plan to use DC motors or servos?

I can turn the LED on the board on and off
and DC motors and yes there is a motor controller
Logged

Queens, New York
Offline Offline
Faraday Member
**
Karma: 65
Posts: 2934
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
yes there is a motor controller
Ok so look at the pins the motor controller uses and make one motor run. It might/will have an Enable pin, Direction pin and Speed pin. All of which will need to be set properly and defined.

Example:
byte/#Define    Enable = 2  //High = allows motors to run
byte/#Define    Direction = 4 //High = forward, Low = reverse ...Might be switched depending on shield
byte/#Define    Speed = 3 //0-255 PWM


void setup()
{
pinMode(Enable, OUTPUT);
pinMode(Direction, OUTPUT);
pinMode(Speed, OUTPUT);
}

void loop()
{ /*your code here*/ }
Logged

Created Libraries:
NPV2 (NewPasswordV2),  TFT_Extension, OneWireKeypad, SerialServo.
Will provide libraries if asked in PM or forum.

New Jersey
Offline Offline
Faraday Member
**
Karma: 49
Posts: 3420
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I'd like to start with just making the thing turn and go from there

Makes a lot of sense - I'd suggest you pick the very smallest thing you can test and build up from there. No point complicating matters with the sensor until you can drive around.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thank you
so i need to figure out what pins on the board link to which motor
Logged

East Anglia (UK)
Offline Offline
Faraday Member
**
Karma: 89
Posts: 3487
May all of your blinks be without delay()
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The motor controller needs to be connected to pins on the Arduino to control it.  They may already be connected if the motor controller is a shield that plugs into the Arduino or you may need to connect them yourself.  Once the control pins are connected and you have connected a motor to the controller you can consider writing a program to turn it on/off, reverse it and control its speed.  Then the real fun begins.

It would be helpful to know which motor controller you are using.
Logged

Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The motor controller needs to be connected to pins on the Arduino to control it.  They may already be connected if the motor controller is a shield that plugs into the Arduino or you may need to connect them yourself.  Once the control pins are connected and you have connected a motor to the controller you can consider writing a program to turn it on/off, reverse it and control its speed.  Then the real fun begins.

It would be helpful to know which motor controller you are using.
a roboteq AX3500
my plan was to make a gameport to usb cable and use a usb shield
Logged

Pages: [1]   Go Up
Jump to: