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

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s