PDA

View Full Version : I need help with project



dummie95
08-01-2008, 08:21 AM
hey im new to all of this.. just went out and bought a bs2 and am trying to do something and cant figure this out..

first it takes an input kinda like this.



lines VAR Nib
idx VAR Nib

Main:
DEBUG CLS, "press 1any number between 1 and 5 to go on"
DEBUGIN DEC1 lines

IF ((lines >= 1) AND (lines <= 5)) THEN



PULSIN 0, 1, value ' measure pulse input
DEBUG DEC value, CR
IF (value > 4000) THEN ' evaluate duration
DEBUG "Value was greater than 4000"
ELSEIF (value = 4000) THEN
DEBUG "Value was equal to 4000"
ELSE
DEBUG "Value was less than 4000"
ENDIF
DEBUG CR, CR
PAUSE 1000



ELSE
DEBUG CR, "Invalid entry!"
PAUSE 2000
GOTO Main
ENDIF


Ěthis is just like kinda an example if ny1 could correct my code or help me out on this i would be grateful... thanks

Franklin
08-01-2008, 09:11 AM
Looks good, but then I have no idea what it is you are trying to accomplish. you don't use idx and you waven't declared value and lines so it wouldn't work. Could we get more information on what you are trying to do?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen