Shop OBEX P1 Docs P2 Docs Learn Events
problem HB-25 motor controller object — Parallax Forums

problem HB-25 motor controller object

Kris CardoenKris Cardoen Posts: 46
edited 2012-05-07 12:51 in Propeller 1
Hi,

I have downloaded the object "HB-25 motor controller object By CJ" for use with my propeller board of education
I test only with a singe HB-25 controller.

I have used the following code (since the code states that the range of the motor.set_motor1 should be between 1000 and 2000)


motor.config(14, 0, 1)
motor.set_motor1(1999) ' max speed forward
motor.pulse_motors

This works fine....
Later I have tested motor.set_motor1(1500) 'stop => also works fine...
The weird thing is when I test between 1500 and 1000, I expected to have a reverse action.
But instead nothing happens.
Any Idea what I'm doing wrong?

Regards,
Kris

Comments

  • DiverBobDiverBob Posts: 1,116
    edited 2012-05-05 14:11
    That sounds right, 500 up to <1500 should reverse. I'm using the same controller with no issues, are you saying that you don't get any movement at all? Maybe you could post your code and we might see something there.

    Bob
  • Kris CardoenKris Cardoen Posts: 46
    edited 2012-05-06 12:21
    Hi,

    Thanks for having a look
    The code is quite simple :lol: you will see that I use the value 1999 = max speed, 1500 = stop, but <1500 no action. Maybe a problem with my controller?
    Is there another way to test the controller? anyway here is my code. I have downloaded the CJ_HB25_014 from the object lib.

    Regards,
    Kris


    OBJ


    system : "Propeller Board of Education" ' object for Board of eduction functions
    pst : "Parallax Serial Terminal Plus" ' object for serial communication
    time : "Timing" ' object for time control
    motor : "CJ_HB25_014" ' HB25 controller


    VAR
    word c
    PUB Go


    system.Clock(80_000_000) 'Set system clock to max 80 Mhz



    motor.config(14, 0, 1)
    motor.set_motor1(1999)
    motor.pulse_motors
  • Kris CardoenKris Cardoen Posts: 46
    edited 2012-05-07 12:51
    Hi,

    I have tested my propeller board of education with the cont. servos from my boebot.
    It seems that that also doesn't work. I guess that there is a problem with my board.
    I will open a case on the parallax website.

    Regards,
    Kris
Sign In or Register to comment.