Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

Push up code from Hitec problem

Hitec robotics including ROBONOVA humanoid, HSR-8498HB servos, MR C-3024 Controllers and RoboBasic
9 postsPage 1 of 1
9 postsPage 1 of 1

Push up code from Hitec problem

Post by Ric » Sat Oct 14, 2006 10:31 am

Post by Ric
Sat Oct 14, 2006 10:31 am

Hi

Having finally made a good connection using a serial to usb convertor I'm trying to 'upload' the RN-1 pushup routine available from the Hitec site.

I've copied and pasted the code into roboBASIC.
I run and it starts to upload until I get this compile error:

29 Line
Error 17 : [FOR] This variable name (or constant name) is not declared.

The actual line in question is: FOR i = 0 TO 5

Any ideas? Please bear in mind you're dealing with a total unsavvy in your reply/solution.

Thanks

Ric
Hi

Having finally made a good connection using a serial to usb convertor I'm trying to 'upload' the RN-1 pushup routine available from the Hitec site.

I've copied and pasted the code into roboBASIC.
I run and it starts to upload until I get this compile error:

29 Line
Error 17 : [FOR] This variable name (or constant name) is not declared.

The actual line in question is: FOR i = 0 TO 5

Any ideas? Please bear in mind you're dealing with a total unsavvy in your reply/solution.

Thanks

Ric
Ric
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 57
Joined: Wed Aug 02, 2006 1:00 am
Location: Sunny Algarve, Portugal

Post by hivemind » Sat Oct 14, 2006 10:37 am

Post by hivemind
Sat Oct 14, 2006 10:37 am

Somewhere before line 17 there you need this statement:

DIM i AS BYTE

which will declare the variable i so you can use it through your program. Although the error looks odd, this should be the solution (just checked).
Somewhere before line 17 there you need this statement:

DIM i AS BYTE

which will declare the variable i so you can use it through your program. Although the error looks odd, this should be the solution (just checked).
hivemind
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 211
Joined: Sat Jul 01, 2006 1:00 am
Location: between my computer and robot.

Post by Ric » Sat Oct 14, 2006 11:13 am

Post by Ric
Sat Oct 14, 2006 11:13 am

Thanks Hivemind

next up it stalls on line 76

Complie error
ERROR 25:[GOSUB] No exist used label name.


Can't say I'm impressed with Hitecs free downloads
:?

Ric
Thanks Hivemind

next up it stalls on line 76

Complie error
ERROR 25:[GOSUB] No exist used label name.


Can't say I'm impressed with Hitecs free downloads
:?

Ric
Ric
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 57
Joined: Wed Aug 02, 2006 1:00 am
Location: Sunny Algarve, Portugal

Post by Ric » Sat Oct 14, 2006 11:14 am

Post by Ric
Sat Oct 14, 2006 11:14 am

cont.

label name is standard_pose
cont.

label name is standard_pose
Ric
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 57
Joined: Wed Aug 02, 2006 1:00 am
Location: Sunny Algarve, Portugal

Post by Bullit » Sat Oct 14, 2006 11:17 am

Post by Bullit
Sat Oct 14, 2006 11:17 am

I think they intend that you insert this into your basic template where the variable i would already be dimensioned and the standup routine would also be included.
I believe your error is the gosub standup. standup is another subroutine which you can find in the basic template.
I think they intend that you insert this into your basic template where the variable i would already be dimensioned and the standup routine would also be included.
I believe your error is the gosub standup. standup is another subroutine which you can find in the basic template.
Image
Bullit
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 291
Joined: Wed May 31, 2006 1:00 am
Location: Near robot

Post by Ric » Sat Oct 14, 2006 11:33 am

Post by Ric
Sat Oct 14, 2006 11:33 am

Aha

That explains a lot.

Thanks

Bullit
Aha

That explains a lot.

Thanks

Bullit
Ric
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 57
Joined: Wed Aug 02, 2006 1:00 am
Location: Sunny Algarve, Portugal

Post by Ric » Sat Oct 14, 2006 11:51 am

Post by Ric
Sat Oct 14, 2006 11:51 am

Err, sorry about this

I've now pasted the push up routine onto the bottom of the overall template program and downloaded it to the RN-1. No problems.

How do I now run the push up routine (preferably with the remote). All other basic moves run fine from the remote, I just can't find a button to run the push-ups.

Thnaks

Ric
Err, sorry about this

I've now pasted the push up routine onto the bottom of the overall template program and downloaded it to the RN-1. No problems.

How do I now run the push up routine (preferably with the remote). All other basic moves run fine from the remote, I just can't find a button to run the push-ups.

Thnaks

Ric
Ric
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 57
Joined: Wed Aug 02, 2006 1:00 am
Location: Sunny Algarve, Portugal

Post by Bullit » Sat Oct 14, 2006 12:14 pm

Post by Bullit
Sat Oct 14, 2006 12:14 pm

You need to setup your template to envoke the subroutine when one of the ir keys is pressed.
Somewhere at the top of the template there is a section with statements like
A = REMOCON(1) 'this receives input from the IR controller
'then the on goto statement goes to the proper K# based upon the value received, if 0 (no inout received) then it just restarts the loop otherwise it goes to the proper K# as below I have K18 the 'E key on the controller does a gosub to my pushup and then when it returns it goes to main_exit and then restarts the loop of looking for input from the IR controller.

On A goto MAIN, K1, K2, K3........,K18.....

K18: ' E
GOSUB pushup
GOTO main_exit

I hope this helps.
You need to setup your template to envoke the subroutine when one of the ir keys is pressed.
Somewhere at the top of the template there is a section with statements like
A = REMOCON(1) 'this receives input from the IR controller
'then the on goto statement goes to the proper K# based upon the value received, if 0 (no inout received) then it just restarts the loop otherwise it goes to the proper K# as below I have K18 the 'E key on the controller does a gosub to my pushup and then when it returns it goes to main_exit and then restarts the loop of looking for input from the IR controller.

On A goto MAIN, K1, K2, K3........,K18.....

K18: ' E
GOSUB pushup
GOTO main_exit

I hope this helps.
Bullit
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 291
Joined: Wed May 31, 2006 1:00 am
Location: Near robot

Post by Ric » Sat Oct 14, 2006 6:34 pm

Post by Ric
Sat Oct 14, 2006 6:34 pm

It certainly has helped Bullit, and you've just made my weekend.

Great routine, especially the one armed bit.

I'm starting to get the idea now. Thanks again
:)

Ric
It certainly has helped Bullit, and you've just made my weekend.

Great routine, especially the one armed bit.

I'm starting to get the idea now. Thanks again
:)

Ric
Ric
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 57
Joined: Wed Aug 02, 2006 1:00 am
Location: Sunny Algarve, Portugal


9 postsPage 1 of 1
9 postsPage 1 of 1