Go to Post Between Andy B. and Andy G. being Andy A. has some unspoken expectations put on it. - Andy A. [more]
Home
Go Back   Chief Delphi > Technical > Programming
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 11-01-2003, 19:02
mistresshawk's Avatar
mistresshawk mistresshawk is offline
Registered User
#1083 (The CREW)
 
Join Date: Jan 2003
Location: Orlando, Florida
Posts: 11
mistresshawk is an unknown quantity at this point
Question Good Beginner Websites

I'm a rookie, with a team that's just starting up this year. I was wondering if anyone has any good websites with manuals/tutorials to learn PBASIC, geared towards someone whose experiance with programming is limited to programming her TI-83 Calculator.

Help?
__________________
Hawke
' There are very few problems that can not be solved with orders ending with "or die."'
  #2   Spotlight this post!  
Unread 11-01-2003, 19:09
Raven_Writer's Avatar
Raven_Writer Raven_Writer is offline
2004 Detroit & Pittsburgh Winners
AKA: Eric Hansen
FRC #0005 (RoboCards)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Melvindale
Posts: 1,549
Raven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really nice
Send a message via ICQ to Raven_Writer Send a message via AIM to Raven_Writer Send a message via MSN to Raven_Writer Send a message via Yahoo to Raven_Writer
Re: Good Beginner Websites

Quote:
Originally posted by mistresshawk
I'm a rookie, with a team that's just starting up this year. I was wondering if anyone has any good websites with manuals/tutorials to learn PBASIC, geared towards someone whose experiance with programming is limited to programming her TI-83 Calculator.

Help?
Read the PBASIC manual, and visit http://www.innovationfirst.com/firstrobotics/ and http://www.parallax.com. InnovationFIRST has some info on the code, and Parallax has some documentation also.
__________________
AIM: wisprmylastbreth
EMail: nightskywriter@gmail.com
Y!: synsoflife

"ai yoru ga" -- "Love the nights"
  #3   Spotlight this post!  
Unread 11-01-2003, 19:39
Damian Manda's Avatar
Damian Manda Damian Manda is offline
The Damian
no team
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Fort Collins, CO
Posts: 154
Damian Manda has much to be proud ofDamian Manda has much to be proud ofDamian Manda has much to be proud ofDamian Manda has much to be proud ofDamian Manda has much to be proud ofDamian Manda has much to be proud ofDamian Manda has much to be proud ofDamian Manda has much to be proud ofDamian Manda has much to be proud of
Send a message via AIM to Damian Manda
Luckily the commands are very similar in PBASIC and TI-Basic.
I dont know any websites, but here are some commands:
(TI-Basic is first, followed by PBASIC)

For(x,1,10)...End
For x = 1 to 10...Next

If x=1..Then..Else..End
If x=1 then..else..endif (2.5 syntax)

1-->x
x = 1

While x=1 ... End
Do While x=1 .. Loop

If you want any specific commands, I might know them as well.

-Damian Manda

Last edited by Damian Manda : 11-01-2003 at 19:44.
  #4   Spotlight this post!  
Unread 11-01-2003, 22:52
Geoffrey4283 Geoffrey4283 is offline
Registered User
#0825
 
Join Date: Jan 2003
Location: SWVGS
Posts: 12
Geoffrey4283 is an unknown quantity at this point
"Error: Expected a label"

Hi, i'm just trying to see if anyone can explain to me the reason for thparticular error, or jsut help me figure out why my line of code won't work. We're just playing around with the EDU-Robots and some optical sensors from last year. Explain why simply adding this line of code after the Relay Feedback LIghts portion of the default code, and before the Output data, isn't working:
if rc_sw1 = 1 then drive_L = 190
It gives the error displayed in the subject of this "Expected a Label." I really don't know what it's asking for. It highlights drive_L and says expected a label. Can anyone help on that one? I've compared all previous uses of the variable drive_L, and there doesn't seem to be any difference from the way they've used it, to the way that I've used it. Any help would be appreciated, so thanks.

Geoff
  #5   Spotlight this post!  
Unread 11-01-2003, 23:33
Geoff_494 Geoff_494 is offline
Registered User
#0494 (Martians)
 
Join Date: Dec 2002
Location: Goodrich, MI
Posts: 7
Geoff_494 is an unknown quantity at this point
Send a message via AIM to Geoff_494
In the old PBASIC syntax, IF...THEN loops can only be directed to a label, you can't put a command after the THEN statement. Working could would be something along the lines of:

IF rc_sw1 = 1 THEN motor_fwd
*insert code here for the rc_sw1 <> 1 condition*
motor_fwd:
drive_L = 190

Also, what optical sensors are you using? If you're using the banner sensors from last year, the 7.2 volt battery pack that came with the EduBot won't be enough to power them. You'll have to use an external circuit that delivers 10-30 V (consider 2 9V batteries in series).
  #6   Spotlight this post!  
Unread 12-01-2003, 00:18
Mongoose's Avatar
Mongoose Mongoose is offline
Registered User
#0948 (Newport Robotics Group (NRG 948))
 
Join Date: Oct 2002
Location: Bellevue, WA
Posts: 45
Mongoose is an unknown quantity at this point
Send a message via AIM to Mongoose
I hope you searched, there are a couple of rookie threads out there. But there's a pretty nice web site out there at http://www.first-codex.net which has some nice articles about programming. The good part is you get to use gotos and labels in your code just like in TI-BASIC.

Labels are labels in the code which... uh, label a section. You can jump around parts of your program by using the goto command. If you tell the program to go to a section marked by a label that doesn't exist, the editor screams at you.

Last edited by Mongoose : 12-01-2003 at 00:20.
  #7   Spotlight this post!  
Unread 12-01-2003, 05:35
Gobiner Gobiner is offline
Registered User
#0753 (High Desert Droids)
 
Join Date: Nov 2002
Location: Bend, Oregon
Posts: 54
Gobiner is an unknown quantity at this point
Send a message via ICQ to Gobiner Send a message via AIM to Gobiner
You might try contacting people from these forums on ICQ or AIM to get your questions answered. Spend enough time here and you notice a few people know everything, so just go straight for the jugular.
__________________
0N3 1337 PR0G|24MM1N6 N1NJ4
  #8   Spotlight this post!  
Unread 12-01-2003, 15:38
Raven_Writer's Avatar
Raven_Writer Raven_Writer is offline
2004 Detroit & Pittsburgh Winners
AKA: Eric Hansen
FRC #0005 (RoboCards)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Melvindale
Posts: 1,549
Raven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really nice
Send a message via ICQ to Raven_Writer Send a message via AIM to Raven_Writer Send a message via MSN to Raven_Writer Send a message via Yahoo to Raven_Writer
Quote:
Originally posted by Gobiner
You might try contacting people from these forums on ICQ or AIM to get your questions answered. Spend enough time here and you notice a few people know everything, so just go straight for the jugular.
rbayer is a pretty smart dude. Just make sure your questions and/or answers don't have any spelling mistakes like "r" instead of "are"
__________________
AIM: wisprmylastbreth
EMail: nightskywriter@gmail.com
Y!: synsoflife

"ai yoru ga" -- "Love the nights"
  #9   Spotlight this post!  
Unread 12-01-2003, 15:41
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 Raven_Writer
rbayer is a pretty smart dude. Just make sure your questions and/or answers don't have any spelling mistakes like "r" instead of "are"
lol. That was the day I spent filling out college apps all day. Let's just say I wasn't in a very good mood. Anyway, the point still stands: email me with any questions you may have and I normally respond within an hour.

--Rob
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
  #10   Spotlight this post!  
Unread 12-01-2003, 15:56
AJ Quick's Avatar
AJ Quick AJ Quick is offline
Your Attention Please
FRC #0006 (CogSquad)
Team Role: Alumni
 
Join Date: Oct 2002
Rookie Year: 2001
Location: Minnesota
Posts: 464
AJ Quick has a spectacular aura aboutAJ Quick has a spectacular aura about
Quote:
Originally posted by rbayer
I normally respond within an hour.
He's not kidding either.
__________________
-AJ Quick (Alum on Team 6)
http://www.HHSRobotics.com/

Place your attention entirely on my voice and try to ignore all the others. It is important to be able to focus on a single source of information while blocking out all the other things competing for your attention.
  #11   Spotlight this post!  
Unread 12-01-2003, 15:59
Raven_Writer's Avatar
Raven_Writer Raven_Writer is offline
2004 Detroit & Pittsburgh Winners
AKA: Eric Hansen
FRC #0005 (RoboCards)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Melvindale
Posts: 1,549
Raven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really nice
Send a message via ICQ to Raven_Writer Send a message via AIM to Raven_Writer Send a message via MSN to Raven_Writer Send a message via Yahoo to Raven_Writer
Usually, it's amazing if it takes him 30 mins ( )
__________________
AIM: wisprmylastbreth
EMail: nightskywriter@gmail.com
Y!: synsoflife

"ai yoru ga" -- "Love the nights"
  #12   Spotlight this post!  
Unread 13-01-2003, 10:18
Geoffrey4283 Geoffrey4283 is offline
Registered User
#0825
 
Join Date: Jan 2003
Location: SWVGS
Posts: 12
Geoffrey4283 is an unknown quantity at this point
Still not working

We've changed the code from the previous bit to this:

IF rc_sw1 = 1 THEN motor_fwd

drive_L = drive_L
goto end_optics:

motor_fwd:
drive_L = 254

end_optics:

The point of all this is that when we have the optical sensor reflecting, indicated by the solid or rapidly blinking red LED on the top of the banner sensor, we want the robot to move forward. It isn't, to say the least. The problem either lies with our program, or our contact between the white sensor cable and SW1 on the EDU robot. Any suggestions?
  #13   Spotlight this post!  
Unread 13-01-2003, 10:26
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
Are you sure that rc_sw1 gets set to 1 when the sensor "sees" a target? There are two signal wires (one black, one white) coming from the optical sensor; one will be 1 when the sensors sees something, the other will be 1 when it doesn't. Try a "debug? rc_sw1" and see what happens as you move a target in and out of its field of view.
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
  #14   Spotlight this post!  
Unread 13-01-2003, 10:35
Geoffrey4283 Geoffrey4283 is offline
Registered User
#0825
 
Join Date: Jan 2003
Location: SWVGS
Posts: 12
Geoffrey4283 is an unknown quantity at this point
Sort of

We've tried both the black and the white wires as we've been troubleshooting, and getting nothing out of either of them. At least, no response. Where do I do the "debug? rc_sw1"? Soudns like a very good idea, I just don't know how.
  #15   Spotlight this post!  
Unread 13-01-2003, 10:38
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
Put it anywhere between the Serin and Serout. After you send the program to the RC, leave the cable connected. A little blue window should pop up on your computer screen that scrolls the values of rc_sw1 whenever the robot is running.

Debug?, along with the rest of the debug family, are the staples of bug finding. Alternatively, you can drop your code in RoboEmu and see what happens when you turn on sw1. If it works in RoboEmu, it's probably an electrical issue.
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
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
Vanilla Coke..good? bad? A. Leese Chit-Chat 41 07-01-2004 00:15
Check this stuff out: good websites LBK Rules Chit-Chat 3 15-01-2003 10:28
What makes the Good, So good? Chris General Forum 16 18-07-2002 11:09
your favorite music and tipps about good new rock music PsychoPhil Chit-Chat 26 03-07-2002 01:19
IT to be revealed on Good Morning America Joe Ross Dean Kamen's Inventions 50 13-12-2001 09:53


All times are GMT -5. The time now is 05:07.

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