Difference between revisions of "Ks0397 keyestudio EASY plug Super Starter Kit for Arduino STEM EDU"

From Keyestudio Wiki
Jump to: navigation, search
Line 1,218: Line 1,218:
 
'''Upload the Code'''
 
'''Upload the Code'''
 
Below is an example code for three LED modules experiment.
 
Below is an example code for three LED modules experiment.
<br>[[File:2.4-1.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 2.4.1.png|500px|frameless|thumb]]<br>
<br>[[File:2.4-2.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 2.4.2.png|500px|frameless|thumb]]<br>
  
  
Line 1,236: Line 1,236:
 
* Program Not Uploading?
 
* Program Not Uploading?
 
This happens sometimes, the most likely case is a confused Board and serial port, you should firstly select your proper board and port.  
 
This happens sometimes, the most likely case is a confused Board and serial port, you should firstly select your proper board and port.  
<br>[[File:2-5.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 2-5.png|500px|frameless|thumb]]<br>
  
  
Line 1,271: Line 1,271:
 
'''What You Should See'''
 
'''What You Should See'''
 
Done uploading the code to board, open the serial monitor and set the baud rate to 9600, then you can see the data is printed on the monitor, and will control LED on.  
 
Done uploading the code to board, open the serial monitor and set the baud rate to 9600, then you can see the data is printed on the monitor, and will control LED on.  
<br>[[File:3-1.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 3-1.png|500px|frameless|thumb]]<br>
<br>[[File:3-2.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 3-2.png|500px|frameless|thumb]]<br>
<br>[[File:3-3.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 3-3.png|500px|frameless|thumb]]<br>
 +
 
 +
 
 +
 
 +
===Project 4: Push Button ===
 +
'''Overview'''
 +
In this project, we’ll be looking at the one of the most common and simple inputs- a push button. It is an elegant way to control power to your project. Press once to turn on, then press again to turn off. Press to release pleasure!
 +
 
 +
'''Component Required:'''
 +
* EASY plug control board*1
 +
* EASY plug Digital Push Button *1
 +
* EASY plug LED Module *1 
 +
* RJ11 cable*1
 +
* USB cable*1 
 +
 
 +
'''Component Introduction'''
 +
[[image:ks0112图.jpg|thumb|600px|right|Keyestudio EASY plug Digital Push Button]]
 +
 
 +
The EASY Plug Push-button module is a tidy little design that lets you control a DC power source using an everyday tactile button.
 +
This basic application module is widely applied to Arduino, Raspberry Pi platforms.
 +
When the button is pressed, it outputs HIGH level signal; if release the button, it outputs LOW level signal.
 +
You can simply connect to an IO port to have your first taste of Arduino.
 +
* Supply Voltage: 3.3V to 5V
 +
* Large button and high-quality top cap
 +
* Sensor type: Digital
 +
 
 +
 
 +
'''Connect It Up'''
 +
Connect the EASY Plug push button sensor and LED module to control board using RJ11 cables.
 +
<br>[[File:按键灯.jpg|500px|frameless|thumb]]<br>
 +
 
 +
 
 +
====Example 1: Button Controlled Light====
 +
 
 +
'''Upload the Code'''
 +
Below is an example code.
 +
<br>[[File:ks0397 4.1.png|500px|frameless|thumb]]<br>
 +
 
 +
'''What You Should See'''
 +
Powered up and upload well the code, press down the button, LED module is turned on. While release the button, LED is off.
 +
<br>[[File:ks0397 4-1.png|500px|frameless|thumb]]<br>
 +
<br>[[File:ks0397 4-2.png|500px|frameless|thumb]]<br>
 +
Open the monitor, it will print out the value read from the button.
 +
<br>[[File:ks0397 4-3.png|500px|frameless|thumb]]<br>
 +
<br>[[File:ks0397 4-4.png|500px|frameless|thumb]]<br>
 +
 
 +
 
 +
====Example 2: Simulating Table Lamp====
 +
 
 +
'''Upload the Code'''
 +
Below is an example code.
 +
<br>[[File:ks0397 4.2.png|500px|frameless|thumb]]<br>
 +
 
 +
'''What You Should See'''
 +
Powered up and upload well the code, press down the button, LED light is turned on, it will not be off when release the button; But if press the button once again, LED will be turned off. It seems like your table lamp.
 +
<br>[[File:ks0397 4-5.png|500px|frameless|thumb]]<br>
 +
Open the monitor, you should be able to see how many times do you press the button.
 +
<br>[[File:ks0397 4-4.png|500px|frameless|thumb]]<br>
 +
 
 +
 
 +
===Project 5: Relay ===
 +
'''Overview'''
 +
In this project, we will show you how to control a relay module. This relay module uses a high-quality relay. A relay is basically an electrically controlled mechanical switch. It can be used to interactive projects.
 +
 
 +
 
 +
'''Component Required:'''
 +
* EASY plug control board*1
 +
* EASY plug Single Relay Module *1 
 +
* RJ11 cable*1
 +
* USB cable*1 
 +
 
 +
 
 +
'''Component Introduction:''' 
 +
[[image:ks0127图.jpg|thumb|600px|right|Keyestudio EASY plug Single Relay Module]]
 +
 
 +
This EASY Plug relay module uses a high-quality relay. A relay is basically an electrically controlled mechanical switch.
 +
It is one of the most important controlled elements, which is widely used to control the lighting, communications, remote sensing, electrical and other equipments.
 +
The Relay output state by a light-emitting diode, observing the relay ON and OFF status.
 +
It can be controlled through the digital IO port, such as lamps, motors and other high current or high voltage devices.
 +
* Type: Digital
 +
* Rated current: 10A (NO) 5A (NC)
 +
* Maximum switching voltage: 150VAC  24VDC
 +
* Digital interface
 +
* Control signal: TTL level
 +
* Rated load: 8A 150VAC (NO) 10A 24VDC (NO); 5A 250VAC (NO/NC) 5A 24VDC (NO/NC)
 +
* Maximum switching power: AC1200VA DC240W (NO); AC625VA DC120W (NC)
 +
* Contact action time: 10ms
 +
 
 +
 
 +
'''Connect It Up'''
 +
Connect the EASY Plug Single Relay module to control board using an RJ11 cable.
 +
<br>[[File:ks0127.jpg|500px|frameless|thumb]]<br>
 +
 
 +
 
 +
'''Upload the Code'''
 +
Below is an example code.
 +
<br>[[File:ks0397 5.png|500px|frameless|thumb]]<br>
 +
 
 +
 
 +
'''What You Should See'''
 +
Done uploading the code, you should be able to hear the relay contacts click. When the relay is off, the COM (common) terminal block will be connected to the NC (Normally Closed) terminal block.
 +
When the relay is on, the COM (common) terminal block will be connected to the NO (Normally Open) terminal block.
 +
<br>[[File:ks0397 5-1.png|500px|frameless|thumb]]<br>
 +
<br>[[File:ks0127 Result.jpg|500px|frameless|thumb]]<br>
 +
 
 +
 
 +
 
 +
===Project 6: Crash===
 +
'''Overview'''
 +
We use a crash sensor to detect whether happen collision or not. When an object crashes the metal switch of the sensor, it will output LOW level signal. When the switch is disconnected, it will keep HIGH level.
 +
 +
'''Component Required:'''
 +
* EASY plug control board*1
 +
* EASY plug Crash Sensor *1
 +
* EASY plug LED Module *1 
 +
* EASY plug Relay Module *1 
 +
* RJ11 cable*1
 +
* USB cable*1 
 +
 
 +
'''Component Introduction:''' 
 +
[[image:ks0111图.jpg|thumb|600px|right|Keyestudio EASY plug Crash Sensor]] 
 +
 
 +
 
 +
Crash sensor, also known as snap-action switch, is an electric switch that is actuated by very little physical force. 
 +
It is a digital on-off input module necessary for elementary electronic.
 +
By programming, it can be used for the light, sound device, key function of LCD display, 3D Printer position feedback, or other devices.
 +
* Onboard status indicator LED
 +
* M3 mounting hole, convenient for fixation on other devices.
 +
* If collision happened, outputs LOW level signal; no collision, outputs HIGH level signal.
 +
 
 +
 
 +
'''Connect It Up'''
 +
Connect the EASY Plug Crash sensor to control board using an RJ11 cable.
 +
<br>[[File:继电器碰撞.jpg|500px|frameless|thumb]]<br>
 +
 
 +
 
 +
'''Upload the Code'''
 +
Below is an example code.
 +
<br>[[File:ks0397 6.1.png|500px|frameless|thumb]]<br>
 +
 
 +
 
 +
'''What You Should See'''
 +
When an object crashes the metal switch of the sensor, the LED is turned off. If no crash happened, LED is turned on.
 +
<br>[[File:ks0397 6-3.png|500px|frameless|thumb]]<br>
 +
<br>[[File:ks0397 6-4.png|500px|frameless|thumb]]<br>
 +
 
 +
You should be able to see the value printing on the monitor.
 +
<br>[[File:ks0397 6-2.png|500px|frameless|thumb]]<br>
 +
 
 +
 
 +
====Extension Experiment: ====
 +
 
 +
'''Switch Controlling Relay'''
 +
'''Hookup Guide'''
 +
Connect the EASY Plug Crash sensor and relay module to control board using an RJ11 cable.
 +
<br>[[File:继电器碰撞.jpg|500px|frameless|thumb]]<br>
 +
 
 +
 
 +
'''Upload the Code'''
 +
Below is an example code.
 +
<br>[[File:ks0397 6.2.png|500px|frameless|thumb]]<br>
 +
 
 +
 
 +
'''What You Should See'''
 +
<br>[[File:ks0397 6-5.png|500px|frameless|thumb]]<br>
 +
If crash the limit switch, the LED on the relay module is turned on.
 +
<br>[[File:ks0397 6-6.jpg|500px|frameless|thumb]]<br>
 +
 
 +
 
 +
<span style="color: red">'''Troubleshooting:''''</span>
 +
* '''Program Not Uploading?'''
 +
This happens sometimes, the most likely case is a confused Board and serial port, you should firstly select your proper board and port.
 +
If it doesn’t, make sure you have assembled the circuit correctly and verified and uploaded the code to your board.
 +
 
 +
 
 +
===Project 7: I Feel Pressure ===
 +
'''Overview'''
 +
How to measure the outside force? Use a pressure sensor.
 +
 
 +
'''Component Required:'''
 +
* EASY plug control board*1
 +
* EASY plug thin-film pressure sensor *1
 +
* EASY plug LED Module *1
 +
* RJ11 cable*1
 +
* USB cable*1 
 +
 
 +
 
 +
'''Component Introduction:'''
 +
[[image:ks0371图.jpg|thumb|600px|right|EASY plug Thin-film Pressure Sensor]]
 +
This EASY plug pressure sensor adopts the flexible Nano pressure-sensitive material with an ultra-thin film pad.
 +
It has the functions of water-proof and pressure detection.
 +
The force sensors are ultra-thin and flexible printed circuits, which can be easily integrated into force measurement applications.
 +
 
 +
The harder you press, the lower the sensor's resistance.
 +
When the sensor detects the outside pressure, the resistance of sensor will make a change. So we can use the circuit to convert the pressure signal that senses pressure change into the corresponding electric signal output.
 +
In this way, we can know the conditions of pressure changes by detecting the signal changes.
 +
You can connect the sensor to EASY plug Control board for communication using only a RJ11 cable.
 +
* Working Voltage: DC 3.3V—5V
 +
* Range: 0-0.5KG
 +
* Thickness: <0.25mm
 +
* Response Point: <20g
 +
* Repeatability: <±5.8%(50% load)
 +
* Accuracy: ±2.5%(85% range interval)
 +
* Durability: >100 thousand times
 +
* Initial Resistance: >100MΩ (no load)
 +
* Response Time: <1ms
 +
* Recovery Time: <15ms
 +
* Working Temperature: -20℃ to 60℃
 +
 
 +
 
 +
'''Connect It Up'''
 +
Connect the EASY Plug pressure sensor to control board using an RJ11 cable.
 +
<br>[[File:KS0371.jpg|500px|frameless|thumb]]<br>
 +
 
 +
 
 +
'''Upload the Code'''
 +
<br>[[File:ks0397 7.1.png|500px|frameless|thumb]]<br>
 +
 
 +
 
 +
'''What You Should See'''
 +
<br>[[File:ks0397 7-1.png|500px|frameless|thumb]]<br>
 +
After uploading the code, open the serial monitor, and set the baud rate to 9600. When tightly press the sensor, you should see the value become larger. So the sensor works normally.
 +
<br>[[File:ks0397 7-2.png|500px|frameless|thumb]]<br>
 +
 
 +
 
 +
 
 +
====Extension Experiment ====
 +
 
 +
'''Pressure Controlling LED'''
 +
'''Hookup Guide'''
 +
Connect the EASY Plug pressure sensor and LED module to control board using RJ11 cables.
 +
<br>[[File:压力.jpg|500px|frameless|thumb]]<br>
 +
 
 +
 
 +
'''Upload the Code'''
 +
Below is an example code.
 +
<br>[[File:ks0397 7.2.png|500px|frameless|thumb]]<br>
 +
 
 +
 
 +
'''What You Should See'''
 +
After uploading the code, when tightly press the sensor with your finger, you should see the brightness of LED will change with the pressure intensity.
 +
<br>[[File:ks0397 7-3.png|500px|frameless|thumb]]<br>
 +
<br>[[File:ks0397 7-4.jpg|500px|frameless|thumb]]<br>
 +
 
 +
 
 +
 
 +
===Project 8: Magnetic Field ===
 +
'''Overview'''
 +
This project will tell you how to detect whether there is a magnetic field nearby or not ? Use a reed switch module. 
 +
 
 +
 
 +
'''Component Required:'''
 +
* EASY plug control board*1
 +
* EASY plug Reed Switch Module *1
 +
* EASY plug LED Module *1 
 +
* RJ11 cable*1
 +
* USB cable*1 
 +
 
 +
 
 +
'''Component Introduction:''' 
 +
[[image:ks0118图.jpg|thumb|600px|right|Keyestudio EASY plug Reed Switch Module]]
 +
 
 +
This is a small device called a reed switch on the module.
 +
When the device is exposed to a magnetic field, the two ferrous materials inside the switch pull together and the switch closes.
 +
When the magnetic field is removed, the reeds separate and the switch opens. This makes for a great non-contact switch.
 +
You can mount reed switch on the door for alarming purpose or as switches.
 +
* Interface: Easy plug
 +
* Working voltage: DC 3.3V-5V
 +
* Working current: ≥20mA
 +
* Working temperature: -10℃ to+50℃
 +
* Detection distance: ≤10mm
 +
 
 +
 
 +
'''Connect It Up'''
 +
Connect the EASY Plug Reed switch module and LED module to control board using RJ11 cables.
 +
<br>[[File:干簧管灯.jpg|500px|frameless|thumb]]<br>
 +
 
 +
 
 +
'''Upload the Code'''
 +
Below is an example code.
 +
<br>[[File:ks0397 8.1.png|500px|frameless|thumb]]<br>
 +
 
 +
 
 +
'''What You Should See'''
 +
If you put a magnetic bead close to the reed module, once the reed module detects the magnetic field, LED will turn on.
 +
<br>[[File:ks0397 8-1.png|500px|frameless|thumb]]<br>
 +
<br>[[File:ks0397 8-2.jpg|500px|frameless|thumb]]<br>
 +
 
 +
 
 +
 
 +
===Project 9: 4-digit LED display === 
 +
'''Overview'''
 +
When you watch a ball game, you might often see the countdown.
 +
Here comes an EASY Plug 4-digit 0.36’’ LED display! Through this project, you will learn how to control the 4-digit LED display show the time counting.
 +
 
 +
'''Component Required:'''
 +
* EASY plug control board*1
 +
* EASY plug 4-digit LED display*1
 +
* EASY plug button module*1 
 +
* RJ11 cable*1
 +
* USB cable*1   
 +
 
 +
Component Introduction: 
 +
[[image:Ks0369图.jpg|thumb|600px|right|Keyestudio EASY plug 4-Digit LED Display]]
 +
 
 +
This is a 4-digit 0.36’’ Common Anode LED display module, a 12-pin display module with score points.
 +
The driver chip used in the matrices is TM1637, using only two signal cables to make the microcontroller control the 4-digit LED display.
 +
The four pins of LED display are GND、VCC、DIO、CLK. (GND is ground, VCC is for power supply, DIO is data IO pin, CLK is clock signal pin.)
 +
The module pins are extended into Registered jack, so you can easily connect it to EASY Plug control board using a RJ11 cable.
 +
* Operating Voltage: DC5V
 +
* Operating Temperature Range: -40℃~+85℃
 +
 
 +
 
 +
Connect It Up
 +
Connect the EASY Plug 4-digit LED display module and button module to control board using RJ11 cables.
 +
<br>[[File:KS0369.jpg|600px|frameless|thumb]]<br>
 +
 
 +
 
 +
Upload the Code
 +
Below is an example code.
 +
<br>[[File:ks0397 9.1.1.png|500px|frameless|thumb]]<br>
 +
<br>[[File:ks0397 9.1.2.png|500px|frameless|thumb]]<br>
 +
 
 +
 
 +
'''What You Should See'''
 +
After uploading the code, you should see the 4-digit LED display show the number jumping.
 +
On the left side, show 555; after one second, show 0125 on the right side; after one second, show 125; then after one second, the display brightness is 1, becoming rather darker. One second later, the display brightness is 7, becoming rather brighter.
 +
After one second again, show the 12:89; then one second later, do not show the colon. After one second, the LED display is off; and one second later, start to repeat the display again.
 +
<br>[[File:ks0397 9-2.png|500px|frameless|thumb]]<br>
 +
<br>[[File:ks0397 9-3.jpg|500px|frameless|thumb]]<br>
 +
 
 +
 
 +
<span style="color: red">'''Troubleshooting:''''</span>
 +
* '''Compiling Fails ?'''
 +
This happens sometimes, the most likely case is a library file not added.  You should be sure all the libraries under the '''KS_EasyPulg''' are added to the libraries directory of Arduino-1.8.5. Shown below.
 +
<br>[[File:libraries 1.png|500px|frameless|thumb]]<br>
 +
<br>[[File:libraries 2.png|500px|frameless|thumb]]<br>
 +
<br>[[File:libraries 3.png|500px|frameless|thumb]]<br>
 +
 
 +
 
 +
* '''Program Not Uploading?'''
 +
This happens sometimes, the most likely case is a confused Board and serial port, you should firstly select your proper board and port.
 +
<br>[[File:ks0397 9-1.png|500px|frameless|thumb]]<br>
 +
 
 +
 
 +
====Extension Experiment 1:====
 +
 
 +
'''Time Counting'''
 +
'''Hookup Guide'''
 +
Connect the EASY Plug 4-digit LED display module to control board using an RJ11 cable.
 +
<br>[[File:KS0369.jpg|600px|frameless|thumb]]<br>
 +
 
 +
 
 +
'''Test Code'''
 +
Below is an example code.
 +
<br>[[File:ks0397 9.2.png|500px|frameless|thumb]]<br>
 +
 
 +
 
 +
'''What You Should See'''
 +
<br>[[File:ks0397 9-4.png|500px|frameless|thumb]]<br>
 +
 
 +
The 4-digit LED display starts to show the time counting. Seconds on the right, minutes on the left, and return to zero after 60 minutes.
 +
<br>[[File:ks0397 9-5.jpg|500px|frameless|thumb]]<br>
 +
 
 +
 
 +
====Extension Experiment 2 ====
 +
 
 +
'''Counting And Reset'''
 +
'''Hookup Guide'''
 +
Connect the EASY Plug 4-digit LED display module and button module to control board using RJ11 cables.
 +
<br>[[File:数码管.jpg|500px|frameless|thumb]]<br>
 +
 
 +
 
 +
'''Test Code'''
 +
Below is an example code.
 +
<br>[[File:ks0397 9.3.1.png|500px|frameless|thumb]]<br>
 +
<br>[[File:ks0397 9.3.2.png|500px|frameless|thumb]]<br>
 +
<br>[[File:ks0397 9.3.3.png|500px|frameless|thumb]]<br>
 +
 
 +
 
 +
'''What You Should See'''
 +
The 4-digit LED display starts to show the time counting. If press the button, it will reset the counting.
 +
 
 +
 
 +
 
 +
===Project 10: Photo Interrupter ===
 +
'''Overview'''
 +
In this project, you will learn about how to use a photo interrupter module to turn on the LED and print the analog value on the monitor.
 +
 
 +
'''Component Required:'''
 +
* EASY plug control board*1
 +
* EASY plug Photo Interrupter Module *1
 +
* EASY plug LED Module *1
 +
* EASY plug 4-digit LED Display Module *1
 +
* RJ11 cable*1
 +
* USB cable*1 
 +
 
 +
 
 +
'''Component Introduction:''' 
 +
[[image:ks0121图.jpg|thumb|600px|right|Keyestudio EASY plug Photo Interrupter Module]]
 +
This is a high performance EASY Plug photo interrupter module.
 +
It integrates a photo-interrupter, which belongs to an optical switch of a photo-interrupting photoelectric switch.
 +
 
 +
The upright part on the module combines an infrared light emitting diode and shielded infrared detector.
 +
By emitting a beam of infrared light from one end to another end, the sensor can detect an object when it passes through the beam.
 +
Useful for many applications such as optical limit switches, pellet dispensing, general object detection, etc.
 +
Note: this module needs to be used together with EASY plug control board.
 +
* Supply Voltage: 3.3V to 5V
 +
* Interface: Digital
 +
 
 +
 
 +
'''Connect It Up'''
 +
Connect the EASY Plug Photo Interrupter module and LED module to control board using RJ11 cables.

Revision as of 04:01, 15 January 2019

Keyestudio UNO R3 Board

Kit Description

The keyestudio EASY PLUG super starter kit is based on Mixly blocks coding, very easy to use and flexible. This kit includes everything you need to complete Mixly projects that will teach you how to control and read external sensors and displays, control matrix, learn Mixly Blocks programming, and much more. Although you have a few or even no electronics related knowledge, you can use this kit to realize your creative ideas as long as you want to. After using this kit you’ll have the know-how to start creating your own amazing experiments. Share your own creative works with your intimate family, friends or classmates. Let’s get started right now!


Kit List

No. Product Name Quantity Picture
1 EASY plug Control Board V2.0 1
thumb
2 EASY plug White LED Module 1
thumb
3 EASY plug Blue LED Module 1
thumb
4 EASY plug Red LED Module 1
thumb
5 EASY plug thin-film pressure sensor 1
thumb
6 EASY plug Analog Sound Sensor 1
thumb
7 EASY plug Water Level Sensor 1
thumb
8 EASY plug Potentiometer Sensor 1
thumb
9 EASY plug Analog Alcohol Sensor 1
thumb
10 EASY plug LM35 Temperature Sensor Module 1
thumb
11 EASY plug Digital Tilt Sensor Module 1
thumb
12 EASY plug Steam Sensor 1
thumb
13 EASY plug Hall Magnetic Sensor 1
thumb
14 EASY plug Crash Sensor 1
thumb
15 EASY plug Digital Push Button 1
thumb
16 EASY plug Reed Switch Module 1
thumb
17 EASY plug Line Tracking Sensor 1
thumb
18 EASY plug Photo Interrupter Module 1
thumb
19 EASY plug Single Relay Module 1
thumb
20 EASY plug ADXL345 Acceleration Module 1
thumb
21 EASY plug DHT11 Temperature and Humidity Sensor 1
thumb
22 EASY plug 8x8 LED Matrix 1
thumb
23 EASY plug 1602 LCD Module 1
thumb
24 EASY plug 4-digit LED display 1
thumb
25 20mm blue RJ11 cable 5
thumb
26 30mm blue RJ11 cable 3
thumb
27 USB cable 1
thumb


Getting Started with Mixly

Introduction for Mixly

Mixly

Mixly is a free open-source graphical Arduino programming software, based on Google’s Blockly graphical programming framework, and developed by Mixly Team@ BNU. It is a free open-source graphical programming tool for creative electronic development; a complete support ecosystem for creative e-education; a stage for maker educators to realize their dreams. Although there is an Ardublock graphical programming software launched by Arduino official, Ardublock is not perfect enough, and many common functions cannot be realized.


Interface Functions of Mixly

System Functions

Look at the main interface of Mixly, it includes five parts, that is, Blocks selection, code edit, text code (hidden), system function and message prompt area. Shown below.
3.1-1.png


Some common functions:
Through this interface, you can complete the code compile、upload、save and manage. It support four remove methods: drag it left out code window, or drag to Recycle Bin, delete key, or right-click to delete block. It supports four languages: English、Español (Spanish)、中文简体(Chinese Simplified)、中文繁体(Chinese Traditional).
3.1-2.png

In/Out Block

3.2-1.png

No. BLOCK ICON DEFINITION
1
3.2-2.png
Returns HIGH or LOW voltage
2
3.2-3.png
Write digital value to a specific Port.

Digital Output: set the HIGH or LOW output for IO pins

3
3.2-4.png
Returns a digital value of a specific Port.

Digital IO Read Pin, generally used to read the HIGH or LOW level detected by Digital sensor

4
3.2-5.png
Write analog value between 2 and 255 to a specific Port.

Analog Output: set the Analog value output by Analog IO pins (0~255).

5
3.2-6.png
Returns value between 0 and 1023 of a specific Port.

Analog IO Read Pin, generally used to read the Analog value detected by Analog sensor.

6
3.2-7.png
External Interrupts function, with three trigger interrupt modes RISING, FALLING, CHANGE.
7
3.2-8.png
Detachs interrupt to a specific Port.

Turn off the given interrupt function.

8
3.2-9.png
Set the IO pins as Output or Input state
9
3.2-10.png
Read the continuous time of HIGH or LOW pulse from IO pins.( generally used for ultrasonic ranging)
10
3.2-11.png
Read a pulse (either HIGH or LOW) on a pin within a time set in timeout.
11
3.2-12.png
Set the ShiftOut data pin, clock pin. Output the data needed from the bitOrder MSBFIRST or LSBFIRST (Most Significant Bit First, or, Least Significant Bit First).

Generally used for controlling the 74HC595 CHIP.

12
3.2-13.png
This is the function interface under Normal mode. If select Advanced mode, the functions will be more.


For example:
Connect your Arduino Uno board, then follow the steps below to light the Pin13 led on Arduino UNO.
3.2 led D13.PNG

Control Block

Control.PNG

No. BLOCK ICON DEFINITION
1
3.3-1.png
Initialization (run only once)
2
3.3-2.png
End the program, means the program will stop running when use this block.
3
3.3-3.png
Delay function, click to select ms or us

(pause the program for the amount of time (in milliseconds) specified as parameter. There are 1000 milliseconds in a second.)

4
3.3-4.png
if_do function (first evaluate a value be true or false, if a value is true, then do some statement.

You can click the blue gear icon to select the else if block or else block.)

5
3.3-5.png
switch function. You can click the blue gear icon to select the case block or default block. (used to evaluate several programs then execute the corresponding function matched with program.)
6
3.3-6.png
Equal to for statement.
7
3.3-7.png
A while loop statement.
8
3.3-8.png
break function, used to exit from the containing loop.
9
3.3-9.png
millis() function, returns the system running time since the program started.

(The unit can be ms (milliseconds) or μs(microsecond)).

10
3.3-10.png
Timer interrupt function, that is, set a trigger interrupt for the amount of time (in milliseconds) specified as parameter.
11
3.3-11.png
Timer interrupt start block
12
3.3-12.png
Timer interrupt stop block


For example:
Compile and upload the program below to your Arduino board, you should see Pin13 LED on Arduino UNO continue to flash.(with an interval of 1s, equal to 1000ms)
3.3 flash.PNG


Math Block

3.4.png

No. BLOCK ICON DEFINITION
1
3.4-1.png
A number
2
3.4-2.png
Click to select the Arithmetic Operators:

+(addition); -(subtraction); x (Multiplication); ÷(division);  %(remainder); ^(bitwise xor)

3
3.4-3.png
Click to select the & (bitwise end); l (bitwise or); << (bitshift left); >> (bitshift right)
4
3.4-4.png
Click to select the sin; cos; tan; asin; acos; atan; ln; log10; e^; 10^; ++ (increment) ;

-- (decrement)

5
3.4-5.png
Click to select the Round; Ceil; Floor; abs; sq; sqrt

Round: Returns the integer part a number using around.
Ceil: Returns the integer part a number using ceil.
Floor: Returns the integer part a number using floor.
abs: Return the absolute value of a number.
sq: Return the square of a number.
sqrt: Return the square root of a number.

6
3.4-6.png
If select the max, returns the larger number;

if select the min, returns the smaller number.

7
3.4-7.png
Initialize the random seed
8
3.4-8.png
Return a random integer between the two specified limits, inclusive.
9
3.4-9.png
Constrain a number to be between the specified limits (inclusive).

(generally used to constrain an analog value read from sensor)

10
3.4-10.png
Map a number from the first interval to the second interval.

(For instance, potentiometer-controlled servo, map the range of potentiometer (0, 1023) to the angle of servo (0, 180)).


Text Block

3.5.png

No. BLOCK ICON DEFINITION
1
3.5-1.png
character string: a letter, word, or line of text.
2
3.5-2.png
A character
3
3.5-3.png
Creates a piece of text by joining together two piece of text.

( Here Hello join Mixly equals HelloMixly)

4
3.5-4.png
Converts a string into an integer or an float.
5
3.5-5.png
Returns the char corresponding to an ASCII code

(Decimal number 97 corresponding to a)

6
3.5-6.png
Returns the ASCII code corresponding to a char.
7
3.5-7.png
Converts a number into a string.
8
3.5-8.png
Calculates the length of a string
9
3.5-9.png
Output the char of a string (the char at 0 of hello is h)
10
3.5-10.png
The first string equals or startsWith or endsWith the second string, returns 1, otherwise returns 0.

(if equals, both strings are abc, returns 1.)

11
3.5-11.png
Returns a decimal value of the first string subtracts the second string.


List Block

3.6.png

No. BLOCK ICON DEFINITION
1
3.6-1.png
Create a list with any number of items
2
3.6-2.png
Creats a list from a text. (int mylist [ ]={0,0,0};)
3
3.6-3.png
Creats a list from a text. (int mylist [ ]={0,0,0};)
4
3.6-4.png
Returns the value of at the specified position in a list.
5
3.6-5.png
Sets the value of at the specified position in a list.

Set the first item in mylist to another item.


Logic Block

3.7.png

No. BLOCK ICON DEFINITION
1
3.7-1.png
logic comparision

=: Return true if both inputs equal each other.
≠: Return true if both inputs are not equal to each other.
<: Return true if the first input is smaller than the second input.
≤ : Return true if the first input is smaller than or equal to the second input.
>: Return true if the first input is greater than the second input.
≥ : Return true if the first input is greater than or equal to the second input.

2
3.7-2.png
and:Return true if both inputs are true;

or: Return true if at least one of the inputs is true

3
3.7-3.png
Returns true if the input is false. Returns false if the input is true.
4
3.7-4.png
Returns either true or false.
5
3.7-5.png
Returns null
6
3.7-6.png
If the first number is true, the second number is returned, otherwise the third number.



Variable Block

3.8.png

No. BLOCK ICON DEFINITION
1
3.8-1.png
Declare and initialize a variable.

Click to select int, long,float, boolean, byte,char, string

2
3.8-2.png
Define the data types


For example: LED breath
You need an Arduino Uno and one LED module. Connect the control pin of LED module to Pin 3 of Uno board (or other pins with “~”,that is, those pins can output PWM signal). LED will gradually light then gradually dim, repeatedly.
3.8 LED breath.PNG


SerialPort Block

3.9.png

No. BLOCK ICON DEFINITION
1
3.9-1.png
Set the serial buad rate to 9600
2
3.9-2.png
Write the specified number, text or other value.
3
3.9-3.png
Print the specified number, text or other value on monitor.
4
3.9-4.png
Print the specified number, text or other value on newline of monitor.
5
3.9-5.png
Print the specified number in hexademical format on newline of monitor.
6
3.9-6.png
If the serial port is available, it returns true, otherwise returns false.

(generally used in Bluetooth communication)

7
3.9-7.png
Returns a string in serial port
8
3.9-8.png
A string read from serial port to a string variable, pause until read the specified character.
9
3.9-9.png
Read the serial data by byte (generally used to read the value sent from Bluetooth) (delete the data has been read)
10
3.9-10.png
Wait for the output data completed
11
3.9-11.png
Set the software serial port

(call this function if need to use several serial ports)

12
3.9-12.png
Event function trigger by serial port data, that is, serial port is ready to call this function.

(equal to an interrupt function)


For example: serial communication
Done uploading the code, open the Arduino monitor, then enter a “hello” on the top bar, and click Send, it will print out “hello,world”.
3.9 Serial port -1.PNG

3.9-13.png


Communicate Block

Communicate.PNG

No. BLOCK ICON DEFINITION
1
3.10-1.png
Do something when receiving infrared signals.


3.10-1-1.png

2
3.10-2.png
Sends infrared signals of the specified types.

IR transmitter sends the data, here use the libraries, only PIN3 port.

3
3.10-3.png
Enable IR decoding
4
3.10-4.png
Print the Infrared signal in RAW types when receiving it.
5
3.10-5.png
Sends RAW infrared signals (set the pin number, list, length of list and IR frequency)



For example:
You need an Arduino Uno board, an IR receiver module and an IR remote control.
Connect the signal pin of IR receiver to Digital pin 3 of Uno board, then upload the code and open the monitor. If send a signal to an IR receiver module using an IR remote control, you should see the monitor show the corresponding signal data.
3.10 ir.PNG


Sensor Block

Sensor.PNG


No. BLOCK ICON DEFINITION
1
3.11-1.png
Set the Trig and Echo pin of ultrasonic sensor.

Returns the distance of ultrasonic sensor measured. (unit: cm)

2
3.11-2.png
Set the control pin of DHT11 temperature and humidity sensor.

Returns the temperature or humidity of DHT 11 sensor measured.

3
3.11-3.png
Set the control pin of DHT11 temperature and humidity sensor.

Returns the temperature or humidity of DHT 11 sensor measured.


For example: ultrasonic ranging
Connect the Trig pin of ultrasonic sensor to Digital 1 of Uno, Echo pin to D2, then upload the code and open the monitor, you should see the distance value, updating once per 100ms.
3.11-4.png


Actuator Block

Actuator.PNG

No. BLOCK ICON DEFINITION
1
3.12-1.png
Sets the servo pin;

Moves between 0-180 degree;
Delay time for servo to rotate.

2
3.12-2.png
Returns that degree with the last servo move.

Read the degree of servo connected to IO pin set

3
3.12-3.png
Set the pin and specified frequency for buzzer to play sound.
4
3.12-4.png
Stop playing sound


For example:
Connect the signal end of servo to Digital 0 of Uno, then upload the code below, servo will rotate 90 degrees.
Note: Delay 100ms is the time required for servo to move.
3.12-5.png



Monitor Block

Monitor.PNG

No. BLOCK ICON DEFINITION
1
3.13-1.png
Set the IIC LCD1602 address
2
3.13-2.png
Input the value on LCD line 1 and line 2 from left to right.
3
3.13-3.png
Set the row and column of LCD to print the char
4
3.13-4.png
Clear the LCD screen
5
3.13-5.png
Set the control pin and the number of RGB light.
6
3.13-6.png
Set the RGB light pin, light number and brightness
7
3.13-7.png
Set the control pin, light number and color. (click to select the color)
8
3.13-8.png
Clear the data, namely turn off digital display
9
3.13-9.png
Four-digit display, displaying abcd.
10
3.13-10.png
Turn on or off the digitdisplay

(here turn on the first digitdisplay)


For example: serial communication
Separately connect the SDA (A4) and SCL (A5) of Arduino Uno to SDA and SCL pins of IIC LCD1602, then set the address of your LCD1602 screen, the LCD address we used here is 0x27. Then upload the code, LCD screen has two lines, you should see the line 1 print HELLO, and line 2 print 123456789.

3.13 LCD16002.PNG


Functions Block

Function.PNG

No. BLOCK ICON DEFINITION
1
3.14-1.png
Creates a function with no output.

Click the blue icon to set the procedure parameter.(no return value)

2
3.14-2.png
Creates a function with an output.

Click the blue icon to set the procedure parameter.
(with return value and can set the data types)

3
3.14-3.png
If a value is true, then return a second value.


For example: ultrasonic ranging
Below is an example code for line tracking car. We use three tracking modules (left to D6, middle to D7, right to D8). of course you need a tracking car to test it. First edit the forward, backward, turn left, turn right and stop into functions block. Then compile and upload the code below.
图片1-mixly 3.14.png

3.14-4.png



Installing Arduino Software

When you get the control board, first you should install the Arduino software and driver. We usually use the software Arduino 1.5.6 version. You can download it from the link below: https://www.arduino.cc/en/Main/OldSoftwareReleases#1.5.x Or you can browse the ARDUINO website to download the latest version from this link, https://www.arduino.cc, pop up the following interface.
KS0313-1.png

Then click the SOFTWARE on the browse bar, you will have two options ONLINE TOOLS and DOWNLOADS.
KS0313-2.png

Click DOWNLOADS, it will appear the latest software version of ARDUINO 1.8.5 shown as below.
KS0313-3.png

In this software page, on the right side you can see the version of development software for different operating systems. ARDUINO has a powerful compatibility. You should download the software that is compatible with the operating system of your computer.
We will take WINDOWS system as an example here. There are also two options under Windows system, one is installed version, the other is non-installed version. For simple installed version, first click Windows Installer, you will get the following page.

KS0313-4.png

KS0313-5.png

This way you just need to click JUST DOWNLOAD, then click the downloaded file to install it.
For non-installed version, first click Windows ZIP file, you will also get the pop-up interface as the above figure.
Click JUST DOWNLOAD, and when the ZIP file is downloaded well to your computer, you can directly unzip the file and click the icon of ARDUINO software to start it.


Installing Arduino (Windows)

Install Arduino with the exe. Installation package downloaded well.
thumb

Click“I Agree”to see the following interface.
thumb

Click “Next”. Pop up the interface below.
thumb

You can press Browse… to choose an installation path or directly type in the directory you want.
Then click “Install” to initiate installation.
thumb

Wait for the installing process, if appear the interface of Window Security, just continue to click Install to finish the installation.
thumb


Installing Driver

Next, we will introduce the driver installation of UNO R3 development board. The driver installation may have slight differences in different computer systems. So in the following let’s move on to the driver installation in the WIN 7 system.
The Arduino folder contains both the Arduino program itself and the drivers that allow the Arduino to be connected to your computer by a USB cable. Before we launch the Arduino software, you are going to install the USB drivers.

KS0001-1.jpg
Plug one end of your USB cable into the Arduino and the other into a USB socket on your computer. When you connect UNO board to your computer at the first time, right click the icon of your “Computer” —>for “Properties”—> click the “Device manager”, under “Other Devices”, you should see an icon for “Unknown device” with a little yellow warning triangle next to it. This is your Arduino.

Driver 1.png
Then right-click on the device and select the top menu option (Update Driver Software...) shown as the figure below..
Driver 2.png

It will then be prompted to either “Search Automatically for updated driversoftware” or “Browse my computer for driver software”. Shown as below. In this page, select “Browse my computer for driver software”.
Driver 3.png

After that, select the option to browseand navigate to the “drivers” folder of Arduino installation.
KS0286-4.png

Click “Next” and you may get a security warning, if so, allow the software to be installed. Shown as below.
Driver 5.png

Once the software has been installed, you will get a confirmation message. Installation completed, click “Close”.
Driver 6.png

Up to now, the driver is installed well. Then you can right click “Computer” —>“Properties”—>“Device manager”, you should see the device as the figure shown below.
Driver 7.png



Let’s Get Started With Your Projects

Project 1: Hello World

Overview This project is very simple. You can use only a main board and a USB cable to display the “Hello World!”. It is a communication experiment between the EASY Plug control board and PC. This is an entry experiment for you to enter the Arduino programming world. Note that need to use a serial communication software, Arduino IDE. In the above part, you can check the detailed use of Arduino IDE.


Component Required:

  • EASY plug control board*1
  • USB cable*1


Component Introduction:
thumb
The processor used in keyestudio EASY plug control board V2.0 is ATmega328. It has 5 single Digital ports labeled D5 to D9 (of which 3 can be used as PWM outputs), 1 dual-digital interface (D3-D4), 4 analog inputs (A0-A3), a Joystick socket (D2-A6-A7), a SPI, a serial port and an IIC communication interface. Also with a USB connection, a power jack, two ICSP headers and a reset button. It breaks out the IO ports with RJ11 6P6C plug.


Connect It Up Connect the control board to your computer via a micro USB cable.


Upload the Code Below is an example code for displaying the Hello World!

int val;
int ledpin=13;
void setup()
{
Serial.begin(9600);
pinMode(ledpin,OUTPUT);
}
void loop()
{
val=Serial.read();
if(val=='R')
{
digitalWrite(ledpin,HIGH);
delay(500);
digitalWrite(ledpin,LOW);
delay(500);
Serial.println("Hello World!");
}
}


Select the Arduino Board
Open the Arduino IDE, you’ll need to click the “Tools”, then select the Board that corresponds to your Arduino.
thumb


Select your serial port
Select the serial device of the Arduino board from the Tools | Serial Port menu.
Note: to avoid errors, the COM Port should keep the same as the Ports shown on Device Manager.

thumb thumb

Then click verify button to check the errors. If compiling successfully, the message "Done compiling" will appear in the status bar.
thumb
After that, click the “Upload” button to upload the code. If the upload is successful, the message "Done uploading" will appear in the status bar.
thumb


Open the Serial Monitor After that, click the monitor button to open the serial monitor.
thumb

Then set the baud rate to 9600, enter an “R” and click Send, you should see the RX led on the board blink once, and then D13 led blink once, finally "Hello World!" is showed on the monitor, and TX led blink once. Congrats! Your first simple program is complete.
thumb

Note: In this project, we take Arduino code as an example to show Hello World. But in the following projects, we will take Mixly Code as example to start the experiments. It will be more simple and easier for you to get understand of the program.


How To Get Started With Mixly Projects

* Import the Library 1) Begin with the Mixly projects, the first step you should import the corresponding library. Open the Mixly 0.998 software, click Import. Shown below.
thumb

2) Open the folder we provided, you can double-click to open the library KS_EasyPulg
thumb

thumb

thumb

3) If import the custom library successfully, you should see it on the Mixly blocks interface. Shown below.
thumb


Start with Mixly Project - Saying Hello World

1) Hookup Guide Connect the control board to your computer via a micro USB cable.
thumb

2) Open the Program Click Open to open your first program Hello World. Follow the steps below.
thumb

thumb

thumb

thumb

In fact, you can double click or directly drag the program to open Hello World. Then you should see the Blocks code, shown below.
thumb

thumb

After that, select the proper Board and Port. Upload the code to your EASY Plug control board.
thumb


3) Displaying Hello World Finally, upload the code successfully, open the monitor and set the baud rate to 9600, you should be able to see the Hello World is showed on the monitor. Congrats! You make it !
thumb


4) Check Arduino Code What’ more, you can also click to check the Arduino code on the right side. Amazing! So powerful the Mixly blocks code is!
thumb
Is it more easy and simple to play the Mixly projects? Try your first Mixly blocks projects right now. Begin with the following projects to motivate your creations!


Project 2: LED Light

Overview To start off the EASY Plug sensor module, we will work on an LED. That’s right - it is as simple as turning a light on and off. It might not seem like much, but establishing this important baseline will give you a solid foundation as we work toward more complex experiment.

Keyestudio UNO R3 Board

Component Required

  • EASY plug control board*1
  • EASY plug LED Module *3
  • RJ11 cable*1
  • USB cable*1

Component Introduction: EASY plug LED Module


The LED light modules have shiny colors, ideal for Arduino starters. It can be easily connected to IO/Sensor shield. Note: this module needs to be used together with EASY plug control board. You can also choose other LED to emit different color of light like blue, green, yellow and red.

  • Sensor type: Digital
  • Interface: Easy plug
  • PH2.54 socket


Connect It Up Connect the EASY Plug LED module to control board using an RJ11 cable.
thumb


Example 1: Light up LED

Upload the Code Below is an example code for lighting up an LED.
thumb

What You Should See The LED is turned on. If it doesn’t, make sure you have assembled the circuit correctly and verified and uploaded the code to your board.
thumb


Example 2: LED Blink

Upload the Code Below is an example code for LED blinking.
thumb

What You Should See


Error creating thumbnail: File with dimensions greater than 12.5 MP


The LED will flash on for one second, then blink off for one second. If it doesn’t, make sure you have assembled the circuit correctly and verified and uploaded the code to your board.
thumb

Little Knowledge: If you want to make the LED flash on and off more quickly or slowly, you can modify the Delay time here.
thumb
Thank you! Enjoy the following programming.


Example 3: LED Breath

Here do you know how to connect the LED module? Check the code. Test Code Below is an example code for one LED breathing.
thumb

What You Should See The LED gradually becomes brighter for one second, then gradually dimming for one second.
thumb
If it doesn’t, make sure you have assembled the circuit correctly and verified and uploaded the code to your board.


Example 4: Brighten and Dim

Hookup Guide Connect the three EASY Plug LED modules to control board using RJ11 cables. Connect a red LED to D9, white LED to D6, blue LED to D5.
thumb

Upload the Code Below is an example code for three LED modules experiment.
thumb

thumb


What You Should See The three LEDs are gradually brighter then gradually off one by one, circularly. If it doesn’t, make sure you have assembled the circuit correctly and verified and uploaded the code to your board.
thumb

thumb

thumb


Troubleshooting

  • LED Not Lighting Up?

If upload the code successfully, but LED still not lights up. Make sure your board and LED module are connected correctly.

  • Program Not Uploading?

This happens sometimes, the most likely case is a confused Board and serial port, you should firstly select your proper board and port.
thumb


Project 3: Line Tracking

Overview
If you want to build a line tracking robot, the easiest way is to use a line tracking sensor. Line following is the most basic function of smart mobile robot. We designed this new generation of line tracking sensor to be your robot's powerful copilot all the way. It will guide your robot by telling white from black quickly and accurately, via TTL signal.

Component Required:

  • EASY plug control board*1
  • EASY plug Line Tracking Sensor *1
  • EASY plug LED Module *1
  • RJ11 cable*1
  • USB cable*1


Component Introduction:

Keyestudio EASY plug Line Tracking Sensor

The Line Tracking Sensor can tell white from in black or black from white accurately.
The single line-tracking signal provides a stable output signal TTL for a more accurate and more stable line.
The working principle is simple, using infrared light's different reflectivity for different color, and converting the strength of the reflected signal into current signal.

  • Power supply: 5V
  • Operating current: <10mA
  • Operating temperature: 0℃~ 50℃
  • Output Level: TTL (Black for LOW output, White for HIGH output)
  • High quality connector


Connect It Up
Connect the EASY Plug Line Tracking sensor and LED module to control board using RJ11 cables.
thumb


What You Should See Done uploading the code to board, open the serial monitor and set the baud rate to 9600, then you can see the data is printed on the monitor, and will control LED on.
thumb

thumb

thumb


Project 4: Push Button

Overview In this project, we’ll be looking at the one of the most common and simple inputs- a push button. It is an elegant way to control power to your project. Press once to turn on, then press again to turn off. Press to release pleasure!

Component Required:

  • EASY plug control board*1
  • EASY plug Digital Push Button *1
  • EASY plug LED Module *1
  • RJ11 cable*1
  • USB cable*1

Component Introduction

Keyestudio EASY plug Digital Push Button

The EASY Plug Push-button module is a tidy little design that lets you control a DC power source using an everyday tactile button. This basic application module is widely applied to Arduino, Raspberry Pi platforms. When the button is pressed, it outputs HIGH level signal; if release the button, it outputs LOW level signal. You can simply connect to an IO port to have your first taste of Arduino.

  • Supply Voltage: 3.3V to 5V
  • Large button and high-quality top cap
  • Sensor type: Digital


Connect It Up Connect the EASY Plug push button sensor and LED module to control board using RJ11 cables.
thumb


Example 1: Button Controlled Light

Upload the Code Below is an example code.
thumb

What You Should See Powered up and upload well the code, press down the button, LED module is turned on. While release the button, LED is off.
thumb

thumb
Open the monitor, it will print out the value read from the button.
thumb

thumb


Example 2: Simulating Table Lamp

Upload the Code Below is an example code.
thumb

What You Should See Powered up and upload well the code, press down the button, LED light is turned on, it will not be off when release the button; But if press the button once again, LED will be turned off. It seems like your table lamp.
thumb
Open the monitor, you should be able to see how many times do you press the button.
thumb


Project 5: Relay

Overview In this project, we will show you how to control a relay module. This relay module uses a high-quality relay. A relay is basically an electrically controlled mechanical switch. It can be used to interactive projects.


Component Required:

  • EASY plug control board*1
  • EASY plug Single Relay Module *1
  • RJ11 cable*1
  • USB cable*1


Component Introduction:

Keyestudio EASY plug Single Relay Module

This EASY Plug relay module uses a high-quality relay. A relay is basically an electrically controlled mechanical switch. It is one of the most important controlled elements, which is widely used to control the lighting, communications, remote sensing, electrical and other equipments. The Relay output state by a light-emitting diode, observing the relay ON and OFF status. It can be controlled through the digital IO port, such as lamps, motors and other high current or high voltage devices.

  • Type: Digital
  • Rated current: 10A (NO) 5A (NC)
  • Maximum switching voltage: 150VAC 24VDC
  • Digital interface
  • Control signal: TTL level
  • Rated load: 8A 150VAC (NO) 10A 24VDC (NO); 5A 250VAC (NO/NC) 5A 24VDC (NO/NC)
  • Maximum switching power: AC1200VA DC240W (NO); AC625VA DC120W (NC)
  • Contact action time: 10ms


Connect It Up Connect the EASY Plug Single Relay module to control board using an RJ11 cable.
thumb


Upload the Code Below is an example code.
thumb


What You Should See Done uploading the code, you should be able to hear the relay contacts click. When the relay is off, the COM (common) terminal block will be connected to the NC (Normally Closed) terminal block. When the relay is on, the COM (common) terminal block will be connected to the NO (Normally Open) terminal block.
thumb

thumb


Project 6: Crash

Overview We use a crash sensor to detect whether happen collision or not. When an object crashes the metal switch of the sensor, it will output LOW level signal. When the switch is disconnected, it will keep HIGH level.

Component Required:

  • EASY plug control board*1
  • EASY plug Crash Sensor *1
  • EASY plug LED Module *1
  • EASY plug Relay Module *1
  • RJ11 cable*1
  • USB cable*1

Component Introduction:

Keyestudio EASY plug Crash Sensor


Crash sensor, also known as snap-action switch, is an electric switch that is actuated by very little physical force. It is a digital on-off input module necessary for elementary electronic. By programming, it can be used for the light, sound device, key function of LCD display, 3D Printer position feedback, or other devices.

  • Onboard status indicator LED
  • M3 mounting hole, convenient for fixation on other devices.
  • If collision happened, outputs LOW level signal; no collision, outputs HIGH level signal.


Connect It Up Connect the EASY Plug Crash sensor to control board using an RJ11 cable.
thumb


Upload the Code Below is an example code.
thumb


What You Should See When an object crashes the metal switch of the sensor, the LED is turned off. If no crash happened, LED is turned on.
thumb

thumb

You should be able to see the value printing on the monitor.
thumb


Extension Experiment:

Switch Controlling Relay Hookup Guide Connect the EASY Plug Crash sensor and relay module to control board using an RJ11 cable.
thumb


Upload the Code Below is an example code.
thumb


What You Should See
thumb
If crash the limit switch, the LED on the relay module is turned on.
thumb


Troubleshooting:'

  • Program Not Uploading?

This happens sometimes, the most likely case is a confused Board and serial port, you should firstly select your proper board and port. If it doesn’t, make sure you have assembled the circuit correctly and verified and uploaded the code to your board.


Project 7: I Feel Pressure

Overview How to measure the outside force? Use a pressure sensor.

Component Required:

  • EASY plug control board*1
  • EASY plug thin-film pressure sensor *1
  • EASY plug LED Module *1
  • RJ11 cable*1
  • USB cable*1


Component Introduction:

EASY plug Thin-film Pressure Sensor

This EASY plug pressure sensor adopts the flexible Nano pressure-sensitive material with an ultra-thin film pad. It has the functions of water-proof and pressure detection. The force sensors are ultra-thin and flexible printed circuits, which can be easily integrated into force measurement applications.

The harder you press, the lower the sensor's resistance. When the sensor detects the outside pressure, the resistance of sensor will make a change. So we can use the circuit to convert the pressure signal that senses pressure change into the corresponding electric signal output. In this way, we can know the conditions of pressure changes by detecting the signal changes. You can connect the sensor to EASY plug Control board for communication using only a RJ11 cable.

  • Working Voltage: DC 3.3V—5V
  • Range: 0-0.5KG
  • Thickness: <0.25mm
  • Response Point: <20g
  • Repeatability: <±5.8%(50% load)
  • Accuracy: ±2.5%(85% range interval)
  • Durability: >100 thousand times
  • Initial Resistance: >100MΩ (no load)
  • Response Time: <1ms
  • Recovery Time: <15ms
  • Working Temperature: -20℃ to 60℃


Connect It Up Connect the EASY Plug pressure sensor to control board using an RJ11 cable.
thumb


Upload the Code
thumb


What You Should See
thumb
After uploading the code, open the serial monitor, and set the baud rate to 9600. When tightly press the sensor, you should see the value become larger. So the sensor works normally.
thumb


Extension Experiment

Pressure Controlling LED Hookup Guide Connect the EASY Plug pressure sensor and LED module to control board using RJ11 cables.
thumb


Upload the Code Below is an example code.
thumb


What You Should See After uploading the code, when tightly press the sensor with your finger, you should see the brightness of LED will change with the pressure intensity.
thumb

thumb


Project 8: Magnetic Field

Overview This project will tell you how to detect whether there is a magnetic field nearby or not ? Use a reed switch module.


Component Required:

  • EASY plug control board*1
  • EASY plug Reed Switch Module *1
  • EASY plug LED Module *1
  • RJ11 cable*1
  • USB cable*1


Component Introduction:

Keyestudio EASY plug Reed Switch Module

This is a small device called a reed switch on the module. When the device is exposed to a magnetic field, the two ferrous materials inside the switch pull together and the switch closes. When the magnetic field is removed, the reeds separate and the switch opens. This makes for a great non-contact switch. You can mount reed switch on the door for alarming purpose or as switches.

  • Interface: Easy plug
  • Working voltage: DC 3.3V-5V
  • Working current: ≥20mA
  • Working temperature: -10℃ to+50℃
  • Detection distance: ≤10mm


Connect It Up Connect the EASY Plug Reed switch module and LED module to control board using RJ11 cables.
thumb


Upload the Code Below is an example code.
thumb


What You Should See If you put a magnetic bead close to the reed module, once the reed module detects the magnetic field, LED will turn on.
thumb

thumb


Project 9: 4-digit LED display

Overview When you watch a ball game, you might often see the countdown. Here comes an EASY Plug 4-digit 0.36’’ LED display! Through this project, you will learn how to control the 4-digit LED display show the time counting.

Component Required:

  • EASY plug control board*1
  • EASY plug 4-digit LED display*1
  • EASY plug button module*1
  • RJ11 cable*1
  • USB cable*1

Component Introduction:

Keyestudio EASY plug 4-Digit LED Display

This is a 4-digit 0.36’’ Common Anode LED display module, a 12-pin display module with score points. The driver chip used in the matrices is TM1637, using only two signal cables to make the microcontroller control the 4-digit LED display. The four pins of LED display are GND、VCC、DIO、CLK. (GND is ground, VCC is for power supply, DIO is data IO pin, CLK is clock signal pin.) The module pins are extended into Registered jack, so you can easily connect it to EASY Plug control board using a RJ11 cable.

  • Operating Voltage: DC5V
  • Operating Temperature Range: -40℃~+85℃


Connect It Up Connect the EASY Plug 4-digit LED display module and button module to control board using RJ11 cables.
thumb


Upload the Code Below is an example code.
thumb

thumb


What You Should See After uploading the code, you should see the 4-digit LED display show the number jumping. On the left side, show 555; after one second, show 0125 on the right side; after one second, show 125; then after one second, the display brightness is 1, becoming rather darker. One second later, the display brightness is 7, becoming rather brighter. After one second again, show the 12:89; then one second later, do not show the colon. After one second, the LED display is off; and one second later, start to repeat the display again.
thumb

thumb


Troubleshooting:'

  • Compiling Fails ?

This happens sometimes, the most likely case is a library file not added. You should be sure all the libraries under the KS_EasyPulg are added to the libraries directory of Arduino-1.8.5. Shown below.
thumb

thumb

thumb


  • Program Not Uploading?

This happens sometimes, the most likely case is a confused Board and serial port, you should firstly select your proper board and port.
thumb


Extension Experiment 1:

Time Counting Hookup Guide Connect the EASY Plug 4-digit LED display module to control board using an RJ11 cable.
thumb


Test Code Below is an example code.
thumb


What You Should See
thumb

The 4-digit LED display starts to show the time counting. Seconds on the right, minutes on the left, and return to zero after 60 minutes.
thumb


Extension Experiment 2

Counting And Reset Hookup Guide Connect the EASY Plug 4-digit LED display module and button module to control board using RJ11 cables.
thumb


Test Code Below is an example code.
thumb

thumb

thumb


What You Should See The 4-digit LED display starts to show the time counting. If press the button, it will reset the counting.


Project 10: Photo Interrupter

Overview In this project, you will learn about how to use a photo interrupter module to turn on the LED and print the analog value on the monitor.

Component Required:

  • EASY plug control board*1
  • EASY plug Photo Interrupter Module *1
  • EASY plug LED Module *1
  • EASY plug 4-digit LED Display Module *1
  • RJ11 cable*1
  • USB cable*1


Component Introduction:

Keyestudio EASY plug Photo Interrupter Module
This is a high performance EASY Plug photo interrupter module. 

It integrates a photo-interrupter, which belongs to an optical switch of a photo-interrupting photoelectric switch.

The upright part on the module combines an infrared light emitting diode and shielded infrared detector. By emitting a beam of infrared light from one end to another end, the sensor can detect an object when it passes through the beam. Useful for many applications such as optical limit switches, pellet dispensing, general object detection, etc. Note: this module needs to be used together with EASY plug control board.

  • Supply Voltage: 3.3V to 5V
  • Interface: Digital


Connect It Up Connect the EASY Plug Photo Interrupter module and LED module to control board using RJ11 cables.