Go to Post I would like to think that I would be considered smart no matter who I was. - Kelly [more]
Home
Go Back   Chief Delphi > Technical > Robotics Education and Curriculum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 15-12-2002, 14:00
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
1 joystick drive

Has ne body noticed that the 1 joystick drive default code doesn't work?
  #2   Spotlight this post!  
Unread 15-12-2002, 15:50
sanddrag sanddrag is offline
On to my 16th year in FRC
FRC #0696 (Circuit Breakers)
Team Role: Teacher
 
Join Date: Jul 2002
Rookie Year: 2002
Location: Glendale, CA
Posts: 8,519
sanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond reputesanddrag has a reputation beyond repute
*anybody

Which default code do you mean? The only default code I know of is made for two joystick drive.

rbayer, any thoughts?
__________________
Teacher/Engineer/Machinist - Team 696 Circuit Breakers, 2011 - Present
Mentor/Engineer/Machinist, Team 968 RAWC, 2007-2010
Technical Mentor, Team 696 Circuit Breakers, 2005-2007
Student Mechanical Leader and Driver, Team 696 Circuit Breakers, 2002-2004
  #3   Spotlight this post!  
Unread 15-12-2002, 16:08
Matt Reiland's Avatar
Matt Reiland Matt Reiland is offline
'The' drive behind the drive
None #0226 (TEC CReW Hammerheads)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1999
Location: Troy Michigan
Posts: 712
Matt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond repute
Adding a jumper to Input 5 on the EduBot should make it switch to one joystick drive, our appears to work.
  #4   Spotlight this post!  
Unread 15-12-2002, 16:12
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
What exactly do you mean by "doesn't work"?

RoboEmu seems to process it just fine. If you want to try it out, you will need to add eight 127s to the end of the serout to make it the same length as the full RC serout and you will need to add a colon after exit_drive_r_test on line 405 to make RoboEmu recognize it as a label.

Just click the checkbox for sw5 and then play with port 1 to see the changes.

If you want some more help, try the following tests on your robot and let me know what happens. I'm guessing that one of the motors just needs to be reversed or you need to swap which PWM drives each motor. Here's my list of tests:

What happens when you push the joystick straight forwards? straight back?
When you move it all the way to the left? to the right?
In the upper-left corner? Lower-right?

--Rob
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
  #5   Spotlight this post!  
Unread 15-12-2002, 18:50
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
it just goes crazy when we close sw5

so it will work if i just add a colon after line 405? I was wondering about that. some places in the code it uses a colon when calling labels and sometimes it doesn't. Please halp i hace never coded pbasic before. im used completely different languages such as PHP, java and C++ and this is a big change.

Also is it possible to divide a byte variable by a decimal and just have the answer rounded?
__________________
1139 Alumni

Last edited by Rickertsen2 : 15-12-2002 at 18:57.
  #6   Spotlight this post!  
Unread 15-12-2002, 19:19
Greg Ross's Avatar
Greg Ross Greg Ross is offline
Grammar Curmudgeon
AKA: gwross
FRC #0330 (Beach 'Bots)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Hermosa Beach, CA
Posts: 2,245
Greg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond repute
Send a message via AIM to Greg Ross Send a message via Yahoo to Greg Ross
Quote:
Originally posted by Rickertsen2
Also is it possible to divide a byte variable by a decimal and just have the answer rounded?
No. PBASIC knows nothing of decimals. The only division you can do is integer. If you want to round though, you can add 1/2 the divisor to the dividend before dividing. This will insure correct rounding of the quotient.

By the way, it is oft repeated that the BASIC Stamp doesn't handle negative numbers. This is NOT true. It will add, subtract, and multiply negative numbers correctly. IT WILL NOT DIVIDE CORRECTLY, though.
__________________
Greg Ross (The Grammar Curmudgeon formerly known as gwross)
S/W Engineer, Team 330, the Beach 'Bots
<--The Grammar Curmudgeon loves this cartoon.
“Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!" Hunter S. Thompson
"Playing a practical joke means doing something mean and calling it funny." Me
  #7   Spotlight this post!  
Unread 15-12-2002, 19:33
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
wait so u can store a negative # in a byte var? really!!!
__________________
1139 Alumni

Last edited by Rickertsen2 : 15-12-2002 at 20:25.
  #8   Spotlight this post!  
Unread 15-12-2002, 19:35
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
Quote:
Originally posted by gwross

By the way, it is oft repeated that the BASIC Stamp doesn't handle negative numbers. This is NOT true. It will add, subtract, and multiply negative numbers correctly. IT WILL NOT DIVIDE CORRECTLY, though.
This all comes back to the definition of "handle." Intrinsically, anything using two's complement will "handle" negative numbers by definition. However, until PBASIC can at the very least compare negative and positive numbers using >, <, etc, I'm going to continue believing in the absence of anything less than 0. Ditto on support in Max/Min, etc.



As for the colon thing, it's just a matter of style. Technically, it's not needed following a label, but it makes code easier to read and that stipulation made RoboEmu a LOT easier to write. If you do want to pass EduCode through RoboEmu, don't forget to change the Serout line also. RoboEmu expects 18 bytes after 255,255, but the Edu code only has 10.
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
  #9   Spotlight this post!  
Unread 20-12-2002, 19:25
Hailfire Hailfire is offline
Registered User
AKA: Jason
no team
Team Role: College Student
 
Join Date: Oct 2002
Rookie Year: 2003
Location: Rochester, Michigan
Posts: 452
Hailfire has a little shameless behaviour in the past
Send a message via AIM to Hailfire
Our team has the program written already. The only thing is, we haven't tested it yet so therefore, we don't know if it works or not. Here I have attached the code to our configurations. Tell me if it's correct or not.
Attached Files
File Type: doc stamp bs2sx.doc (38.0 KB, 75 views)
  #10   Spotlight this post!  
Unread 20-12-2002, 20:00
Greg Ross's Avatar
Greg Ross Greg Ross is offline
Grammar Curmudgeon
AKA: gwross
FRC #0330 (Beach 'Bots)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Hermosa Beach, CA
Posts: 2,245
Greg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond repute
Send a message via AIM to Greg Ross Send a message via Yahoo to Greg Ross
Quote:
Originally posted by Rickertsen2
wait so u can store a negative # in a byte var? really!!!
Well, if you want to STORE a negative number, you will need to use a WORD variable rather than a BYTE var. My point was that when you're doing calculations, you don't have to be quite as paranoid as some code I've seen.
__________________
Greg Ross (The Grammar Curmudgeon formerly known as gwross)
S/W Engineer, Team 330, the Beach 'Bots
<--The Grammar Curmudgeon loves this cartoon.
“Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!" Hunter S. Thompson
"Playing a practical joke means doing something mean and calling it funny." Me
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
1 stick drive to 2 stick drive wayne 05 Programming 18 01-04-2004 16:41
Direct drive or Chain? Suneet Technical Discussion 32 27-03-2003 23:00
question about one joystick drive programing james700 Programming 13 29-01-2003 14:49
"Motors and Drive train edition" of Fresh From the Forum Ken Leung CD Forum Support 6 29-01-2002 12:32
switching joystick axis????? team222badbrad Technical Discussion 9 16-01-2002 23:07


All times are GMT -5. The time now is 13:11.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi