Arduino Forum

Topics => Robotics => Topic started by: Mishtech on Oct 12, 2016, 11:05 am

Title: Pls can some one help me in programming my arduino please.
Post by: Mishtech on Oct 12, 2016, 11:05 am
Hello.
Greetings,
i REALLY NEED HELP IN PROGRAMMING MY ARDUINO AS I AM A STUDENT AND I HAVE NO KNOWLEDGE OF COMPUTER PROGRAMMING. i HAVE  Attached the file . And i use a adafruit motor driver instead of the pololu motor driver(which is used in the original program)which caused all the problems. I want it to be modifed or convert the pololu into adafruit,because i am using adafruit motor driver v2 (v2.3). Pls help me bexcaUSE IT IS FOR A PROJECT IN MY SCHOOL :( . I REALLY APPPREACIATE any ones help. pls feel free to contact me at : mishaalhere@gmail.com  .I have also attached the adafruit mototr driver v2.3 library.You can also download it from the official website
Thank You,
Mishaal.
Title: Re: Pls can some one help me in programming my arduino please.
Post by: PaulS on Oct 12, 2016, 12:09 pm
Code: [Select]
void loop(){ det = check();  // You'll need to reconstruct this if your not using the Pololu Dual VNH5019

Regardless of what coding style you prefer, NOTHING EVER FOLLOWS THE {.

Code: [Select]
void loop()
{
   det = check();  // You'll need to reconstruct this if your not using the Pololu Dual VNH5019


The rest of loop() needs fixing the same way. Use Tools + Auto Format, too.

If you resturucture the check() function so that it is readable, perhaps I'll try reading it again.
Title: Re: Pls can some one help me in programming my arduino please.
Post by: PaulS on Oct 12, 2016, 12:10 pm
Quote
And i use a adafruit motor driver instead of the pololu motor driver(which is used in the original program)which caused all the problems.
Why did you choose different hardware, if you had code that used a specific piece of hardware?
Title: Re: Pls can some one help me in programming my arduino please.
Post by: Mishtech on Oct 14, 2016, 12:55 pm
Why did you choose different hardware, if you had code that used a specific piece of hardware?
it s because i didn't have a budget to buy one.So i used and alternative.
Title: Re: Pls can some one help me in programming my arduino please.
Post by: Mishtech on Oct 14, 2016, 01:00 pm
Code: [Select]
void loop(){ det = check();  // You'll need to reconstruct this if your not using the Pololu Dual VNH5019

Regardless of what coding style you prefer, NOTHING EVER FOLLOWS THE {.

Code: [Select]
void loop()
{
   det = check();  // You'll need to reconstruct this if your not using the Pololu Dual VNH5019


The rest of loop() needs fixing the same way. Use Tools + Auto Format, too.

If you resturucture the check() function so that it is readable, perhaps I'll try reading it again.
I need help i don't know how to modify i. I just know some basic programming skills. I am in just 8 standard.
Regards,
Mishaal.
Title: Re: Pls can some one help me in programming my arduino please.
Post by: Mishtech on Oct 14, 2016, 01:09 pm
hello
Thank you for your help Paul .
I just did auto format , deleted the include dualVNH5019 and instead added the adafruit library.
I dont know what to do with the  DualVNH5019MotorShield md; which is typed below the included adafruit library.
pls help .  and do i need to add the servo.h file which is written as a comment  written aafter DualVNH5019MotorShield md;  .
Pls help me. This is for an upcoming exhibition.
Regards,
Mishaal.
Title: Re: Pls can some one help me in programming my arduino please.
Post by: rpt007 on Oct 14, 2016, 08:35 pm
Before someone can really assist you, you should
1. read and understand the forum rules (see the link in my signature) - this will give you an idea what information you should give at least so that we could assist you
2. Coming to your project:
- Tell us what you really want to achieve in your project or what exactly is your task?
- the selected motor driver can drive up to 2 very powerful DC motors with a lot of Amps needed
- do you already have one or two DC motors? (If so: pls post a link to the specification/datasheet)
- do you have already a power supply for your project?
- what Arduino type will be used (Uno?) ?
- do you have a schematic how to wire the shield with the motor(s) and power supply?
- what shall the Arduino sketch do? Are there additional input signals (buttons, sensors) which you didn't mention yet or is your project just about let the motor(s) turn at a given direction and speed?
Title: Re: Pls can some one help me in programming my arduino please.
Post by: Mishtech on Oct 20, 2016, 07:42 pm
Hello,
I have read the how to use the forum and forum rules.
-what i want to achieve is that i want to drive two motors able to move forward and  backward left and right on my command. I will control the motors using hc-05 bluetooth module.
it should also be able to drive a servo.
For better understanding of my aim:http://www.instructables.com/id/DIY-Life-Size-Phone-Controlled-BB8-Droid/?ALLSTEPS

-yes,it can drive and i have bought a dc motor meeting ts conditions

.-I have 2 dc motors  unfortunately it doesnt have a link . It is a 12 volt DC motor 500 rpm.
- i will be using an arduino uno
-Yes i have two li-ion batteries .
-yes, the ways to connect the various appliance it is there in the link i gave above and i have attached a photo of the motor driver.

-yes there will be an on/off switch thats all.

Thank you for your help so far and please help me by modifying the code and sending the file to me. please.I have no knowledge of coding except some basics.
Regards,
Mishaal.
Title: Re: Pls can some one help me in programming my arduino please.
Post by: rpt007 on Oct 21, 2016, 09:51 am
Some more questions to clarify:
1. What version of the adafruit motorshield (is it v1, v2 .. ?)
2. Why couldn't you use the Pololu shield? (-> would be easier than to rewrite/modify the existing code)
3. How do you want to power the project (2 Li-Ion batteries in series or parallel, how much voltage do you want to achieve, what voltage do the batteries come with) ?
4. Do you exactly follow the Instructables schematics?
5. Do you have already the bluetooth module?
6. To move the motors: what kind of bluetooth transmitter will you use (to send direction signals etc. via bluetooth to the bluetooth receiver connected to the Arduino) ?