Difference between revisions of "Key-press"
(→Function of the Module) |
(→Hardware Buildup) |
||
Line 32: | Line 32: | ||
*Setup 2:Connect the CoreUSB, Hub and Crash together to the computer with a USB cable. | *Setup 2:Connect the CoreUSB, Hub and Crash together to the computer with a USB cable. | ||
[[file:mCookie-Crash-pc.JPG|600px|center]] | [[file:mCookie-Crash-pc.JPG|600px|center]] | ||
+ | |||
==Mixly Programming== | ==Mixly Programming== | ||
*Step1:Open Mixly software and you'll find "Light Control" in "Executer" under the item of "Microduino". | *Step1:Open Mixly software and you'll find "Light Control" in "Executer" under the item of "Microduino". |
Revision as of 13:58, 23 March 2016
ContentsFunction of the Module
Equipment
Example 1: Long-press & Short-press FunctionOverviewTo detect the key is long pressed or short pressed, which can be distinguished by checking the returned results in the serial monitor. Hardware Buildup
Mixly Programming
DebuggingStep1:Select the right board card(Core USB 32U4) and COM port(Recognized automatically by default). Step2:Open the serial monitor. Step3:Make sure the serial baud rate is the same with the pre-set one. Step4:Short press or long press the key and you'll see "short" or "long" pressed in the serial monitor every 1s. Experiment 2: State Turnover FunctionOverviewEach time you press down a key, the status will turn over once. Like a desk lamp, when you press down, it turns on. And press one more time, it'll turn off. There're only two states. We can see the result through the serial monitor. Pressing down means "ON" (print "ON" in the serial monitor)and one more time, means "OFF"("OFF" printed in the serial monitor). Hardware Buildup
Mixly Programming
DebuggingStep1:Select the right board card(Core USB 32U4) and COM port(Recognized automatically by default). Step2:Open the serial monitor. Step3:Make sure the serial baud rate is the same with the pre-set one. Step4:Short press the key once and you'll see "ON' printed in the serial monitor. Press down again and you'll see "OFF" printed. ExtensionBy changing the serial port print to the colored lights, you can DIY a little desk lamp. |