Robofun 機器人論壇

 找回密碼
 申請會員
搜索
熱搜: 活動 交友 discuz
查看: 16239|回復: 2
打印 上一主題 下一主題

史賓機器人紅外線碼 RoboSapien IR Code

[複製鏈接]
跳轉到指定樓層
1#
發表於 2005-10-13 15:54:31 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
看過前面介紹的直接對原始的遙控器作修改,
讓我們可以達到使用電腦來控制史賓機器人的目的。
但是有沒有辦法自己來實作一個紅外線遙控器來直接發射呢?
以下這份文件詳細記載了史賓機器人遙控器的紅外線資料格式、載波、編碼格式
參照此份文件就可以實作出紅外線控制器啦!
因為有了這一份文件讓我們實作的過程難度降低了許多
我們也實際使用示波器量測過訊號...
是和這份文件是相符的
這份文件說的蠻詳細的...
有興趣的人可以照著他的描述試著自己實作看看囉!

下圖為紅外線收發感測器,電子材料行都購買的到



文件出處:
http://robosapien.tk/


The IR Carrier is 39.2kHz. Data is modulated using a space coded signal with 8 data bits (data clock is 1200Hz, but actual data rate varies depending on the data).

You can skip the IR and IR modulation by wiring directly into the main PCBoard. This can be encoded easily by almost any small microprocessor. For modulating the signals yourself, the signal looks something like this:
Timing based on 1/1200 second clock (~.833ms)
Signal is normally high (idle, no IR).
Start: signal goes low for 8/1200 sec.
Data bits: for each of 8 data bits, space encoded signal depending on bit value
    Sends the most significant data bit first
    If the data bit is 0: signal goes high for 1/1200 sec, and low for 1/1200 sec.
    If the data bit is 1: signal goes high for 4/1200 sec, and low for 1/1200 sec.
    BTW: The first bit (msb) is always 1 (valid codes are from $80 to $FF)
When completed, signal goes high again.
No explicit stop bit. Minimal between signals is not known.

Movement Commands (no shift)
$80 - turn right (on left side of remote)
$81 - right arm up (upper left button on remote)
$82 - right arm out
$83 - tilt body right
$84 - right arm down
$85 - right arm in
$86 - walk forward
$87 - walk backward
$88 - turn left (on right side of remote)
$89 - left arm up (upper right button on remote)
$8A - left arm out
$8B - tilt body left
$8C - left arm down
$8D - left arm in
$8E - stop
Programming Commands (no shift)
$90 - P (Master Command Program)
$91 - P>> (Program Play, the one on the bottom)
$92 - R>> (Right sensor program)
$93 - L>> (Left sensor program)
$94 - S>> (Sonic sensor program)


GREEN shift commands
$A0 - right turn step
$A1 - right hand thump
$A2 - right hand throw
$A3 - sleep
$A4 - right hand pickup
$A5 - lean backward
$A6 - forward step
$A7 - backward step
$A8 - left turn step
$A9 - left hand thump
$AA - left hand throw
$AB - listen
$AC - left hand pickup
$AD - lean forward
$AE - reset

$B0 - Execute (master command program execute)
$B1 - Wakeup
$B2 - Right (right sensor program execute)
$B3 - Left (left sensor program execute)
$B4 - Sonic (sonic sensor program execute)

ORANGE shift commands
$C0 - right hand strike 3
$C1 - right hand sweep
$C2 - burp
$C3 - right hand strike 2
$C4 - high 5
$C5 - right hand strike 1
$C6 - bulldozer
$C7 - oops (fart)
$C8 - left hand strike 3
$C9 - left hand sweep
$CA - whistle
$CB - left hand strike 2
$CC - talkback
$CD - left hand strike 1
$CE - roar

$D0 - All Demo
$D1 - Power Off (drop snow-globe and say "Rosebud")
$D2 - Demo 1 (Karate skits)
$D3 - Demo 2 (Rude skits)
$D4 - Dance

NOTES:
add $08 to go from right-side commands to left-side commands.
add $20 to command bytes for the GREEN shift (ie. $Ax and $Bx range)
add $40 to command bytes for the ORANGE shift (ie. $Cx and $Dx range)



--------------------------------------------------------------------------------

SECRET UNDOCUMENTED CODES

Several different launch codes (Executing the main program)

$B0 - standard "EXECUTE" on remote
Robot says "uh-huh" before starting Main program
No subroutines called [Execute sensor commands (Green Shift) cause error sounds to be played instead of what they should do -- bug or feature you decide]

$97 - appears to be same as $B0

$98 - Quiet execute main program
Robot does not say "uh-huh"
No subroutines called

$9A - Quiet execute main program with subroutines !!
Robot does not say "uh-huh"
Subroutines are called (as documented in the manual). This is the one to use.
Execute feature appears to be same as $91 (regular remote Program Play). $91 button also does other things like end the current recording. $9A code doesn't.

Useful? secret codes

$F6 - feet shuffle
$FB - nothing (useful as NO-OP)
$FC - raise arm throw
$D6 - karate chop


WORK IN PROGRESS, not useful [or at least no significant difference detected]
$95,$96 - Program main again (like $90)
$99 - like $98
$9B - like $90 ?
$9C - do nothing
$9D,9E,9F - like $90 ?
$B5 - like $97 ?
$B6 - like $90 ?
others - looks like these repeat as well (eg: record/execute one of the program areas) or do nothing

$E0 - $EE (looks like the $A0 range)
$EF - nothing
$F0 - like $97
$F1 - like $98
$F2 - Execute right program
$F3 - Execute left program
$F4 - Execute sonic program
$F5 - like $F0/97 ?
$F7 - like $F0/97 ?
$F8,F9,FA - like $F1/98 ?
$FD,FE,FF - program main again (like $90)
2#
發表於 2005-10-13 19:37:12 | 只看該作者
大大都是到哪邊買材料的呢??

我是去光華那個電子廣場..有一家還蠻大的電子專賣店...

^_^
3#
發表於 2010-4-17 12:45:47 | 只看該作者
我建議如果是在台北光華的話可以去源達看看價格公道不用會員也有會員價的打折扣且常常幫你去零頭~給你好的奇蒙子
您需要登錄後才可以回帖 登錄 | 申請會員

本版積分規則

小黑屋|手機版|Archiver|機器人論壇 from 2005.07

GMT+8, 2024-11-21 21:03 , Processed in 0.140605 second(s), 7 queries , Apc On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回復 返回頂部 返回列表