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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? quad_led_button_rc.bs2

?? 該程序是一個(gè)描述四角鐵甲蟲機(jī)器人調(diào)試過程的程序
?? BS2
?? 第 1 頁 / 共 2 頁
字號(hào):
'------- [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

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产91洋老外米糕| 国产一区二区三区在线观看精品| 亚洲激情综合网| 亚洲免费在线视频| 玉足女爽爽91| 一区二区三区色| 亚洲一线二线三线视频| 亚洲一区二区在线免费看| 一区二区三区免费看视频| 一区二区三区在线观看网站| 一区二区三区加勒比av| 亚洲成人三级小说| 麻豆久久久久久久| 国产精品一卡二卡| 97se狠狠狠综合亚洲狠狠| 91福利国产精品| 91精品国产一区二区三区| 日韩网站在线看片你懂的| 久久欧美中文字幕| 国产精品麻豆99久久久久久| 亚洲视频一区二区免费在线观看| 亚洲一区视频在线| 免费观看成人鲁鲁鲁鲁鲁视频| 国内不卡的二区三区中文字幕| 成人av小说网| 欧美中文字幕一二三区视频| 欧美一区在线视频| 欧美国产一区二区在线观看| 亚洲色图制服丝袜| 日本免费新一区视频| 国产精品99久久久| 欧洲视频一区二区| 精品剧情v国产在线观看在线| 国产精品免费观看视频| 亚洲一区在线观看网站| 老司机免费视频一区二区三区| 国产91精品露脸国语对白| 欧美性受极品xxxx喷水| 亚洲精品在线免费播放| 亚洲精品日韩一| 久久精品久久精品| 91丨国产丨九色丨pron| 51午夜精品国产| 国产丝袜美腿一区二区三区| 亚洲成人免费影院| 成人免费视频国产在线观看| 欧美精品777| 中文字幕国产一区二区| 亚洲va天堂va国产va久| 成人a区在线观看| 欧美一级理论片| 成人免费在线播放视频| 老司机精品视频一区二区三区| 99精品国产91久久久久久| 欧美一二三区在线观看| 亚洲欧美日韩小说| 黄一区二区三区| 欧美日韩中文字幕一区二区| 国产欧美一区二区精品性色超碰| 亚洲国产精品一区二区www| 成人综合激情网| 日韩一区和二区| 亚洲高清在线精品| 成人免费看视频| 精品国产在天天线2019| 午夜精品久久久久| 色狠狠一区二区三区香蕉| 久久久久久电影| 另类成人小视频在线| 欧美私模裸体表演在线观看| 国产精品不卡一区| 国产成人一级电影| 日韩免费高清电影| 日韩在线一区二区| 日本韩国欧美三级| 亚洲天堂免费看| av影院午夜一区| 国产91精品一区二区麻豆网站 | 91麻豆国产福利在线观看| www国产精品av| 久久精品噜噜噜成人88aⅴ| 欧美日本国产视频| 亚洲五码中文字幕| 色猫猫国产区一区二在线视频| 国产精品高潮久久久久无| 国产一区二区精品久久| 日韩美女一区二区三区四区| 婷婷久久综合九色综合绿巨人| 成人动漫视频在线| 国产欧美日韩综合精品一区二区| 麻豆精品一区二区| 日韩一卡二卡三卡国产欧美| 午夜视频在线观看一区| 欧美日韩视频在线一区二区| 亚洲一区二区黄色| 欧美中文字幕一二三区视频| 亚洲最大的成人av| 在线免费精品视频| 亚洲午夜在线视频| 欧美日韩一区成人| 日本最新不卡在线| 91精品国产入口| 日本欧美久久久久免费播放网| 欧美日韩免费一区二区三区| 亚洲成av人在线观看| 欧美色视频一区| 五月婷婷综合网| 欧美日韩精品三区| 男人的j进女人的j一区| 欧美大片免费久久精品三p| 久久99精品国产麻豆婷婷| 精品国产免费久久| 国产成人在线视频免费播放| 国产精品视频一二三区| 白白色 亚洲乱淫| 亚洲视频一区二区在线| 欧美色图12p| 日韩国产欧美在线视频| 精品日韩一区二区| 国产精品正在播放| 亚洲色图清纯唯美| 欧美色窝79yyyycom| 亚洲123区在线观看| 欧美成人午夜电影| 懂色av一区二区三区免费看| 18欧美乱大交hd1984| 在线观看欧美精品| 精品制服美女久久| 国产精品免费aⅴ片在线观看| 91麻豆精品在线观看| 午夜精品福利一区二区蜜股av| 91麻豆精品91久久久久久清纯| 精品一区二区三区在线视频| 国产免费成人在线视频| 91国产免费观看| 麻豆一区二区99久久久久| 国产女主播一区| 欧美色男人天堂| 久久国产精品免费| 国产精品国产三级国产有无不卡| 欧洲亚洲精品在线| 国产一区二区视频在线| 亚洲女人****多毛耸耸8| 欧美一级在线观看| 成人app在线观看| 国产乱子伦视频一区二区三区| 亚洲欧美区自拍先锋| 日韩天堂在线观看| 99久久精品免费| 日韩avvvv在线播放| 国产精品美女一区二区三区| 欧美精品丝袜久久久中文字幕| 国产成人一区二区精品非洲| 午夜成人免费视频| 国产精品国产精品国产专区不蜜| 91精品国产综合久久精品麻豆| 高清久久久久久| 视频一区在线播放| 中文字幕制服丝袜成人av| 欧美一级久久久久久久大片| 91看片淫黄大片一级在线观看| 理论片日本一区| 夜夜精品浪潮av一区二区三区| 精品999在线播放| 欧美日本韩国一区二区三区视频| 成人av影院在线| 极品少妇一区二区| 亚洲va欧美va人人爽| 中文字幕制服丝袜一区二区三区| 精品国内二区三区| 欧美日韩电影在线| 色呦呦国产精品| 国产成人免费av在线| 青青草国产成人av片免费| 亚洲男人的天堂av| 中文字幕国产一区二区| 日韩无一区二区| 欧美乱妇20p| 9l国产精品久久久久麻豆| 狠狠色狠狠色综合系列| 丝袜美腿亚洲综合| 一区二区三区不卡视频在线观看| 欧美激情一区三区| 精品欧美一区二区三区精品久久| 欧美日韩精品欧美日韩精品一综合| 91丨九色丨蝌蚪丨老版| 不卡的av在线播放| 国产精品夜夜爽| 国内欧美视频一区二区| 日本亚洲三级在线| 亚洲3atv精品一区二区三区| 亚洲影院在线观看| 一区二区三区中文字幕精品精品 | 国产中文一区二区三区| 美女免费视频一区二区| 日本在线播放一区二区三区| 亚洲国产综合91精品麻豆| 一区二区三区高清| 一区二区三区在线免费视频| 亚洲欧洲制服丝袜|