查看“Joystick Controls Servo”的源代码
←
Joystick Controls Servo
跳转至:
导航
、
搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{Language| Joystick Control Servo}} {| style="width: 800px;" |- | ==Objective== Control servo rotation through Joystick and get correspsonding rotation of the arrow icon in Scratch. ==Principle== Read Joystick X-axis values and get servo rovolve to certain angel according to return values. ==Equipment== *'''[[Microduino-CoreUSB]]''' *'''[[Microduino-Sensorhub]]''' *'''[[Microduino-Joystick ]]''' *Servo [[File:Joystick_servo.jpg|600px|center|thumb]] ==Hardware Buildup== *Setup 1:Stack CoreUSB and Sensorhub [[File:CoreUSB_Sensorhub.jpg|600px|center|thumb]] *Setup 2:Connect Joystick to analog A0 and A1. There is pin description on two sides of Sensorhub,to which you can connect sensors correspondingly. [[File:Joystick_mCookie.jpg|600px|center|thumb]] *Setup 3:Connect servo to D8. [[File:Joystick_mCookie_servo.jpg|600px|center|thumb]] ==Software Debugging== *Setup 1:Build Scratch programming environment. **[[S4A Scratch Getting started]] *Setup 2:Start programming. Example program download: [[File: Joystick_Servo.zip]] *Setup 3:Code description—detect Joystick values for one part and the arrow icon will make correpsonding movement according to Joystick. **You need to create a variable to save Joystick data. ***Reflect variable values of 0-1023 to 0-180° and control servo through “Motor” plug-in. [[File:Joystick_mCookie_servo1.gif|600px|center|thumb]] **Rotate the arrow according to variables. (Users can change the arrow icon according to individual needs. ) [[File:Joystick_mCookie_servo2.gif|600px|center|thumb]] ==Result== By moving Joystick on X-axis, you can control servo rotation angle. ==Video== |}
该页面使用的模板:
模板:Language
(
查看源代码
)
模板:Nmbox
(
查看源代码
)
返回至
Joystick Controls Servo
。
导航菜单
个人工具
创建账户
登录
名字空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
Welcome
首页
创客大赛
大赛详情
3D打印
安装月球车
图形化编程
操控月球车
升级月球车
编程工具下载
软件下载
Arduino
Processing
Mixly
Scratch
模块套件
Microduino 102
mCookie 102
mCookie 202
mCookie 302
IBC
其他
应用套件
四轴飞行器
平衡车
小车CUBE
音乐播放器
刷卡音乐播放器
wifi气象站
彩虹音乐触摸灯
分贝检测仪
迎门汇报
LED点阵时钟
LED点阵屏幕
硬件
mCookie
Sensor
Microduino
MicroWrt
MicroNux
MicroRobot-Core
MicroRobot-CoreESP
ideaBoard
ideaBox
MicroMV
MicroAI
帮助
常见问题
帮助
工具
链入页面
相关更改
特殊页面
页面信息