Pages: [1]   Go Down
Author Topic: Newbie |Howto - Controlling a model  (Read 808 times)
0 Members and 1 Guest are viewing this topic.
Netherlands
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Where to begin...

How can i get a modelcrane (4 motor) attached to a  'uno' board,
to work by another 'uno' board with two arcade-joysticks linked over APC220

-  what i have:
2  x uno boards
2  x motorshields L298P(cant figure how to stack these btw ! as they bith listen to E1-M1-E2-M2) ---> Arduino Motor Shield 2A see attached picture
1  x L298N 2Amps motorcontroller
1  x set APC220 (already managed to get PC to link to MCU)

Can someone help me with this?
what do i need more?
is there a sketch for this, guess i'm not the first who would want this?

# problems i ran into sofar are that:
 while trying to steer a servo, to also start an engine that does a predefined run (slowstart-fullrun-slowstop) it cuts off the servo-routine and i have to wait for the motor to stop ?!?!



see attached sketch (with tab) below:











 

* test.pde (4.17 KB - downloaded 14 times.)
* test_LIB.pde (1.85 KB - downloaded 12 times.)

* 360_big.png (69.77 KB, 298x250 - viewed 19 times.)
« Last Edit: July 07, 2011, 09:48:22 am by Macguyver » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
2  x motorshields (cant figure how to stack these btw ! as they bith listen to E1-M1-E2-M2)
Which ones? Post a link.
Logged

Netherlands
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

updated my post as requested !
Logged

Netherlands
Offline Offline
God Member
*****
Karma: 7
Posts: 640
A naughty mind is a joy forever.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If it's a shield like http://droboticsonline.com/ebaydownloads/L298_Motor_Shield_Manual.pdf,
it looks the same, stacking on top of each other and using the same pins will indeed cause problems.

You could connect the E1-M1-E2-M2 pins of one shield to different pins on the arduino though.
In your sketch you'll need use those new pin numbers and name variables like E3-M3-E4-M4 to talk to the second shield. Don't forget to connect ground, +5 for the circuitry and of course power supply.


The problem of servos not responding can be found in one of the delays you're using.
After doing something with motor-shield you programmed a delay(4000).
During that delay Arduino does nothing but waiting for 4 seconds. It doesn't update the readings of the pots attached.

You should check http://arduino.cc/en/Tutorial/BlinkWithoutDelay (you can also find it in the digital part of examples). It gives you the possibility to perform tasks at a certain moment instead of
just waiting till it's time. That gives you the possibility to do loads of things in the meanwhile.

By the way, Lol, I'll check my girlfriend this evening to see whether she can knipper her kut that fast smiley-wink

« Last Edit: July 07, 2011, 11:23:06 am by Simpson_Jr » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
updated my post as requested !
Adding a picture is not the same as adding a link. With a link, we can go find the data sheet of the product, and see if there is a way to help you. With a picture, we can say "Oh, how cute!". Your choice.
Logged

Netherlands
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

well it is indeed the shield as mentioned in the reply from Simpson_Jr

http://droboticsonline.com/ebaydownloads/L298_Motor_Shield_Manual.pdf

Logged

Pages: [1]   Go Up
Jump to: