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

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

?? quad_led_button_rc.bs2

?? 該程序是一個描述四角鐵甲蟲機器人調試過程的程序
?? BS2
?? 第 1 頁 / 共 2 頁
字號:
'------- [Quad_LED_Button_RC ] -------------------------------------------
'{$STAMP BS2}
'{$PBASIC 2.5}
'
'   File....... Quad_LED_Button_RC.BS2
'   Purpose.... Use EEPROM tables, LED display, two button interface
'               and a Tower Hobbies Tx/Rx to produce 15 different gaits.
'   Author..... CustCrawler Inc. (Mike Gebhard)
'   E-mail..... support@crustcrawler.com
'   Started.... 16 April 2004
'   Updated.... 28 November 2004
'   Version.... 1.1
'
'=====[ Updates ]=========================================================
' Updates:
' 1. Updated EEPROM tables.
'     a. Aggresive stride
'     b. Less servo strain
' 2. Programmatic horizontal leg adjustment
' 3. Updated comments
'
'=========================================================================
' Programmatic Adjustments
' 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 HomeQuad.bs2 program.
'
' Example Quad center constants yours will vary
'-----[ Horizontal Leg Constants ]----------------------------------------
'Center1         CON     725
'Center2         CON     800
'Center3         CON     785
'Center4         CON     750
'
'=========================================================================
' Button operation:
'=========================================================================
' Press either button during program execution to enter selection mode.
' Press the up and down buttons to select gaits.
' Press both buttons to accept selection
'
' If zero is selected the robot will center and lower it's legs
' for adjustment according to the quadCrawler assembly guide.
' Press the BOE reset button to restart.
'
'=========================================================================
' Tower Hobbies 6 channel FM Radio Control System
'=========================================================================
' RC Operation:
' Left Stick positions
'                            Up
'          ______________________________________
'         |            |            |            |
' Fast -> |   Left     |  Forward   |  Right     | <- Top
'         |------------|------------|------------|
' Slow -> |   Left     |  Forward   |  Right     | <- Top Mid
'         |------------|------------|------------|
' Spin -> |   Left     |  Stop      |  Right     | <- Center
'         |------------|------------|------------|
' Slow -> |   Left     |  Backward  |  Right     | <- Bottom Mid
'         |------------|------------|------------|
' Fast -> |   Left     |  Backward  |  Right     | <- Bottom
'         |____________|____________|____________|
'                           Down
'
' Connections:
' You will need 2 female-female servo wires to connect the receiver
' to the BOE's X5 port (see your BOE Rev B documentation).
' You might have to make your own connectors.
' Connect the receiver's Throttle to X5 Pin 12 on the BOE.
' Connect the Rudder to X5 Pin 13.
'
' The Get_Stick routine uses the PULSIN command
' to measures the pulse width on pin 12(Y)StickYPin
' and pin 13(X)StickXPin. This data is stored in
' the stickYPos and stickXPos variables respectively.
'
' Left Stick positions vs pulse readings
'             Left        Center       Right
'          ______________________________________
'         |            |            |            |
'         |  580(Y)    |  580(Y)    |  580(Y)    |
'         |  545(X)    |  765(X)    |  974(X)    | Top
'         |------------|------------|------------|
'         |  685(Y)    |  685(Y)    |  685(Y)    |
'         |  545(X)    |  765(X)    |  974(X)    | Top Mid
'         |------------|------------|------------|
'         |  545(X)    |  765(X)    |  974(X)    |
'         |  765(Y)    |  765(Y)    |  765(Y)    | Center
'         |------------|------------|------------|
'         |  545(X)    |  765(X)    |  974(X)    |
'         |  865(Y)    |  865(Y)    |  865(Y)    | Bottom Mid
'         |------------|------------|------------|
'         |  545(X)    |  765(X)    |  974(X)    |
'         |  945(Y)    |  945(Y)    |  945(Y)    | Bottom
'         |____________|____________|____________|
'
' Next, Get_Stick uses a SELECT command to evaluate
' stickYPos and assign a hex byte to the gaitCode
' variable.
' 580 to 650 = $10
' 651 TO 730 = $20
' 731 TO 800 = $00
' 801 TO 870 = $30
' 871 TO 960 = $40
'
' Lastly, Get_Stick uses another SELECT command to
' evaluate stickXPos.
' 500 TO 700 = $01
' 701 TO 820 = $00
' 821 TO 999 = $02
' The results are ORed with gaitCode.
' The value is stored in gaitCode and
' displayed using the DEBUG command.
'
' Left Stick positions vs gaitCode value
'             Left        Center       Right
'          ______________________________________
'         |            |            |            |
'         |    $11     |    $10     |   $12      | Top
'         |------------|------------|------------|
'         |    $21     |    $20     |   $22      | Top Mid
'         |------------|------------|------------|
'         |    $01     |    $00     |   $02      | Center
'         |------------|------------|------------|
'         |    $21     |    $20     |   $22      | Bottom Mid
'         |------------|------------|------------|
'         |    $31     |    $30     |   $32      | Bottom
'         |____________|____________|____________|
'
'=========================================================================
' LED vs gaitCode table
'=========================================================================
' LED   gaitCode
' (0)   $00 - Home
' (1)   $01 - Spin Left
' (2)   $02 - Spin Right
'
' LED   gaitCode                    LED  gaitCode
' (3)   $10 - Forward Fast         (6)   $20 - Forward
' (4)   $11 - Fast Forward Left    (7)   $21 - Forward Left
' (5)   $12 - Fast Forward Right   (8)   $22 - Forward Right
'
' LED   gaitCode                   LED   gaitCode
' (9)   $30 - Backward             (C)   $40 - Fast Backward
' (A)   $31 - Backward Left        (d)   $41 - Fast Backward Left
' (b)   $32 - Backward Right       (E)   $42 - Fast Backward Right
'                                  (F)   Open
'
' 7 Segement LED Display and gaitCode EEPROM data:
' The 7 Segement LED data starts at the address labeled LED.
' gaitCode information starts at the address labeled Gait.
' btnIndx is a pointer to the LED EEPROM data.
' The two sets of EEPROM data form a parallel array.  If btnIndx
' is pointing to EEPROM address 3, the segment display value
' is $3D. Making the segments variable equal to $3D causes a 3 to
' show on the LED. Then, btnIndx + Gait is the gaitCode $10 or
' walk forward.
'
' The Get_GaitCode sub routine is responsible for aligning
' the LED display to the gaitCode.
'
'---- [7 Segment LED and gaitCode EEPROM Data] -----
' Hex #     0   1   2   3   4   5   6   7   8   9   A   B   C   D   E
'LED  DATA $7E,$18,$6D,$3D,$1B,$37,$77,$1C,$7F,$1F,$5F,$73,$66,$79,$67
'Gait DATA $00,$01,$02,$10,$11,$12,$20,$21,$22,$30,$31,$32,$40,$41,$42
'
' Gait EEPROM Data:
' Gait EEPROM data is stored in 3 byte sections.
' Servo address, LOWBYTE of servo position, and
' HIGHBYTE of servo position.  Data is READ from
' EEPROM 3 bytes at a time then sent to the PSC.
' Allowing control over a single leg servo.
'
' How does it work?
' ptrEEPROM, rightRamp, and leftRamp variables
' are all you need to control the robot.
'
' 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.
'
' Sub Routines:
' Walking_Engine:
' The "Walking_Engine" sub routine READs the value stored in
' the address "ptrEEPROM" and assigns servo speed (ramp).
' Walking_Engine only READs servo addresses $00 to $0B (0-11).
' I'll explain this later.
'
' If Walking_Engine encounters an $FF it has reached the
' end of the Forward EEPROM data. Then ptrEEPROM is reset
' and the process repeats.
'
' If Walking_Engine READS an odd servo address it knows it is
' dealing with a vertical servo and assigns a very
' fast ramp value to lift a leg quickly.
'
' If the servo address is even Walking_Engine assigns ramp
' values depending on leg location, left or right
' side of the robot.
'
' Walking_Engine then passes control and the ptrEEPROM variable
' and the Write_PSC sub routine.
'
' Write_PSC:
' The "Write_PSC" sub uses "ptrEEPROM"
' to READ 3 consecutive bytes of data stored
' in EEPROM. Servo Address, LOWBYTE of servo position,
' and HIGHBYTE of servo position.  This data is
' written to the PSC with a SEROUT command.
' ptrEEPROM is updated to point to the next servo
' address in EEPROM and control is returned to
' Walking_Engine. This is why Walking_Engine only
' sees servo addresses.
'
' Adjustable values:
' [Adjustable Ramp Value section]
' Ramp is a prameter passed to the PSC with the SEROUT command.
' See your PSC instruction manual for more information.
' Ramp is the speed/time it takes for a servo
' to move to a new position.  Small values, 1-7,
' move fast while larger values, 8-15($F), move
' slow.
'
' Adjust the these values to increase/decrease
' servo speeds.  Experiment to find the values
' that work best for your robot.
'
'=========================================================================
' Walk Forward Diagram
'=========================================================================
'
'      **Right Side**        |
'                            |
' F    \          /          |        /      \
' O    _\_      _/_          |      _/_      _\_
' R   / 1 \____/ 2 |         |     / 1 \____/ 2 |
' W  |             |         |    |             |
' A  |     ____    |         |    |     ____    |
' R   \_3_/    \_4_|         |     \_3_/    \_4_|
' D     \        /           |       /        \
'        \      /            |      /          \
'
'
' 7 Segement LED Display:
'    Segment map:      .edc bafg  HEX      .edc bafg  HEX
'       (a)         0 %0111 1110  $7E   8 %0111 1111  $7F
'      -----        1 %0001 1000  $18   9 %0001 1111  $1F
' (f) |     | (b)   2 %0110 1101  $6D   A %0101 1111  $5F
'     | (g) |       3 %0011 1101  $3D   B %0111 0011  $73
'      -----        4 %0001 1011  $1B   C %0110 0110  $66
' (e) |     | (c)   5 %0011 0111  $37   D %0111 1001  $79
'     |     |       6 %0111 0111  $77   E %0110 0111  $67
'      -----        7 %0001 1100  $1C   F %0100 0111  $47 - Open
'
'-------------------------------------------------------------------------

' -----[ I/O Definitions ]------------------------------------------------
PSC             PIN     15              ' PSC module
ModeBtn         PIN     8               ' select robot mode up
StartBtn        PIN     12              ' select robot mode down
segments        VAR     OUTL            ' output on pins 0 - 7
Baud            CON     33164           ' 2400 baud
StickXPin       PIN     13              ' Left/Right(X) joystick Rx Ch4
StickYPin       PIN     12              ' Up/Down(Y) joystick Rx Ch3

'---- [Button Variables]--------------------------------------------------
btns            VAR     Nib             ' button holder
btn1            VAR     btns.BIT0       ' debounced button value
btn2            VAR     btns.BIT1       ' deboucned button value

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美成人午夜电影| 一本色道久久综合狠狠躁的推荐| 亚洲欧洲中文日韩久久av乱码| 欧美不卡视频一区| 日韩视频不卡中文| 日韩免费观看高清完整版| 欧美一区二区人人喊爽| 欧美一级一级性生活免费录像| 5566中文字幕一区二区电影| 欧美精品777| 精品999在线播放| 久久精品欧美一区二区三区不卡 | 日一区二区三区| 日韩av电影免费观看高清完整版 | 欧美一级在线视频| 精品嫩草影院久久| 国产日产欧美一区二区视频| 国产精品国产a| 又紧又大又爽精品一区二区| 日韩专区欧美专区| 国产一区二区免费视频| 成人视屏免费看| 在线欧美一区二区| 日韩一级完整毛片| 国产精品国产三级国产专播品爱网| 国产精品麻豆网站| 水蜜桃久久夜色精品一区的特点| 蜜乳av一区二区| 成人动漫一区二区| 91精品免费在线观看| 国产亚洲欧美激情| 日本成人在线一区| 成人开心网精品视频| 一本久久a久久精品亚洲| 久久久www成人免费无遮挡大片| 日韩视频国产视频| 国产精品免费视频网站| 亚洲1区2区3区4区| 成人av在线一区二区三区| 欧美日韩中文字幕精品| 中文字幕欧美三区| 偷拍与自拍一区| 成人午夜av电影| 欧美一级黄色大片| 亚洲欧美区自拍先锋| 国产一区亚洲一区| 欧美久久久影院| 亚洲婷婷综合久久一本伊一区| 麻豆成人在线观看| 91成人在线免费观看| 国产精品网曝门| 麻豆一区二区99久久久久| 国产99久久精品| 麻豆精品视频在线观看视频| 色噜噜狠狠色综合欧洲selulu| 欧美一二三在线| 亚洲影视资源网| www.亚洲色图| 国产午夜亚洲精品午夜鲁丝片| 亚洲h在线观看| 99久久精品国产观看| 久久婷婷色综合| 全部av―极品视觉盛宴亚洲| 91亚洲永久精品| 国产日韩av一区二区| 国产最新精品精品你懂的| 欧美丰满一区二区免费视频| 椎名由奈av一区二区三区| 成人免费看的视频| 欧美经典一区二区三区| 黄页视频在线91| 精品国产a毛片| 紧缚奴在线一区二区三区| 欧美成人精品3d动漫h| 强制捆绑调教一区二区| 欧美一区二区三区免费观看视频| 图片区日韩欧美亚洲| 欧美精品第1页| 日韩 欧美一区二区三区| 欧美日韩精品一区二区天天拍小说 | 91精品国产欧美一区二区| 亚洲欧美国产高清| 91福利国产精品| 天堂久久久久va久久久久| 在线播放91灌醉迷j高跟美女| 亚洲国产一区二区三区| 91精品国产麻豆国产自产在线| 三级影片在线观看欧美日韩一区二区| 欧美日韩亚洲国产综合| 日韩高清欧美激情| 精品久久久久久久人人人人传媒| 激情久久五月天| 久久久久国产一区二区三区四区 | 国产精品网友自拍| 色播五月激情综合网| 亚洲国产精品自拍| 精品国产乱码久久| 成人综合婷婷国产精品久久蜜臀| 自拍偷拍亚洲激情| 欧美一区二区三区在线电影| 久久电影国产免费久久电影| 国产欧美精品区一区二区三区| caoporm超碰国产精品| 亚洲宅男天堂在线观看无病毒| 欧美精品一二三| 国产成人99久久亚洲综合精品| 亚洲欧美福利一区二区| 欧美一区二区啪啪| 99久久免费精品| 免费精品99久久国产综合精品| 中文字幕av一区二区三区高| 欧美天堂亚洲电影院在线播放| 久久精品国产亚洲aⅴ| 中文字幕一区二区三区四区不卡| 制服丝袜中文字幕一区| 国产成人免费9x9x人网站视频| 亚洲精品少妇30p| 久久精品日韩一区二区三区| 欧美日韩视频在线一区二区| 国产成人精品三级麻豆| 亚洲v日本v欧美v久久精品| 国产日韩欧美综合一区| 欧美精品第1页| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 精品视频在线视频| 成人晚上爱看视频| 日本成人中文字幕在线视频| 亚洲蜜臀av乱码久久精品| 久久久三级国产网站| 欧美日韩国产综合一区二区| 成人av网在线| 国产精品中文有码| 天天操天天综合网| 亚洲美女在线国产| 国产精品初高中害羞小美女文| 欧美成人女星排名| 日韩一区二区在线免费观看| 在线视频国内自拍亚洲视频| 99在线精品观看| 成人中文字幕合集| 成熟亚洲日本毛茸茸凸凹| 国产综合久久久久久鬼色 | 欧美国产精品一区二区| 日韩欧美一二三区| 日韩视频一区二区三区| 欧美日韩精品三区| 在线中文字幕一区| 色婷婷综合中文久久一本| 大胆欧美人体老妇| 成人一区二区三区视频在线观看| 狠狠色丁香久久婷婷综合_中| 日本午夜精品视频在线观看| 亚洲3atv精品一区二区三区| 午夜精品一区二区三区免费视频| 亚洲综合一区二区| 亚洲国产精品久久不卡毛片| 一区二区三区四区在线| 一级做a爱片久久| 亚洲电影激情视频网站| 日本亚洲三级在线| 精品写真视频在线观看| 国产一区在线视频| 国产成人一级电影| www.久久久久久久久| 91亚洲精品一区二区乱码| 99re6这里只有精品视频在线观看| 91视频xxxx| 欧美日韩电影一区| 日韩久久免费av| 亚洲国产精品成人综合色在线婷婷 | 专区另类欧美日韩| 夜夜嗨av一区二区三区中文字幕 | 精品国产污污免费网站入口 | 91麻豆国产精品久久| 91老司机福利 在线| 欧美三级电影一区| 日韩一级成人av| 国产精品美女久久久久aⅴ | 久久午夜羞羞影院免费观看| 日本一区二区免费在线观看视频 | 处破女av一区二区| 在线免费av一区| www激情久久| 亚洲精品视频在线观看网站| 青青草精品视频| 成人妖精视频yjsp地址| 欧美性猛片xxxx免费看久爱| 日韩欧美电影一区| 亚洲欧美国产高清| 精品一区二区三区不卡| 一本到一区二区三区| 日韩一区二区电影网| 国产精品久久久久久久久快鸭| 午夜精品久久久久久久久久久| 激情欧美一区二区三区在线观看| 91视视频在线观看入口直接观看www | 日韩美一区二区三区| 亚洲另类色综合网站| 日韩精品一区国产麻豆| 国产精品12区|