
RPBASIC-52 PROGRAMMING GUIDE
2-10
NOTE: This command takes approximately 27 ms to process. This is because the reader sends a bit of
information every 1 ms. Serial and timing interrup ts are processed a t the hardware level. However,
commands such as ONTICK and ONITR are delayed until CARD$ is finished processing the data.
RELATED
CONFIG LINE
ERROR
BAD ARGUMENT When expr > 3 or negative
EXAMPLE
The following example reads the card. CONFIG LIN E is performed only once. The error code is returned in
B if no card was swiped.
CONFIG LINE 100,12,0,255,0,0
10 STRING 200,10
100 GOSUB 1000
110 IF B = 1 THEN 100
120 PRINT "Card number: ",$(0)
130 GOTO 100
1000 $(0) = CARD$(0)
1010 IF ASC($(0),1)= 45 THEN 1040:REM See if '-'
1020 B=0
1030 RETURN
1040 B = ASC($(0),2)-48:REM Return error number
1050 $(0)= ""
1060 RETURN
Komentarze do niniejszej Instrukcji