juechafun/Untitled 21.md

65 lines
702 B
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
#领域/未知
#复盘/0 #临时/备忘 #状态/待处理
20260307-备忘-主题名-文件内容
## 一句话描述
[________]
---
```python
"""
30, 130, 140, 60
10, 130, 140, 80
30, 170, 100, 60
"""
from npython import *
step_list = [
    [30, 130, 30, 120],
    #[10, 130, 140, 80],
    #[30, 170, 100, 60]
]
def move(p, a):
    servos.write_angle(p, a)
def test(step_list):
    for i in range(1):
        for step in step_list:
            a1, a2, a3, a4 = step
            move(0, a1)
            move(1, a2)
            move(12, a3)
            move(5, a4)
            time.sleep(0.1)
test(step_list)
```