查看“Lazy Donkey”的源代码
←
Lazy Donkey
跳转至:
导航
、
搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{Language| Lazy Donkey}} {| style="width: 800px;" |- | ==Overview== Mr. donkey will have a rest when he has time, beat the desktop, it will obediently work. [[File: _304_DozingDonkey-stater.jpg|600px|center]] ==Schematic== Use shock sensor detects the beat, and then let the motor run some distance the donkey forward. User can set the speed and duration time of donkey running. [[File: _304_DozingDonkey-sch-E.jpg|600px|center]] ==Equipment== {|class="wikitable" |- |Module|| Number||Function |- |[[Microduino-CoreUSB/zh]]||1||Core board |- |[[Microduino-Sensorhub/zh]]||1||sensor hub |- | [[Microduino-Shack/zh]]||1||Shack sensor |- | [[Microduino-Robot/zh]]||1||robot module |- | [[Microduino-Motor/zh]]||1||DC motor module |- | [[Motor]]||1||motor |} [[File: _304_DozingDonkey-module-E.jpg|600px|center]] ==Preparation== *Setup 1:Connect the CoreUSB module to your computer and then start the Arduino IDE [[Image:CoreUSB_Ble_pc.jpg|600px|center]] *Setup 2:Select Files > Examples > mCookie > _304_DozingDonkey [[File: _304_DozingDonkey_load.jpg|600px|center]] * Setup 3:Click upload to upload the program. When "Done Uploading" appears, the program should have successfully been uploaded into the CoreUSB. [[File: _304_DozingDonkey _load-ok.jpg|600px|center]] ==Program description== *Control pin definitions explained. <source lang="cpp"> #define motor_pinB 6 //Motor 1 #define motor_pinA 8 //Motor 1 //#define servo_pinB 5 //Motor 2 //#define servo_pinA 7 //Motor 2 const int vibrationPin = 10; // Shack sensor </source> *Locate the following code, where 255 is the maximum value of the motor speed, you can adjust to any value from 0 to 255 (recommended value not less than 60, or may be triggering Movies sensor stability). *Delay can be controlled motor running time, preset to 1000 ms, that one second, you can modify it as needed. <source lang="cpp"> void fullForward() { //digitalWrite(motor_pinB, HIGH); analogWrite(motor_pinB,255);//0-255 digitalWrite(motor_pinA, LOW); delay(1000); } </source> ==Hardware Buildup== *Setup 1:Using the below diagram as reference, connect the sensors into the corresponding ports on the Hub module. [[File: _304_DozingDonkey _hub.jpg|600px|center]] *Setup 2:Connect the motor to the Motor module as shown above. [[File: _304_DozingDonkey _Motor.jpg|600px|center]] *Setup 3:According to your project needs, you can attach the motor accessories for attachment to other devices. [[File: _304_DozingDonkey _Motor1.jpg|400px|center]] *Setup 4:Connect the activated Battery module to your Battery Management module. [[File:CoreUSB_Ble_steup2.jpg|600px|center]] *Setup 5:Stack all the modules together in any order you like. Congratulations, you have finished building the circuit! [[File: _304_DozingDonkey _steup-ok-E.jpg|600px|center]] ==Result== Tapping the table, shock sensor detects vibrations, the donkey moves forward 1 second. [[File: _304_DozingDonkey _lego-ok.jpg|600px|center]] ==Video== |}
该页面使用的模板:
模板:Language
(
查看源代码
)
模板:Nmbox
(
查看源代码
)
返回至
Lazy Donkey
。
导航菜单
个人工具
创建账户
登录
名字空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
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
帮助
常见问题
帮助
工具
链入页面
相关更改
特殊页面
页面信息