'----[RC_Test.bsp]----------------------------------------- ' {$STAMP BS2p} ' {$PBASIC 2.5} ' ' File....... RC_Test.bsp ' Purpose.... Check 5 STAMP pins for RC signal ' Author..... CrustCrawler Inc. (Alex Dirks) ' E-mail..... support@crustcrawler.com ' Started.... 6/5/2005 ' Updated.... 03/23/10 ' '========================================================================= ' BS2p Pin to Tower Hobbies Rx connections: '========================================================================= ' Pin 10.........ch6 (flaps) ' Pin 11.........ch2 (elevator) ' Pin 12.........ch3 (throttle) ' Pin 13.........ch4 (rudder) ' Pin 14.........ch1 (aileron) ' ' Run this code to display a debug screen that contains raw PULSIN value ' on PINS 10, 11, 12, 13, and 14. ' ' You can also use this code to verify that moving a transmitter control ' causes the corresponding PULSIN value to change. ' '------------------------------------------------------------------------- ' -----[ I/O Definitions ]------------------------------------------------ '---- [ Variables ] ------------------------------------------------------ temp VAR Word tempArray VAR Word(6) counter VAR Byte '---- [Read stick] ------------------------------------------------------- Get_Receiver_Channel: DEBUG CLS, "Raw PULSIN values", CR, "-------------------------", CR FOR counter = 10 TO 14 PULSIN counter, 1, tempArray(counter-10) ' Read receiver channels 10 to 14 DEBUG "Pin = ", DEC counter, " Value = ", DEC tempArray(counter-10),CR NEXT PAUSE 2000 GOTO Get_Receiver_Channel '-------------------------------------------------------------------------