dim str1 as string
dim str2 as string
dim str3 as string
dim str4 as string
dim i as integer
dim state as integer
Sub Main()
call delay(0.5)
call LCDInit() ' initialize LCD
state = 0
do
if getPin(20) = 1 then '1 = not touching
str1 = "I choo-choo "
str2 = "choose you! "
str3 = " "
str4 = " "
i = 20
call Magic()
elseif getPin(19) = 1 then
str1 = "Theese purple "
str2 = "berries taste "
str3 = "like burning! "
str4 = " "
i = 19
call Magic()
elseif getPin(18) = 1 then
str1 = "Your midterm "
str2 = "project will "
str3 = "never work. "
str4 = " "
i = 18
call Magic()
elseif getPin(17) = 1 then
str1 = "Your cat's "
str2 = "breath smells "
str3 = "like cat food. "
str4 = " "
i = 17
call Magic()
elseif getPin(16) = 1 then
str1 = "When you grow "
str2 = "up you'll be a "
str3 = "catepillar. "
str4 = " "
i = 16
call Magic()
elseif getPin(15) = 1 then
str1 = "You may have "
str2 = "a moon rock up "
str3 = "your nose. "
str4 = " "
i = 15
call Magic()
elseif getPin(14) = 1 then
str1 = "You will makeout"
str2 = "w/someone in yer"
str3 = "PhysComp class. "
str4 = " "
i = 14
call Magic()
elseif getPin(13) = 1 then
str1 = "13. Me fail "
str2 = "English? That's"
str3 = "unpossible! "
str4 = " "
i = 13
call Magic()
else
str1 = "Welcome to the "
str2 = "Magical LCD "
str3 = "Fortune Cookie "
str4 = " "
i = 0
call Magic()
end if
'do while state = i
'if state <> i then
'end if
'loop
loop
End Sub
Sub Magic()
call LCDLine(1)
call LCDPutStr(str1)
call LCDLine(2)
call LCDPutStr(str2)
call LCDLine(3)
call LCDPutStr(str3)
'call LCDLine(4)
'call LCDPutStr(str4)
debug.print "******************"
debug.print "20: " ; cstr(getPin(20))
debug.print "19: " ; cstr(getPin(19))
debug.print "18: " ; cstr(getPin(18))
debug.print "17: " ; cstr(getPin(17))
debug.print "16: " ; cstr(getPin(16))
debug.print "15: " ; cstr(getPin(15))
debug.print "14: " ; cstr(getPin(14))
debug.print "13: " ; cstr(getPin(13))
debug.print cstr(state)
state = i
End Sub