We are trying to target a distance of about 24' using our encoders and a little math. We are trying to hit the target with precision by using degrees of rotation of the wheel. At that distance, the robots are going off on an angle, none of them with go straight so we are trying to synchronize the motors as part of the program. The program has flaws and won't download. None of the error codes are giving us clues as to what is wrong. I know we are using the encoders properly, because the math and the program work. But when we insert the synch program it fails to download. Here is the code:

_________________A.K.A. inxt-generationSelf-proclaimed genius, and future world dominator.My Brickshelf Folder"Don't they teach recreational mathematics anymore?" - The Tenth DoctorBow down to Nikola Tesla, King of the Geek Gods.

Sat Sep 14, 2013 5:28 pm

chris garrett

Rookie

Joined: Tue Jun 18, 2013 6:04 pmPosts: 29

Re: Synching and Encoding Program

I think our original program had the semi-colons. I typed the one here from memory. But the sync programming was surely wrong. I will try your fix tomorrow. Thanks for your help. I'll let you know how it works.

Sat Sep 14, 2013 9:11 pm

chris garrett

Rookie

Joined: Tue Jun 18, 2013 6:04 pmPosts: 29

Re: Synching and Encoding Program

Below is the corrected code that I am able to download to the bot, but when I try to run it I get a weird double beep sound and a message that says:

Ah, I suspect the problem is you're giving commands to motor 'C'. Try removing all of those, so you're just reading and controlling motor 'B'.

_________________A.K.A. inxt-generationSelf-proclaimed genius, and future world dominator.My Brickshelf Folder"Don't they teach recreational mathematics anymore?" - The Tenth DoctorBow down to Nikola Tesla, King of the Geek Gods.

Mon Sep 16, 2013 10:13 am

chris garrett

Rookie

Joined: Tue Jun 18, 2013 6:04 pmPosts: 29

Re: Synching and Encoding Program

N-G, I took out all of the C commands and the program works perfectly. Thank you very much.

Mon Sep 16, 2013 11:03 am

Ernest3.14

Professor

Joined: Sat May 18, 2013 1:24 pmPosts: 272Location: Olympia, WA

Re: Synching and Encoding Program

Btw, I just wanted to confirm that "bytecode exception" is a general error that could mean anything. Because I've seen it several times, and they were all different problems. What does it mean? That the stack overflowed? Or something? Accessing invalid memory addresses?

I think that's the case Ernest. bytecode exception is an error in the running program, Program slot is which program slot (Prolly a remnant from the RCX, as the NXT doesn't have slots), which task the error is in, and the actual error.

_________________A.K.A. inxt-generationSelf-proclaimed genius, and future world dominator.My Brickshelf Folder"Don't they teach recreational mathematics anymore?" - The Tenth DoctorBow down to Nikola Tesla, King of the Geek Gods.

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum