亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? quadwalking_engine_base_program[1].bs2

?? 該程序是一個描述四角鐵甲蟲機器人調試過程的程序
?? BS2
字號:
'------- [QuadWalking_Engine_Base_Program ] ------------------------------
'{$STAMP BS2}
'{$PBASIC 2.5}
'
'   File....... QuadWalking_Engine_Base_Program.BS2
'   Purpose.... Investigate QuadWalking_Engine program parameters.
'               Create and test custom walking gaits.
'   Author..... CrustCrawler Inc. (Mike Gebhard)
'   E-mail..... support@crustcrawler.com
'   Started.... 20 August 2004
'   Updated.... 27 December 2004
'   Version.... 1.2
'
'   Hardware
'   (1) QuadCrawler Robotic Kit
'   (1) Parallax BOE
'   (1) Parallax Basic Stamp II
'   (1) Parallax PSC
'
' QuadWalking_Engine_Base_program.BS2 allows you to FULLY
' control leg joint parameters like speed, rotation, and sequence
' programmatically .  This control allows you to create and
' test custom walking gaits.
'
'=========================================================================
' Getting Started
'=========================================================================
' 1. Change the default leg centers in this program with the legs
'    centers found in TuneQuad.BS2.
'    http://www.crustcrawler.com/downloads/code.php?id=20
'
' Find the section of code below
'-----[ Horizontal Leg Constants ]----------------------------------------
' Center1         CON     750     ' Leg1 horizontal servo
' Center2         CON     750     ' Leg2 horizontal servo
' Center3         CON     750     ' Leg3 horizontal servo
' Center4         CON     750     ' Leg4 horizontal servo
'
' Replace these constants with the constants
' you found using the TuneQuad.bs2 program.
'
' Example QuadCrawler center constants (yours will vary)
'-----[ Horizontal Leg Constants ]----------------------------------------
'Center1         CON     725
'Center2         CON     800
'Center3         CON     785
'Center4         CON     750
'
'=========================================================================
' Program Operation Overview
'=========================================================================
' This program is broken into 3 sections
' Variables and Constants
' EEPROM Data
' Walking engine
'
' Variables and Constants:
' All constants and variable that control joint position and speed are
' adjustable.
' Stride is the distance +/- a horizontal servo moves from center.
' Therefore, a stride of 150 is 150 + center and 150 - center for a
' total of 300 units or about 60 degrees.
' Delay gives the servo time to reach a position.  Delay is expressed
' as a ratio of stride (stride/5).
' leftRamp and rightRamp control left side and right side servo speeds.
' LiftRamp controls vertical servo speed.
' ptrEEPROM pointer to EEPROM.
'
' EEPROM Data
' EEPROM data is written in four 49 byte blocks; Forward, Back,
' LTurn, and RTurn.  Each block of EEPROM data is broken into 3
' byte sections; servo address, LOWBYTE of servo position, and
' HIGHBYTE of servo position.  EEPORM data is READ 3 bytes at a time
' until an $FF (end of data 49th byte) is found.
'
' Walking Engine:
' This is the work horse of all QuadCrawler programs. This sub routine
' determines if the servo address (read from EEPROM) is a vertical servo,
' left horizontal servo, or right horizontal servo.  Speed (Ramp) is
' assigned depending on servo address. Servo address, Servo postion,
' and ramp are passed to the Write_PSC sub routine. Write_PSC writes
' this data to the PSC.
'
'=========================================================================
' Sub Routines
'=========================================================================
' ptrEEPROM is a pointer to EEPROM addresses. Assigning
' ptrEEPROM to "Forward" (ptrEEPROM = Forawrd) places
' the pointer at the starting EEPROM address for
' forward motion.
'
' rightRamp and leftRamp control servo speeds (ramp) on
' the left or right side of the QuadCrawler.
' Slowing the servos on one side of the robot causes
' the QuadCralwer to make gradual turns.
'
' Walking_Engine:
' The "Walking_Engine" sub routine initializes ptrEEPROM to point to a
' block of EEPROM data.  3 byte values are read and stored
' in servoAddr, HIGHBYTE.servoPosition, and LOWBYTE.servoPosition
' variables. Walking_Engine first evaluates the value in servoAddr.
'
' Walking_Engine loops through the EEPROM data until an $FF is found.
' An $FF indicates the end of an EEPROM data block. ptrEEPROM is reset
' and the process repeats.
'
' If servoAddr is an odd number a vertical servo is addressed. Vertical
' servo are assigned a very fast ramp value to lift and lower legs
' quickly.
'
' If servoAddr is even Walking_Engine assigns ramp values (speed)
' depending on leg location, left or right side of the robot. Slowing
' leg speed on one side of the robot cause the robot to make gradual turn
' toward the slow side.
'
' Walking_Engine then passes, ptrEEPROM, servoAddr, and servoPosition
' variables to the Write_PSC sub routine.
'
' Write_PSC:
' The "Write_PSC" sub routine writes servoAddr, ramp, and servoPosition
' to the PSC.  ptrEEPROM is incremented to point to the next 3 bytes of
' EEPROM data. The three bytes of EEPROM data are read into servoAddr,
' HIGHBYTE.servoPosition, and LOWBYTE.servoPosition.  Control is returned
' to Walking_Engine.
'
'=========================================================================
' Walk Forward Diagram
'=========================================================================
'
'      **Right Side**        |
'                            |
' F    \          /          |        /      \
' O    _\_      _/_          |      _/_      _\_
' R   / 1 \____/ 2 |         |     / 1 \____/ 2 |
' W  |             |         |    |             |
' A  |     ____    |         |    |     ____    |
' R   \_3_/    \_4_|         |     \_3_/    \_4_|
' D     \        /           |       /        \
'        \      /            |      /          \
'
' If you are really adventurous you can change
' or add EEPROM data and create virtually any walking
' sequence you can imagine.
'-------------------------------------------------------------------------
' -----[ I/O Definitions ]------------------------------------------------
PSC             PIN     15                    ' PSC module
#IF ($stamp = BS2SX) OR ($stamp = BS2P) #THEN
  Baud          CON     1021                  ' 2400 baud
#ELSE
  baud          CON     33164                 ' 2400 baud
#ENDIF

'---- [Walking Variables] ------------------------------------------------
servoAddr       VAR     Byte                  ' Servo addresses
ptrEEPROM       VAR     Word                  ' Gait select
servoPosition   VAR     Word                  ' Servo Position
ramp            VAR     Byte                  ' Ramp used in SEROUT
rightRamp       VAR     Byte                  ' Right side ramp values
leftRamp        VAR     Byte                  ' Left side ramp values

'----- [Adjustable Ramp Values] ------------------------------------------
LiftRamp        CON     $1                    ' Vertical servo ramp

'-----[ Horizontal Leg Constants ]----------------------------------------
'Default Servo center
Center1         CON     750                   ' Leg1 horizontal servo
Center2         CON     750                   ' Leg2 horizontal servo
Center3         CON     750                   ' Leg3 horizontal servo
Center4         CON     750                   ' Leg4 horizontal servo

'-----[ Stride Calculations ]---------------------------------------------
Stride          CON     150                   ' Stride units
Delay           CON     Stride/5              ' Delay as a ratio of Stride

Leg1Center      CON     Center1
Leg1Forward     CON     Center1+Stride        ' Stride + Leg1 Center
Leg1Back        CON     Center1-Stride        ' Stride - Leg1 Center

Leg2Center      CON     Center2
Leg2Forward     CON     Center2+Stride
Leg2Back        CON     Center2-Stride

Leg3Center      CON     Center3
Leg3Forward     CON     Center3-Stride
Leg3Back        CON     Center3+Stride

Leg4Center      CON     Center4
Leg4Forward     CON     Center4-Stride
Leg4Back        CON     Center4+Stride

'----- [Adjustable vertical servo positions] -----------------------------
RaiseRight      CON     300                   ' Raised and lowered
LowerRight      CON     1200                  ' vertical servo values
RaiseLeft       CON     1200
LowerLeft       CON     300

'---- [Byte Servo Address and Word Position EEPROM data] -----------------
' Walk Forward
Forward DATA $01,Word RaiseRight,         $07,Word RaiseLeft,
             $00,Word Leg1Forward,        $02,Word Leg2Back,
             $04,Word Leg3Center,         $06,Word Leg4Center,
             $01,Word LowerRight,         $07,Word LowerLeft,
             $03,Word RaiseRight,         $05,Word RaiseLeft,
             $00,Word Leg1Center,         $02,Word Leg2Center,
             $04,Word Leg3Forward,        $06,Word Leg4Back,
             $03,Word LowerRight,         $05,Word LowerLeft,
             $FF ' end of forward

' Walk Backward
Back    DATA $01,Word RaiseRight,         $07,Word RaiseLeft,
             $00,Word Leg1Center,         $02,Word Leg2Center,
             $04,Word Leg3Forward,        $06,Word Leg4Back,
             $01,Word LowerRight,         $07,Word LowerLeft,
             $03,Word RaiseRight,         $05,Word RaiseLeft,
             $00,Word Leg1Forward,        $02,Word Leg2Back,
             $04,Word Leg3Center,         $06,Word Leg4Center,
             $03,Word LowerRight,         $05,Word LowerLeft,
             $FF 'end of back

' Left Turn EEPROM values
LTurn   DATA $01,Word RaiseRight,         $07,Word RaiseLeft,
             $00,Word Leg1Forward+Stride, $06,Word Leg4Back+Stride,
             $04,Word Leg3Forward,        $02,Word Leg2Back,
             $01,Word LowerRight,         $07,Word LowerLeft,
             $03,Word RaiseRight,         $05,Word RaiseLeft,
             $00,Word Leg1Center+Stride,  $06,Word Leg4Center+Stride,
             $04,Word Leg3Forward,        $02,Word Leg2Back,
             $03,Word LowerRight,         $05,Word LowerLeft,
             $FF ' end of left turn

' Right turn EEPROM Values
RTurn   DATA $01,Word RaiseRight,         $07,Word RaiseLeft,
             $00,Word Leg1Forward,        $02,Word Leg2Center-Stride,
             $04,Word Leg3Center-Stride,  $06,Word Leg4Back,
             $01,Word LowerRight,         $07,Word LowerLeft,
             $03,Word RaiseRight,         $05,Word RaiseLeft,
             $00,Word Leg1Forward,        $02,Word Leg2Back-Stride,
             $04,Word Leg3Forward-Stride, $06,Word Leg4Back,
             $03,Word LowerRight,         $05,Word LowerLeft,
             $FF  ' end of right turn
'---- [End EEPROM Data] --------------------------------------------------

'-----[ Main Walking Routine ]--------------------------------------------
' To change gaits comment the line
' ptrEEPROM = Forward and remove
' the comment from another line
Walking_Engine:
  ptrEEPROM = Forward
  'ptrEEPROM = Back
  'ptrEEPROM = LTurn
  'ptrEEPROM = RTurn
  rightRamp = $8
  leftRamp = $8
  READ ptrEEPROM,ServoAddr,servoPosition.LOWBYTE,servoPosition.HIGHBYTE
  DO WHILE servoAddr <> $FF
    IF (servoAddr // 2) = 1 THEN
      ramp = LiftRamp
    ELSE
      IF (servoAddr = $00) OR (servoAddr = $02) THEN
        ramp = rightRamp
      ENDIF
      IF(servoAddr = $04) OR (servoAddr = $06) THEN
        Ramp = leftRamp
      ENDIF
    ENDIF
    GOSUB Write_PSC
  LOOP
GOTO Walking_Engine

'----- [Write to the PSC] ------------------------------------------------
Write_PSC:
  SEROUT PSC,Baud,["!SC",ServoAddr,Ramp,servoPosition.LOWBYTE,
         servoPosition.HIGHBYTE, CR]
  ptrEEPROM = ptrEEPROM + 3
  READ ptrEEPROM,ServoAddr,servoPosition.LOWBYTE,servoPosition.HIGHBYTE
  PAUSE delay
RETURN

'=====[ Updates ]=========================================================
' Updates:
' 1. Updated EEPROM table for more aggressive
'    Stride
' 2. Programmatic horizontal leg adjustment
'=========================================================================

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91国产丝袜在线播放| 久草精品在线观看| 在线亚洲精品福利网址导航| 一区免费观看视频| 99在线视频精品| 亚洲免费伊人电影| 色悠悠亚洲一区二区| 亚洲专区一二三| 91麻豆精品国产91久久久使用方法 | 色综合久久久久综合体| 亚洲欧洲av在线| 欧美主播一区二区三区| 香蕉加勒比综合久久 | 宅男在线国产精品| 国产精品香蕉一区二区三区| 亚洲国产高清在线观看视频| 国产乱对白刺激视频不卡| 国产精品情趣视频| 91亚洲国产成人精品一区二区三| 亚洲精品美腿丝袜| 日韩一区和二区| 国产黑丝在线一区二区三区| 成人免费一区二区三区在线观看| 91久久精品日日躁夜夜躁欧美| 婷婷国产在线综合| 久久免费看少妇高潮| av网站一区二区三区| 日本一不卡视频| 国产精品传媒入口麻豆| 欧美日韩午夜影院| 国产高清精品久久久久| 五月综合激情日本mⅴ| 日韩欧美中文一区| 色婷婷一区二区三区四区| 精品一二三四区| 欧美精品一区二区三区四区| 色一情一乱一乱一91av| 免费成人结看片| 中文字幕乱码久久午夜不卡| 精品视频一区二区三区免费| 国产一区中文字幕| 日韩一区精品视频| 亚洲欧美一区二区三区久本道91| 日韩三级中文字幕| 91豆麻精品91久久久久久| 韩日精品视频一区| 午夜欧美一区二区三区在线播放| 欧美经典三级视频一区二区三区| 欧美色视频一区| 99国产一区二区三精品乱码| 激情图片小说一区| 日本视频一区二区| 亚洲制服丝袜一区| 亚洲精品中文字幕乱码三区| 久久亚洲欧美国产精品乐播| 欧美精品免费视频| 欧美日韩视频在线第一区 | 欧美三级日本三级少妇99| 成人动漫在线一区| 国产ts人妖一区二区| 日韩国产欧美三级| 亚洲国产综合人成综合网站| 亚洲色图在线视频| 中文字幕一区二区日韩精品绯色| 精品99999| 欧美本精品男人aⅴ天堂| 91麻豆精品国产无毒不卡在线观看 | 99久久99久久精品免费看蜜桃| 麻豆免费精品视频| 奇米色777欧美一区二区| 亚洲风情在线资源站| 亚洲图片自拍偷拍| 亚洲妇女屁股眼交7| 亚洲狠狠爱一区二区三区| 亚洲制服丝袜av| 亚洲国产成人91porn| 洋洋av久久久久久久一区| 亚洲黄色尤物视频| 一区二区三区日韩在线观看| 亚洲欧美日韩在线| 夜色激情一区二区| 亚瑟在线精品视频| 日韩激情av在线| 麻豆91在线观看| 美日韩黄色大片| 国模套图日韩精品一区二区| 国产一区二区三区| 风间由美一区二区三区在线观看 | 国产一区视频在线看| 激情综合色播五月| 国产一区二区伦理片| 粉嫩av亚洲一区二区图片| av电影在线不卡| 欧美性做爰猛烈叫床潮| 337p亚洲精品色噜噜噜| 日韩欧美在线网站| 欧美激情一区二区三区蜜桃视频 | 国产精品亚洲午夜一区二区三区| 国产一区二区成人久久免费影院 | 亚洲欧美激情一区二区| 一级特黄大欧美久久久| 免费成人小视频| 成人国产在线观看| 欧美亚一区二区| 2024国产精品视频| 亚洲欧美色图小说| 麻豆精品一区二区三区| 国产99一区视频免费| 欧美色欧美亚洲另类二区| 精品国产污网站| 日韩毛片视频在线看| 爽爽淫人综合网网站| 成熟亚洲日本毛茸茸凸凹| 欧美伊人久久久久久久久影院| 日韩一区二区中文字幕| 中文字幕一区二区视频| 午夜电影一区二区| 国产成人在线免费观看| 欧美三级日韩在线| 国产日韩欧美麻豆| 视频在线在亚洲| 成人性色生活片| 91精品一区二区三区在线观看| 亚洲国产精品二十页| 午夜国产不卡在线观看视频| 国产成人综合网| 宅男在线国产精品| 亚洲欧美日韩久久精品| 免费观看91视频大全| 色综合天天综合在线视频| 精品裸体舞一区二区三区| 一区二区三区在线观看国产| 韩国精品主播一区二区在线观看| 欧美午夜精品一区二区三区| 国产亚洲美州欧州综合国| 午夜精品一区二区三区三上悠亚 | 99久久精品一区二区| 精品少妇一区二区三区在线播放 | 国产精品久久久久婷婷二区次| 欧美bbbbb| 欧洲精品视频在线观看| 国产精品丝袜黑色高跟| 狠狠色伊人亚洲综合成人| 欧美日韩国产美| 亚洲美女免费视频| 成人黄动漫网站免费app| 欧美tickling挠脚心丨vk| 丝袜美腿高跟呻吟高潮一区| 色综合一个色综合| 亚洲欧美怡红院| 国产成人一区在线| 久久五月婷婷丁香社区| 免费的成人av| 91精品国产全国免费观看| 亚洲综合色自拍一区| 99久久精品一区二区| 国产精品蜜臀在线观看| 国产精品资源在线观看| www国产亚洲精品久久麻豆| 久久99精品国产91久久来源| 欧美人伦禁忌dvd放荡欲情| 一区二区三区在线播| 91久久人澡人人添人人爽欧美 | 本田岬高潮一区二区三区| 国产拍欧美日韩视频二区| 国产精品一区二区不卡| 精品国产乱码久久久久久牛牛| 久热成人在线视频| 精品国内片67194| 精品午夜久久福利影院| 日韩欧美综合在线| 国产真实乱对白精彩久久| 久久日韩粉嫩一区二区三区 | 亚洲国产精品99久久久久久久久| 国产精品羞羞答答xxdd| 亚洲国产成人私人影院tom| 成人高清免费在线播放| 中文字幕一区视频| 在线观看日韩国产| 亚洲电影中文字幕在线观看| 在线不卡中文字幕播放| 精品一区二区三区视频在线观看| 日韩欧美国产麻豆| 国产精品一线二线三线| 国产精品美女久久久久aⅴ| 91一区二区三区在线播放| 亚洲精品免费在线| 在线播放日韩导航| 国产一区二区电影| 成人欧美一区二区三区小说| 在线观看日韩av先锋影音电影院| 午夜精品福利久久久| 精品对白一区国产伦| 国产成人99久久亚洲综合精品| 综合久久久久久久| 欧美日韩高清一区二区| 精品在线你懂的| 亚洲色欲色欲www| 欧美一卡二卡在线观看| 国产成人免费视|