Morse Code

From Microduino Wiki
Jump to: navigation, search

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