1 / 18

機器人控制

機器人控制. 林寬 楊智宏. VB.net. 固定位置程式. Public Class Form1 Dim po1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click po1 = New Point(8, 9) Label1.Location = po1 End Sub End Class. 可動位置. Public Class Form1

mrinal
Download Presentation

機器人控制

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 機器人控制 林寬 楊智宏

  2. VB.net

  3. 固定位置程式 • Public Class Form1 • Dim po1 • Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click • po1 = New Point(8, 9) • Label1.Location = po1 • End Sub • End Class

  4. 可動位置 • Public Class Form1 • Dim po1 As Point • Dim x, y As Integer • Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click • po1 = New Point(x, y) • X = X + 10 • Label1.Location = po1 • End Sub • End Class

  5. picturebox1

  6. Public Class Form1 • Dim po1 As Point • Dim po2 As Point • Dim x, y As Integer • Dim x2, y2 As Integer • Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click • po1 = New Point(x, y) • X = X + 10 • Label1.Location = po1 • End Sub • Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click • po2 = New Point(x2, y2) • x2 = x2 - 10 • PictureBox1.Location = po2 • End Sub • End Class

  7. 機器人架構 bluetooth bluetooth RS-232 RS-232 機器人 CPU 3D加速器(2G)水平 電子羅盤 編碼器 伺服馬達 馬達 Pc

  8. 3D加速器(2G)水平

  9. 電子羅盤 • 方向分辨 • 5度誤差 • 0.5度分辨

  10. 編碼器

  11. 陀螺儀 • 角速度,加速度計

  12. 超音波 • 距離偵測

  13. 直流馬達 • 加電壓就動 • 電壓大速度快 直流馬達

  14. 伺服馬達(PWM) 90度 伺服馬達(180度) 0度 90度 180度 120度 120度 0度 180度 20ms

  15. CPU控制伺服馬達 • Out 1 p1.1 • Nop • Nop • out 0 p1.1 • Nop • nop CPU 1+5V P1.0 00V P1.1 . P1.7 P2.0 P2.1 1us P2.7 1 0

  16. 馬達控制通訊協定 • 前 (ctlCommand,Length,UPSY) • 0x01,0x05,0x55,0x50,0x53,0x59,0xFF • 後 (ctlCommand,Length,DNSY) • 0x01,0x05,0x44,0x4E,0x53,0x59,0xFF • 左 (ctlCommand,Length,LT) • 0x01,0x03,0x4C,0x54,0xFF • 右 (ctlCommand,Length RT) • 0x01,0x03,0x52,0x54,0xFF

  17. 頭部控制通訊協定 • 頭( ctlCommand,Length,HD, 0x00~0x3C) • 0x03,0x04,0x48,0x44,0x5A,0xFF • 頸 ( ctlCommand,Length,NK, 0x00~0x3C) • 0x03,0x04,0x4E,0x4B,0x5A,0xFF

More Related