I just cannot remember....
22 years ago, I build a wheeled robot, controlled by DTMF. It still works, btw. Once a year, I break it out of mothballs, and run it around the yard. Anyhow, below is a sample of the code used to control a part of it, and I cannot remember what the "REV 4" in the line of code means. Does it reverse the sequence of the input order? Just cannot find the meaning in the manual. The "DTMF_number" uses four inputs on the stamp..."INA" The DTMF dual tone is generated by the MT8870 chip in the wireless transmitter. This tone is then transmitted, wirelessly to a receiver on the wheeled robot which then interpets the instruction.
Thank you....and I still think that the Stamp and the Propeller are the best controllers ever built for the hobbiest...
'================================================
DTMF_number VAR INA 'key pad numbers from hand held radio (0 thru 15)
validation VAR IN4 'a correct tone has been received (0 thru 15)
'=========================================================
enable_aux_functions:
PAUSE 1000 'time to get finger off button otherwise will re-enter loop...
aux_functions:
IF DTMF_number REV 4 = 12 AND validation = ok THEN
GOTO reset 'go back to motor_function DTMF receiver
ELSEIF DTMF_number REV 4 = 10 AND validation = ok THEN
GOSUB all_stop
GOTO reset 'a stop command will re-sync the pan/tilt
ENDIF '>and drive motor stamps to normal
GOTO aux_functions:
'================================================
Comments
Likely means those four input wires are connected in the opposite order to what they should be.
JonnyMac, again you have come to the rescue...I remember now...LOL. Found REV on page 245 of the Stamp manual. And, yes, to evanh, when I built the PCB in those early days, long before ExpressPCB, I did not pay attention to the routhing of the traces from the MT8870 and got them backwards. Glad there was a "REV" command.