model trailer steering axle problem using arduino


hello everybody,
short introduction,  name john, 44 years old netherlands.
i still beginning arduino platform , i`ve started new project.

here case:
i have 1:14 scale freigt trailer (carson) , concerting steerable rear axle.
this not me client of me, using arduino mega controll al parts.
the complete model on static display , clients hardware send signals arduino.

the rear axle has 2 things:
- act normal steering axle, truck makes turn, trailer axle steers counterwise.
  easy part.
- on remote system control there 2 buttons can operate trailer axle independent of position of truck, trailer axle can turned clockwise or counterclockwise.

how work arduino ?
for setup:

1 servo moving truck left or right, potmeter connected servo.
the potmeter connected arduino , second servo controlling rear axle.
if potmeter moves (truck goes left, or right) 2nd servo moves rear axle.

so far basic servo control.

but have 2 buttons, button left , button right.
if 1 of buttons pressed trailer axle slould move left or right.
this piece of code written.
but conflicts potmeter, in other words,  if press on of buttons trailer axle servo moves 1 side, returns previous position if let let go of button.

this makes sense of course, arduino reads out 2nd potmeter , sents out signal servo.

i stuck.... how combine these 2 functions ?

the thing can think use 2 potmeters of 5k, connect them in series, total resitence 10k.
each potmeter gets own servo, 1 servo normal steering action truck vs trailer.
the 2nd potmeter, controlled servo either reduce resistance or improve resitance of total potmeter combination, axle steering servo can turned clockwise counterclockwise.
i hope can still follow me.

i can try add small drawing later.

hope can me out... 

if don't want return "normal" operation when button released, how else want return?

eventually can use switch (not button) switch amongst normal , override operation, , steer rear axle second pot in override mode.


Arduino Forum > Using Arduino > Project Guidance > model trailer steering axle problem using arduino


arduino

Comments

Popular posts from this blog

Error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode - Raspberry Pi Forums

class MPU6050 has no member named begin

missing filename after '-o'