Difference between revisions of "Vibration Detection"

From Microduino Wiki
Jump to: navigation, search
(Created page with "{| style="width: 800px;" |- | =Function of the Module= *'''Please refer to: Microduino-Shake''' *As a digital input sensor, it can only detect "0" and "1", meaning "Yes" a...")
 
 
Line 4: Line 4:
 
=Function of the Module=
 
=Function of the Module=
 
*'''Please refer to: [[Microduino-Shake]]'''
 
*'''Please refer to: [[Microduino-Shake]]'''
*As a digital input sensor, it can only detect "0" and "1", meaning "Yes" and "No".  
+
*As a digital input sensor, it can only detect "0" and "1", that is "Yes" and "No".    
  
 
==Overview==
 
==Overview==
Line 47: Line 47:
 
==Debugging==
 
==Debugging==
 
*Step1:Select the right board card(Core USB 32U4) and COM port(Recognized automatically by default).  
 
*Step1:Select the right board card(Core USB 32U4) and COM port(Recognized automatically by default).  
 
 
[[File:mixly_board_COM.jpg|400px|center]]
 
[[File:mixly_board_COM.jpg|400px|center]]
 
*Step2:Open the serial monitor.  
 
*Step2:Open the serial monitor.  
 
[[File:mixly_COMXX.jpg|400px|center]]
 
[[File:mixly_COMXX.jpg|400px|center]]
*Step3:To see if the serial baud rate is the same with the pre-set one.  
+
*Step3:Check if the serial baud rate is the same with the pre-set one.  
 
[[File:mixly_COMXX_ok.jpg|400px|center]]
 
[[File:mixly_COMXX_ok.jpg|400px|center]]
 
*Step4:Observe the data, which is "0" when no vibration happens and is "1" when there is a vibration. You can also see the indicator blink when there is a vibration.   
 
*Step4:Observe the data, which is "0" when no vibration happens and is "1" when there is a vibration. You can also see the indicator blink when there is a vibration.   
 
[[File:mixly_COMXX_data—shake.jpg|400px|center]]
 
[[File:mixly_COMXX_data—shake.jpg|400px|center]]

Latest revision as of 09:41, 23 March 2016

Function of the Module

  • Please refer to: Microduino-Shake
  • As a digital input sensor, it can only detect "0" and "1", that is "Yes" and "No".

Overview

To use the Shake sensor to detect if there is vibration and print monitored data in the serial monitor.

Bill of Material

  • Module
Module Number Function
mCookie-CoreUSB 1 Core board
mCookie-Hub 1 Sensor pin board
Microduino-Shake 1 Vibration sensor
  • Other Hardware Equipment
    • One USB cable


Hardware Buildup

  • Setup 1:Connect the interface of the Shake with the digital port (10) of the Hub. Accessible Hub pins: 0,2,4,6,8,10 and 12.
  • Setup 2:Connect the CoreUSB, Hub and Shake sensor to the computer with a USB cable.

Mixly Programming

  • Step1:Since using serial monitor, we need to find "Serial Communication" from "Communication" item.
Mixly Serial.jpg
  • Step2:"Serial Communication" description.
  • Step3:The Shake sensor is an input device while the returned data is digital quantity, based on which we can find and drag out the digital input and output from "Input/Output".
  • "Digital Input" description.
  • Overall code description.

Debugging

  • Step1:Select the right board card(Core USB 32U4) and COM port(Recognized automatically by default).
Mixly board COM.jpg
  • Step2:Open the serial monitor.
Mixly COMXX.jpg
  • Step3:Check if the serial baud rate is the same with the pre-set one.
Mixly COMXX ok.jpg
  • Step4:Observe the data, which is "0" when no vibration happens and is "1" when there is a vibration. You can also see the indicator blink when there is a vibration.