Tuesday, 5 March 2013

gpio tankstage module

http://www.tankstage.co.uk/Software/
REM RPi 17 LED chaser test 3, 7/11/12  REM Requires GPIO module v0.46 or later  ON ERROR PRINT' REPORT$" at line ";ERL: END  DIM gp%(17)  
FOR n%=1 TO 17: READ gp%(n%): NEXT n%
SYS "GPIO_EnableI2C",0: REM Enables I2C pins as GPIOs, giving 17 in total  SYS "GPIO_ExpAsGPIO",2: REM Sets all GPIOs as outputs  PRINT '"Chasing LEDs..."  PRINT '"Escape to quit"  REPEAT    FOR n%=1 TO 17      SYS "GPIO_WriteData",gp%(n%),1      t%=TIME: REPEAT UNTIL TIME=t%+5    NEXT n%    FOR n%=17 TO 1 STEP -1      SYS "GPIO_WriteData",gp%(n%),0      t%=TIME: REPEAT UNTIL TIME=t%+5    NEXT n%  UNTIL FALSE  END    DATA 1,0,8,7,15,14,11,9,10,25,4,17,18,21,22,23,24

No comments:

Post a Comment