Shop OBEX P1 Docs P2 Docs Learn Events
BS2 Haiku — Parallax Forums

BS2 Haiku

This BASIC Stamp 2 flashes & beeps in the Haiku pattern of 5-7-5. Better yet, all BASIC code and comments to flash the pattern conform to Haiku rules of 5, 7 and 5 syllables. LED & beeper wired active low on pin 11.



' BS2 Haiku
' Code & comment syllables
' Must form a Haiku

' Also BASIC code
' Must make a Haiku pattern
' flash 5-7-5

Q VAR Byte:PAUSE 1
C VAR Byte:B CON 15
T CON 100

main: HIGH 11
C=B-5
GOSUB flash:PAUSE 1

PAUSE 700
C=B-1
GOSUB flash:PAUSE 1

PAUSE 700
C=B-5
GOSUB flash:PAUSE 1

PAUSE 750
PAUSE 20:PAUSE 1000
PAUSE 10:GOTO main

flash:PAUSE 11
FOR Q=1 TO C
TOGGLE 11

PAUSE T:PAUSE T:NEXT
PAUSE 1300:PAUSE T
PAUSE 7:RETURN

Comments

  • And who said code isn't poetry....
  • ercoerco Posts: 20,256
    So yes, that was silly and just for fun.

    The next urgent challenge is to write rhyming code that actually does something.

    And who will answer the call of Limerick coding?

    FOR B6=0 to 2
    IF IN3=1 GOTO WHO
    IF B1=FINE THEN TOGGLE PIN9
    NEXT:DEBUG "Program error, oh Poo"
  • Add troubadour to erco's long list of attainments. :)
  • ercoerco Posts: 20,256
    User Name wrote: »
    Add troubadour to erco's long list of attainments. :)

    Ah, one of my all-time faves!



Sign In or Register to comment.