查看“Chameleon”的源代码
←
Chameleon
跳转至:
导航
、
搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{Language| Chameleon }} {| style="width: 800px;" |- | ==Objective== Here we adopt a color sensor to read color value from a object around you and the LED light on the sensor will turn to the corresponding color as the object. [[File: MicroduinoChameleon-t.jpg|600px|center]] ==Principle== The color sensor can read color values and then be analyzed by CoreUSB to get the light to show the corresponding color. [[File: MicroduinoChameleon-sch.jpg|600px|center]] ==Equipment== {|class="wikitable" |- |Module||Number||Function |- |[[mCookie-CoreUSB]]||1||Core board |- |[[mCookie-Hub]]||1||Sensor pin board |- |[[Microduino-Color detector]]||1||Color sensor |- |[[Microduino-Light]]||1||Light-sensitive sensor |- |[[mCookie-OLED]]||1||Display module |- | [[mCookie-BM]]||1||Battery management |} [[File: MicroduinoChameleon-module.jpg|600px|center]] ==Preparation== *Setup 1:Connect CoreUSB and PC/MAC with a USB cable, then open Arduino IDE. [[Image:CoreUSB_Ble_pc.jpg|600px|center]] *Setup 2:Click Files > Examples > mCookie > _303_BashfulChameleon, then load the program. [[File: _303_BashfulChameleon_load.jpg|600px|center]] * Setup 3:Load the code, select the right board and COM port, and download the program. When you see "Done Uploading" notice, it means program has been written into CoreUSB. [[File: _303_BashfulChameleon_load-ok.jpg|600px|center]] ==Program Description== *Control pin description <source lang="cpp"> #define PIN 6 Adafruit_NeoPixel strip = Adafruit_NeoPixel(1, PIN, NEO_GRB + NEO_KHZ800); </source> *Color matching <source lang="cpp"> redValue=map(red, 1024, 2048, 0, 255); greenValue=map(green, 1800, 2824, 0, 255); //blueValue=map(blue, 1024, 2048, 0, 255); blueValue=map(blue, 1024, 1792, 0, 255); </source> ==Hardware Buildup== *Setup 1: Connect the color sensor to IIC of Sensorhub and LED light to D6. [[file: MicroduinoChameleon2.JPG|600px|center]] LED light's connection method can refer to the picture above. Please mind the connection order, which starts from LED's IN interface to OUT. [[File:CoreUSB_Ble_steup11.jpg|600px|center]] *Setup 2: Connect the activated battery box to BM. [[File:CoreUSB_Ble_steup2.jpg|600px|center]] *Setup 3:Stack all modules together without fixed order and finish the circuit buildup. [[File: MicroduinoChameleon_steup3.jpg|600px|center]] In bad light, you can turn off LED light on the color sensor. Get the dice in the middle of the color sensor close to any object with different color and the led light will change accordingly. [[File: MicroduinoChameleon_on_light.jpg|600px|center]] Reference color: 参考颜色: [[File: MicroduinoChameleon_color.jpg|600px|center]] ==Result== You can DIY your LEGO chameleon. Just put the color sensor close the object and the color of the LED light will change to the same as the object. [[File: MicroduinoChameleon_ok_legao.jpg|600px|center]] ==Video== |}
该页面使用的模板:
模板:Language
(
查看源代码
)
模板:Nmbox
(
查看源代码
)
返回至
Chameleon
。
导航菜单
个人工具
创建账户
登录
名字空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
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
帮助
常见问题
帮助
工具
链入页面
相关更改
特殊页面
页面信息