Go to Post See, another reason for going--you can find out your chances of being thrown off the field for a safety violation! - EricH [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Spotlight this post!  
Unread 03-02-2003, 18:26
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
Re: My sensors don't work

Quote:
Originally posted by Fares
I tried installing the sensors on the EDU and test them out, but the coding doesn't seem to be working


this is what i have:

if c_sensor1=1 then c_p1_y=1

what's wrong with this code if it keeps telling me that it expects a label


A couple of problems: Both c_sensor1 and c_p1_y are CONSTANTS used in initialization to set up communications with the master microprocessor. You're not going to be able to SET c_p1_y. You should use if sensor1=1 then p1_y=1 as SuperDanman suggested.

Also, since you are using PBASIC v2.5 syntax (if ... then ... statement) rather than v2.0 (if ... then ... label), you need to enable 2.5 syntax by including a '{$PBASIC 2.5} directive. (If 2.5 syntax had been enabled, the error message would have said: "Expected a label, variable, or instruction" instead of "Expected a label".)
__________________
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
 


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
Robotics Tournament at Sensors Expo & Conference Kyle Fenton Off-Season Events 4 04-05-2003 12:15
Optical sensors with EduBot Gui Cavalcanti Robotics Education and Curriculum 5 02-03-2003 10:05
Q&A Discuss: Optical sensors with EduBot CD47-Bot Extra Discussion 2 01-03-2003 18:37
Q&A Discuss: optical sensors CD47-Bot Extra Discussion 0 15-02-2003 22:58
Robogui ! sensors don't work Fares Programming 2 07-01-2003 16:31


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

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