Wikia

CHDK Wiki

Canon Basic/Scripts/PrintSkull

Talk0
577pages on
this wiki

< Canon Basic

Revision as of 23:58, August 25, 2010 by Pixeldoc2000 (Talk | contribs)

PrintSkull

This is an example by Alfredo Ortega and Oren Isacson of core labs.

Script

dim I=1
dim a=3
dim b=3
dim c=3
dim d,e,f,g,h,i,j,k,l,m

private sub createSkull()
    d=LCDMsg_Create()
    e=LCDMsg_Create()
    f=LCDMsg_Create()
    g=LCDMsg_Create()
    h=LCDMsg_Create()
    i=LCDMsg_Create()
    j=LCDMsg_Create()
    k=LCDMsg_Create()
    LCDMsg_SetStr(d,"PWND!  __________")
    LCDMsg_SetStr(e,"      1   Y 1")
    LCDMsg_SetStr(f,"     1       1" )
    LCDMsg_SetStr(g,"    1  () ()  1" )
    LCDMsg_SetStr(h,"     1   /\  1" )
    LCDMsg_SetStr(i,"      1     1" )
    LCDMsg_SetStr(j,"       LLLLU" )
    LCDMsg_SetStr(k,"       UUUUU" )
    LCDMsg_Move(d,10,30)
    LCDMsg_Move(e,10,60)
    LCDMsg_Move(f,10,90)
    LCDMsg_Move(g,10,120)
    LCDMsg_Move(h,10,150)
    LCDMsg_Move(i,10,180)
    LCDMsg_Move(j,10,210)
    LCDMsg_Move(k,10,240)
end sub

private sub Initialize()
    System.Create() ' Habilita llamadas del sistema
    Capture.Create()
    FA.Create()
    SS.Create()
    UI.Create() ' para que anda UIFS
    UI.CreatePublic()
    Driver.Create()
    StartRedirectUART(1)
    createSkull()
    ShowAllTaskInfo()
    for c=0 to 10
        for a=0 to 10
            LEDDrive(a,0)
        next
        BeepDrive(2)
        Wait(500)
        BeepDrive(3)
        for a=0 to 10
            LEDDrive(a,1)
        next
        ' Colores :
        '3=blanco
        '0=negro
        '1=gris
        '5=verde
        '>5=rojo
        LCDMsg_ChangeColor(d,0)
        LCDMsg_ChangeColor(e,0)
        LCDMsg_ChangeColor(f,0)
        LCDMsg_ChangeColor(g,0)
        LCDMsg_ChangeColor(h,0)
        LCDMsg_ChangeColor(i,0)
        LCDMsg_ChangeColor(j,0)
        LCDMsg_ChangeColor(k,0)
        Wait(500)
        LCDMsg_ChangeColor(d,3)
        LCDMsg_ChangeColor(e,3)
        LCDMsg_ChangeColor(f,3)
        LCDMsg_ChangeColor(g,3)
        LCDMsg_ChangeColor(h,3)
        LCDMsg_ChangeColor(i,3)
        LCDMsg_ChangeColor(j,3)
        LCDMsg_ChangeColor(k,3)
    next
    Printf("Ann")
    Printf("Ann")
    Printf("Ann")
    Printf("Ann")
end sub

private sub Terminate ( )
end sub

Tested

Success

Unsuccessfull

Around Wikia's network

Random Wiki