| công cụ tìm kiếm bảng dữ liệu linh kiện điện tử |
|
DFR0604 bảng dữ liệu(PDF) 8 Page - DFROBOT |
|
|
|||||||||||||||||||||||||||||
DFR0604 bảng dữ liệu(HTML) 8 Page - DFROBOT |
|
8 / 13 page ![]() servo = Servo(board) if __name__ == "__main__": # Board begin and check the board's status while board.begin() != board.STA_OK: print("Error") time.sleep(1) print("Board begin success.") servo.begin() # servo control begin while True: print("part of servos move to 0°") servo.move(0, 0) # PWM0 ''' servo.move(1, 0) # PWM1 servo.move(2, 0) # PWM2 servo.move(3, 0) # PWM3 ''' print("part of servos move to 180°") servo.move(0, 0) # PWM0 ''' servo.move(1, 0) # PWM1 servo.move(2, 0) # PWM2 servo.move(3, 0) # PWM3 ''' print("All servos move between 0°~180°") for i in range(0, 181): servo.move(board.ALL, i) time.sleep(0.008) time.sleep(0.002) for i in range(0, 181): i = 181 - i servo.move(board.ALL, i) time.sleep(0.008) time.sleep(0.002) In the function servo.move() of the example, the first parameter is the PWM pin of the expansion board, the second one is rotation degree. The PWM selection list is shown below: PWM Pin of IO expansion board Value of the first parameter 0 0 1 1 |
|
|
Link URL |
| Cho đến nay ALLDATASHEET có giúp ích cho doanh nghiệp của bạn hay không? [ DONATE ] |
Alldatasheet là | Quảng cáo | Liên lạc với chúng tôi | Chính sách bảo mật | Liên kết đến bảng dữ liệu | Trao đổi link | Tìm kiếm theo nhà sản xuất All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |