Difference between revisions of "Morse Code"

From Microduino Wiki
Jump to: navigation, search
(Created page with "{| style="width: 1000px;" |- | ==Outline== 600px|center Let’s make a Morse telegraph transmitter, with two touch buttons to control the shor...")
 
 
Line 6: Line 6:
 
[[File:anywhere_password.jpg|600px|center]]
 
[[File:anywhere_password.jpg|600px|center]]
  
Let’s make a Morse telegraph transmitter, with two touch buttons to control the short and long sound of the buzzer, and turn the LED on at the same time.  
+
Let's make a Morse telegraph transmitter, with two touch buttons to control the short and long sound of the buzzer, and turn the LED on at the same time.  
 
<br>
 
<br>
 
Suitable kits: mCookie202, mCookie302, IBC
 
Suitable kits: mCookie202, mCookie302, IBC
Line 49: Line 49:
 
==Programming==
 
==Programming==
 
===Required Program Blocks===
 
===Required Program Blocks===
*[[“ColorLED prepare”program block]]
+
*[["ColorLED prepare" program block]]
*[[“ColorLED control” program block]]
+
*[["ColorLED control" program block]]
*[[“Waiting” program block]]
+
*[["Waiting" program block]]
*[[“Touch button”program block ]]
+
*[["Touch button" program block]]
*[[“Buzzer on-melody” program block ]]
+
*[["Buzzer on-melody" program block]]
*[[“Delay” program block ]]
+
*[["Delay" program block ]]
*[[“If-do” program block]]
+
*[["If-do" program block]]
  
 
===Programming Thought===
 
===Programming Thought===
ColorLED prepare, if the touch button 4 is pressed, the LED emits red light and the buzzer emits short “di”; if the touch button 2 is pressed, the LED will emit red light and the buzzer will emit long “di”.  
+
ColorLED prepare, if the touch button 4 is pressed, the LED emits red light and the buzzer emits short "di"; if the touch button 2 is pressed, the LED will emit red light and the buzzer will emit long "di".  
 
[[File:mixly-ctrl-password.jpg|600px|center]]
 
[[File:mixly-ctrl-password.jpg|600px|center]]
  
 
===Start to Program===
 
===Start to Program===
'''ColorLED prepare, press touch button 4, and send “short” Morse code.'''
+
'''ColorLED prepare, press touch button 4, and send "short" Morse code.'''
 
<br>
 
<br>
 
ColorLED prepare: connect one LED to pin 6. If the touch button 4 is pressed, the internal program will be executed. The color LED and buzzer are activated at the same time for 0.1s. And then the color LED and buzzer go off at the same time for 0.1s. Wait for the touch button 4 to be released.  
 
ColorLED prepare: connect one LED to pin 6. If the touch button 4 is pressed, the internal program will be executed. The color LED and buzzer are activated at the same time for 0.1s. And then the color LED and buzzer go off at the same time for 0.1s. Wait for the touch button 4 to be released.  
 
[[File:mixly-ctrl-password-code.jpg|600px|center]]
 
[[File:mixly-ctrl-password-code.jpg|600px|center]]
  
'''Press the touch button 2, ans send “long” Morse code.'''
+
'''Press the touch button 2, ans send "long" Morse code.'''
 
<br>
 
<br>
 
If the touch button 2 is pressed, the internal program will be executed. The LED and the buzzer will be activated at the same time for 0.3s. Then the LED and the buzzer will go off at the same time for 0.1s. Wait for the touch button 2 to be released.  
 
If the touch button 2 is pressed, the internal program will be executed. The LED and the buzzer will be activated at the same time for 0.3s. Then the LED and the buzzer will go off at the same time for 0.1s. Wait for the touch button 2 to be released.  

Latest revision as of 02:54, 13 October 2016

Outline

Anywhere password.jpg

Let's make a Morse telegraph transmitter, with two touch buttons to control the short and long sound of the buzzer, and turn the LED on at the same time.
Suitable kits: mCookie202, mCookie302, IBC


Module Bill

Module

Module Number Function
mCookie-Core 1 Core board
Battery box 1 Program block and power supply
mCookie-Hub 1 Sensor adapter plate
Buzzer 1 Emit sound
Touch Button 2 Detect the touch
ColorLED 1 Color LED

Other Equipment

  • USB cable*1
  • Sensor cable*4
  • Sensor shell
  • Lego or other fixation structure
Anywhere password-module.jpg

Module Setup

Setup

Anywhere password-step.jpg
  • Assemble the modules and sensors:
    • Connect the color LED to pin 6/7 of Hub;
    • Connect the color LED to pin 6/7 of Hub;
    • Connect the touch buttons to pin 2/3 and 4/5 of Hub;
    • Connect the buzzer to pin 8/9 of Hub;
    • Insert one end of USB cable into the battery base, and connect the other to computer.

Programming

Required Program Blocks

Programming Thought

ColorLED prepare, if the touch button 4 is pressed, the LED emits red light and the buzzer emits short "di"; if the touch button 2 is pressed, the LED will emit red light and the buzzer will emit long "di".

Mixly-ctrl-password.jpg

Start to Program

ColorLED prepare, press touch button 4, and send "short" Morse code.
ColorLED prepare: connect one LED to pin 6. If the touch button 4 is pressed, the internal program will be executed. The color LED and buzzer are activated at the same time for 0.1s. And then the color LED and buzzer go off at the same time for 0.1s. Wait for the touch button 4 to be released.

Mixly-ctrl-password-code.jpg

Press the touch button 2, ans send "long" Morse code.
If the touch button 2 is pressed, the internal program will be executed. The LED and the buzzer will be activated at the same time for 0.3s. Then the LED and the buzzer will go off at the same time for 0.1s. Wait for the touch button 2 to be released.

Mixly-ctrl-password-code1.jpg



Test the result
After upload, press the touch button 4, and send short Morse code, then press the touch button 2, send long Morse code.

Anywhere password.jpg

Send a paragraph according to the following Morse code and the English code table, and check whether other people can encode it.

Anywhere password-send.jpg

Technical Specification

Related Cases

FAQ