Weblog

Friday, 02 January 2009

Wednesday, 26 November 2008

  • 等待

    原創故事,版權所有,非請勿轉貼 !

     

    [ 今日老師打電話來 , 話麗麗係學校自成一各 , 食飯同小息都自己一個人坐係個位度,
    眼甘甘咁望住其他同學玩 ...... 點算好啊老公 ! ]

    中年男士用手摸了一摸嘴下那些鬚根 , 吾吾哦哦一番後 , 說 : [ 不如買隻寵物比麗麗啊 ! ]

    就這樣 , 麗麗得到了一隻狗仔 - 慧婷 .

    慧婷第一天來到這個家 , 就深受麗麗喜愛 , 可以話她們好似糖不甩一樣 , 形影不離 , 連睡
    覺也一齊 .

    其實慧婷這個名字係麗麗改的 , 意思係 [ 等待 ] . 唔倨狗仔慧婷係唔係知道佢個名未的意思
    呢 , 每一次麗麗放學一開門 , 總會看到慧婷係門後面搖頭擺尾的 , 等待著麗麗 . 連每次食飯
     , 慧婷都一定會等到麗麗話可以食先會食 .

    漸漸地 , 麗麗每晚也會和慧婷係被鍋中傾計 , 無論開心啊 , 唔開心啊 , 麗麗都會同慧婷講的
    . 而慧婷也好像聽得懂似的,用一些方法回應 , 有時用手仔輕輕的拍拍麗麗的頭 , 有昤會發出
    輕輕的吠叫聲等等 .

    麗麗緊抱慧婷 : [ 你知嗎 , 你係我最好的朋友 , 我唔會好似其他人一樣 , 拋棄自己的寵物 ! ]

    <<一段時候後>>

    因為慧婷的關係 , 本來係學校孤伶伶的麗麗 , 也因為身邊的朋友都喜歡狗仔 , 慢慢的結識了
    一班好朋友 . 漸漸地 , 麗麗把對慧婷的愛轉移到新結識的朋友上 , 時常忽略了慧婷 ......

    待續

Tuesday, 18 November 2008

  • http://realaudio.myweb.hinet.net/download/ry.pdf

     

     

     

     

    ' {$STAMP BS2}
    ' {$PBASIC 2.5}

             ' -----[ I/O Definitions ]-------------------------------------------------

    ' SONY TV IR remote declaration - input received from IR detector

    IrDet          PIN     12

    ' -----[ Constants ]-------------------------------------------------------

    ' SONY TV IR remote constants for non-keypad buttons
    Speed         VAR      Word
    Speed = 300

    Enter          CON     11
    ChUp           CON     16
    ChDn           CON     17
    VolUp          CON     18
    VolDn          CON     19
    Power          CON     21

     

    ' -----[ Variables ]-------------------------------------------------------

    ' SONY TV IR remote variables

    irPulse        VAR     Word
    remoteCode     VAR     Byte

    SERVO_L        CON  13
    SERVO_R        CON  14
    'ECHO           CON  2
    'INIT           CON  3
    DEBUGMODE      CON  0
    STOP_POS       CON 765

    I  VAR  Word

    DIRA = %0000
    DIRB = %1111
    DIRC = %1111
    DIRD = %1110

    ' -----[ Main Routine ]----------------------------------------------------

    ' Replace this DO...LOOP with your own Code.

    DO
      GOSUB Get_Ir_Remote_Code
      DEBUG CLS, "Remote code: ", DEC remoteCode
      IF remotecode = ChUp THEN FORWARD
      IF remotecode = ChDn THEN BACKWARD
      IF remotecode = VolUp THEN left
      IF remotecode = VolDn THEN right
      IF remotecode = Power THEN STOP1
      IF remotecode = 1  THEN Armmoveup
      IF remotecode =3 THEN Armmovedown
      PAUSE 100
    LOOP


    ' -----[ Subroutine - Get_Ir_Remote_Code ]---------------------------------

    ' SONY TV IR remote subroutine loads the remote code into the
    ' remoteCode variable.

    Get_Ir_Remote_Code:

      remoteCode = 0                             ' Clear all bits in remoteCode.

      DO                                         ' Wait for rest between messages.
        RCTIME IrDet, 1, irPulse
      LOOP UNTIL irPulse > 1000

      PULSIN IrDet, 0, irPulse                   ' Measure pulse.
      IF irPulse > 500 THEN remoteCode.BIT0 = 1  ' Set (or leave clear) bit-0.
      RCTIME IrDet, 0, irPulse                   ' Measure next pulse.
      IF irPulse > 300 THEN remoteCode.BIT1 = 1  ' Set (or leave clear) bit-1.
      RCTIME IrDet, 0, irPulse                   ' etc.
      IF irPulse > 300 THEN remoteCode.BIT2 = 1
      RCTIME IrDet, 0, irPulse
      IF irPulse > 300 THEN remoteCode.BIT3 = 1
      RCTIME IrDet, 0, irPulse
      IF irPulse > 300 THEN remoteCode.BIT4 = 1
      RCTIME IrDet, 0, irPulse
      IF irPulse > 300 THEN remoteCode.BIT5 = 1
      RCTIME IrDet, 0, irPulse
      IF irPulse > 300 THEN remoteCode.BIT6 = 1

      ' Adjust remoteCode so that keypad keys correspond to the value
      ' it stores.

      IF (remoteCode < 10) THEN remoteCode = remoteCode + 1
      IF (remoteCode = 10) THEN remoteCode = 0

      RETURN

    FORWARD:

     OUTC= %1111
     PAUSE 200

    RETURN

    BACKWARD:


     OUTC= %0101
     PAUSE 200

    RETURN

    LEFT:


     OUTC= %0111
     PAUSE 200

    RETURN

    RIGHT:


     OUTC= %1011
     PAUSE 200

    RETURN

    STOP1:


     OUTC= 0
     PAUSE 200

    RETURN

    Armmoveup:

    PULSOUT 13 ,750 + Speed     ' Servo plug in pin13


    RETURN

    Armmovedown:
    PULSOUT 13 ,750 - Speed     ' Servo plug in pin13

    RETURN

  • ' {$STAMP BS2}
    ' {$PBASIC 2.5}

             ' -----[ I/O Definitions ]-------------------------------------------------

    ' SONY TV IR remote declaration - input received from IR detector

    IrDet          PIN     12

    ' -----[ Constants ]-------------------------------------------------------

    ' SONY TV IR remote constants for non-keypad buttons
    Speed         VAR      Word
    Speed = 250

    Enter          CON     11
    ChUp           CON     16
    ChDn           CON     17
    VolUp          CON     18
    VolDn          CON     19
    Power          CON     21

     

    ' -----[ Variables ]-------------------------------------------------------

    ' SONY TV IR remote variables

    irPulse        VAR     Word
    remoteCode     VAR     Byte

    SERVO_L        CON  13
    SERVO_R        CON  14
    'ECHO           CON  2
    'INIT           CON  3
    DEBUGMODE      CON  0
    STOP_POS       CON 765

    I  VAR  Word

    DIRA = %0000
    DIRB = %1111
    DIRC = %1111
    DIRD = %1110

    ' -----[ Main Routine ]----------------------------------------------------

    ' Replace this DO...LOOP with your own Code.

    DO
      GOSUB Get_Ir_Remote_Code
      DEBUG CLS, "Remote code: ", DEC remoteCode
      IF remotecode = ChUp THEN FORWARD
      IF remotecode = ChDn THEN BACKWARD
      IF remotecode = VolUp THEN left
      IF remotecode = VolDn THEN right
      IF remotecode = Power THEN STOP1
      IF remotecode = 101  THEN Armmoveup
      IF remotecode =29 THEN Armmovedown
      PAUSE 100
    LOOP


    ' -----[ Subroutine - Get_Ir_Remote_Code ]---------------------------------

    ' SONY TV IR remote subroutine loads the remote code into the
    ' remoteCode variable.

    Get_Ir_Remote_Code:

      remoteCode = 0                             ' Clear all bits in remoteCode.

      DO                                         ' Wait for rest between messages.
        RCTIME IrDet, 1, irPulse
      LOOP UNTIL irPulse > 1000

      PULSIN IrDet, 0, irPulse                   ' Measure pulse.
      IF irPulse > 500 THEN remoteCode.BIT0 = 1  ' Set (or leave clear) bit-0.
      RCTIME IrDet, 0, irPulse                   ' Measure next pulse.
      IF irPulse > 300 THEN remoteCode.BIT1 = 1  ' Set (or leave clear) bit-1.
      RCTIME IrDet, 0, irPulse                   ' etc.
      IF irPulse > 300 THEN remoteCode.BIT2 = 1
      RCTIME IrDet, 0, irPulse
      IF irPulse > 300 THEN remoteCode.BIT3 = 1
      RCTIME IrDet, 0, irPulse
      IF irPulse > 300 THEN remoteCode.BIT4 = 1
      RCTIME IrDet, 0, irPulse
      IF irPulse > 300 THEN remoteCode.BIT5 = 1
      RCTIME IrDet, 0, irPulse
      IF irPulse > 300 THEN remoteCode.BIT6 = 1

      ' Adjust remoteCode so that keypad keys correspond to the value
      ' it stores.

      IF (remoteCode < 10) THEN remoteCode = remoteCode + 1
      IF (remoteCode = 10) THEN remoteCode = 0

      RETURN

    FORWARD:

     OUTC= %1111
     PAUSE 200

    RETURN

    BACKWARD:


     OUTC= %0101
     PAUSE 200

    RETURN

    LEFT:


     OUTC= %0111
     PAUSE 200

    RETURN

    RIGHT:


     OUTC= %1011
     PAUSE 200

    RETURN

    STOP1:


     OUTC= 0
     PAUSE 200

    RETURN
    Armm1:
    HIGH 14
     PAUSE 200

    RETURN
    Arms1:
    LOW 14
     PAUSE 200

    RETURN

    Armmoveup:

    PULSOUT 13 ,750 + Speed     ' Servo plug in pin13
    PAUSE 20

    RETURN

    Armmovedown:
    PULSOUT 13 ,750 - Speed     ' Servo plug in pin13
    PAUSE 20
    RETURN

Top Tags - Weblog

[no tags]

scum_wun

  • Visit scum_wun's Xanga Site
    • Name: lee
    • Country: Hong Kong
    • Metro: Hong Kong
    • Birthday: 10/27/1990
    • Gender: Male
    • Member Since: 2/16/2006

Weblog Archives

Don't worry - your calendar is here… to see it in action just click "Save" above and refresh the page.

About Me

[no info]

Pulse

scum_wun has no pulse!...

Recommended

[no recommendations]