Ks0398 keyestudio EASY plug Ultimate Starter Kit for Arduino STEM EDU: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
No edit summary
 
(54 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[image:KS0398.jpg|thumb|600px|right|EASY PLUG Ultimate Starter Kit For Arduino STEM EDU]]
[[image:图片1000000.png|thumb|600px|right|EASY PLUG Ultimate Starter Kit For Arduino STEM EDU]]


==Kit Description==
==Kit Description==
Line 125: Line 125:
| align="center" | EASY plug DS3231 Clock Module
| align="center" | EASY plug DS3231 Clock Module
| align="center" | 1
| align="center" | 1
| align="center" | <br>[[File:0398-16.png|500px|frameless|thumb]]<br>
| align="center" | <br>[[File:QQ图片20220407170423.png|500px|frameless|thumb]]<br>
|-
|-
   
   
Line 170: Line 170:
|-
|-
   
   
| align="center" | 25
| align="center" | 26
| align="center" | 200mm blue RJ11 cable
| align="center" | 200mm blue RJ11 cable
| align="center" | 5
| align="center" | 5
Line 176: Line 176:
|-
|-
   
   
| align="center" | 26
| align="center" | 27
| align="center" | 300mm blue RJ11 cable
| align="center" | 300mm blue RJ11 cable
| align="center" | 3
| align="center" | 3
Line 182: Line 182:
|-
|-
   
   
| align="center" | 27
| align="center" | 28
| align="center" | USB cable
| align="center" | USB cable
| align="center" | 1
| align="center" | 1
| align="center" | <br>[[File:397-27.png|200px|frameless|thumb]]<br>
| align="center" | <br>[[File:397-27.png|200px|frameless|thumb]]<br>
|-
|-
| align="center" | 29
| align="center" | Acrylic Board
| align="center" | 1
| align="center" | <br>[[File:0398----3.png|200px|frameless|thumb]]<br>
|-
| align="center" | 30
| align="center" | Dual-pass M3*15MM Copper Pillars
| align="center" | 1
| align="center" | <br>[[File:0398----4.png|200px|frameless|thumb]]<br>
|-
| align="center" | 31
| align="center" | M3*10MM Round Head Screws
| align="center" | 1
| align="center" | <br>[[File:0398----5.png|200px|frameless|thumb]]<br>
|-
|}
|}


<br>
<br>


==Getting Started with Mixly==
==Install Mixly and Driver==


===Introduction for Mixly ===
=== Download Mixly ===
[[File:Mixly-icon.png|900px|right|thumb| Mixly ]]
[[File:Mixly-icon.png|900px|right|thumb| 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.<br>
Mixly is a free open-source graphical Arduino programming software, based on Google’s Blockly graphical programming framework, and developed by Mixly Team@ BNU.<br>
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.<br>
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.<br>
Although there is an Ardublock graphical programming software launched by Arduino official, Ardublock is not perfect enough, and many common functions cannot be realized.
Although there is an Ardublock graphical programming software launched by Arduino official, Ardublock is not perfect enough, and many common functions cannot be realized.<br>
 
②Download and install Mixly1.0 software<br>
There are two kind installation packages provided for you in the following links:<br>
Mixly1.0 for Win 7/8/10:https://fs.keyestudio.com/Mixly1-Windows<br>
Mixly1.0 for Mac:https://fs.keyestudio.com/Mixly1-MACOS<br>


<br>
Windows version:<br>
===Interface Functions of Mixly ===
We will take Mixly1.0 (Windows version) as example.<br>
Install Software:<br>
You will get installation package after downloading. As shown below:<br>


==== System Functions ====
<br>[[Image:图片1。0.0.png|300px|frameless]]<br>
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.
<br>[[Image:3.1-1.png|800px|frameless]]<br>


<br>
Unzip the package, you will see “Mixly 1.0 for keyestudio.exe”
'''Some common functions:''' <br>
<br>[[Image:图片1。0.1.png|600px|frameless]]<br>
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).
<br>[[Image:3.1-2.png|800px|frameless]]<br>
<br>


====In/Out Block====
Double-click ”Mixly 1.0 for keyestudio.exe”, the following interface pops up.
[[Image:3.2-1.png|800px|frameless]]<br>
<br>[[Image:图片1。0.2.png|800px|frameless]]<br>


{| width="80%" cellspacing="0" border="1"
|-


! align="center" scope="col" | No.
We have to choose correct Arduino development board and name, as shown below:<br>
! align="center" scope="col" | BLOCK ICON
<br>[[Image:20201228110445.png|800px|frameless]]<br>
! align="center" scope="col" | DEFINITION
|-
| align="center" | 1 
| align="center" | <br>[[Image:3.2-2.png|400px|frameless]]<br>
| align="center" | Returns HIGH or LOW voltage
|-


| align="center" | 2 
Select correct COM port(the corresponding port will be shown after installing driver successfully) <br>
| align="center" | <br>[[Image:3.2-3.png|400px|frameless]]<br>
<br>[[Image:20201228110446.png|800px|frameless]]<br>
| align="center" | Write digital value to a specific Port.<br>
Digital Output: set the HIGH or LOW output for IO pins
|-


| align="center" | 3
You have to know the function of every area and interface on Mixly software before uploading program on Arduino development board.
| align="center" | <br>[[Image:3.2-4.png|400px|frameless]]<br>
 
| align="center" | Returns a digital value of a specific Port.<br>
<br>[[Image:图片1。0.3.png|800px|frameless]]<br>
Digital IO Read Pin, generally used to read the HIGH or LOW level detected by Digital sensor
<br>[[Image:QQ图片20200707142747.png|800px|frameless]]<br>
|-
| align="center" | 4
| align="center" | <br>[[Image:3.2-5.png|400px|frameless]]<br>
| align="center" | Write analog value between 2 and 255 to a specific Port.<br>
Analog Output: set the Analog value output by Analog IO pins (0~255).
|-


| align="center" | 5 
More information about Mixly 1.0 for keyestudio:https://wiki.keyestudio.com/Getting_Started_with_Mixly1.0
| align="center" | <br>[[Image:3.2-6.png|400px|frameless]]<br>
| align="center" | Returns value between 0 and 1023 of a specific Port.  <br>
Analog IO Read Pin, generally used to read the Analog value detected by Analog sensor.
|-


| align="center" | 6
| align="center" | <br>[[Image:3.2-7.png|400px|frameless]]<br>
| align="center" | External Interrupts function, with three trigger interrupt modes RISING, FALLING, CHANGE.
|-
| align="center" | 7
| align="center" | <br>[[Image:3.2-8.png|400px|frameless]]<br>
| align="center" | Detachs interrupt to a specific Port.<br>
Turn off the given interrupt function.
|-
| align="center" | 8 
| align="center" | <br>[[Image:3.2-9.png|400px|frameless]]<br>
| align="center" | Set the IO pins as Output or Input state
|-
| align="center" | 9 
| align="center" | <br>[[Image:3.2-10.png|400px|frameless]]<br>
| align="center" | Read the continuous time of HIGH or LOW pulse from IO pins.( generally used for ultrasonic ranging)
|-
| align="center" | 10
| align="center" | <br>[[Image:3.2-11.png|400px|frameless]]<br>
| align="center" | Read a pulse (either HIGH or LOW) on a pin within a time set in timeout.
|-
| align="center" | 11
| align="center" | <br>[[Image:3.2-12.png|400px|frameless]]<br>
| align="center" | 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).<br>
Generally used for controlling the 74HC595 CHIP.
|-
| align="center" | 12
| align="center" | <br>[[Image:3.2-13.png|300px|frameless]]<br>
| align="center" | This is the function interface under Normal mode. If select Advanced mode, the functions will be more.
|-
|}


<br>
'''For example:'''<br>
Connect your Arduino Uno board, then follow the steps below to light the Pin13 led on Arduino UNO.
<br>[[Image:3.2 led D13.PNG|800px|frameless]]<br>
<br>


====Control Block====
[[Image:Control.PNG|800px|frameless]]<br>


{| width="80%" cellspacing="0" border="1"
=== Install the driver of the development board ===
|-
 
! align="center" scope="col" | No.
Next, we will introduce the driver of the development board. The driver installation may have slight differences in different computer systems. So in the following let’s take an example of the driver installation in the WINDOWS system. <br>
! align="center" scope="col" | BLOCK ICON
 
! align="center" scope="col" | DEFINITION
Mixly 1.0 for keyestudio folder contains its software and driver files. Before we launch the Mixly software, you only need to install the USB drivers.<br>
|-
 
| align="center" | 1 
Double-click the Mixly 1.0 for keyestudio folder—> arduino—>drivers<br>
| align="center" | <br>[[Image:3.3-1.png|600px|frameless]]<br>
 
| align="center" | Initialization (run only once)
The driver files are shown below:<br>
|-
 
<br>[[Image:20201228110449.png|800px|frameless]]<br>
 
<br>[[Image:044602.png|800px|frameless]]<br>


| align="center" | 2 
Connect the EASY Plug control board V2.0 to the computer with a USB cable.<br>
| align="center" | <br>[[Image:3.3-2.png|600px|frameless]]<br>
Right click the icon of your“Computer”—>“Properties”—>“Device manager”.<br>
| align="center" | End the program, means the program will stop running when use this block.
|-


| align="center" | 3
If your computer is Windows10, the USB Serial Device(COM8) will be shown. That indicates that the USB driver is installed. But for other systems like Windows 7 or 8, you may have to install the USB driver manually.<br>
| align="center" | <br>[[Image:3.3-3.png|400px|frameless]]<br>
| align="center" | Delay function, click to select '''ms''' or '''us''' <br>
(pause the program for the amount of time (in milliseconds) specified as parameter. There are 1000 milliseconds in a second.)
|-
| align="center" | 4
| align="center" | <br>[[Image:3.3-4.png|600px|frameless]]<br>
| align="center" | '''if_do''' function (first evaluate a value be true or false, if a value is true, then do some statement. <br>
You can click the blue gear icon to select the '''else if''' block or '''else''' block.)
|-


| align="center" | 5 
<br>[[Image:图片1jhfgjf-4.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.3-5.png|600px|frameless]]<br>
| align="center" | '''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.)
|-


| align="center" | 6
Right-click USB Serial Device(COM8) to select Update driver
| align="center" | <br>[[Image:3.3-6.png|600px|frameless]]<br>
 
| align="center" | Equal to [https://www.arduino.cc/reference/en/language/structure/control-structure/for/ '''for''' statement].
<br>[[Image:图片1jhfgjf-5.png|800px|frameless]]<br>
|-
| align="center" | 7
| align="center" | <br>[[Image:3.3-7.png|600px|frameless]]<br>
| align="center" | A '''while''' loop statement.
|-
| align="center" | 8 
| align="center" | <br>[[Image:3.3-8.png|600px|frameless]]<br>
| align="center" | '''break''' function, used to exit from the containing loop.
|-
| align="center" | 9 
| align="center" | <br>[[Image:3.3-9.png|600px|frameless]]<br>
| align="center" | '''millis()''' function, returns the system running time since the program started.
(The unit can be '''ms''' (milliseconds) or '''μs'''(microsecond)).
|-
| align="center" | 10
| align="center" | <br>[[Image:3.3-10.png|600px|frameless]]<br>
| align="center" | Timer interrupt function, that is, set a trigger interrupt for the amount of time (in milliseconds) specified as parameter.
|-
| align="center" | 11
| align="center" | <br>[[Image:3.3-11.png|400px|frameless]]<br>
| align="center" | Timer interrupt start block
|-
| align="center" | 12
| align="center" | <br>[[Image:3.3-12.png|400px|frameless]]<br>
| align="center" | Timer interrupt stop block
|-
|}


<br>
<br>[[Image:图片1jhfgjf-6.png|800px|frameless]]<br>
'''For example:'''<br>
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)
<br>[[Image:3.3 flash.PNG|800px|frameless]]<br>


<br>
Click “browse my computer for updated driver software”, find out the drivers folder and enter “driver” to search in rectangular box.<br>
Click “Next”, the driver will be installed successfully.<br>


==== Math Block====
<br>[[Image:图片1jhfgjf-7.png|800px|frameless]]<br>
[[Image:3.4.png|900px|frameless]]<br>


{| width="80%" cellspacing="0" border="1"
Click Install to wait for the installation
|-
! align="center" scope="col" | No.
! align="center" scope="col" | BLOCK ICON
! align="center" scope="col" | DEFINITION
|-
| align="center" | 1 
| align="center" | <br>[[Image:3.4-1.png|300px|frameless]]<br>
| align="center" | A number
|-


| align="center" | 2 
| align="center" | <br>[[Image:3.4-2.png|300px|frameless]]<br>
| align="center" | Click to select the Arithmetic Operators: <br>
[https://www.arduino.cc/reference/en/language/structure/arithmetic-operators/addition/  '''+(addition)'''];
[https://www.arduino.cc/reference/en/language/structure/arithmetic-operators/subtraction/ '''-(subtraction)'''];
[https://www.arduino.cc/reference/en/language/structure/arithmetic-operators/multiplication/ '''x (Multiplication)''']; [https://www.arduino.cc/reference/en/language/structure/arithmetic-operators/division/  '''÷(division)'''];  [https://www.arduino.cc/reference/en/language/structure/arithmetic-operators/remainder/  ''' %(remainder)''']; 
[https://www.arduino.cc/reference/en/language/structure/bitwise-operators/bitwisexor/ ''' ^(bitwise xor)'''] <br>
|-


| align="center" | 3
<br>[[Image:图片1jhfgjf-8.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.4-3.png|300px|frameless]]<br>
<br>[[Image:图片1jhfgjf-9.png|800px|frameless]]<br>
| align="center" | Click to select the [https://www.arduino.cc/reference/en/language/structure/bitwise-operators/bitwiseand/ '''& (bitwise end)''']; [https://www.arduino.cc/reference/en/language/structure/bitwise-operators/bitwiseor/ '''l (bitwise or)''']; [https://www.arduino.cc/reference/en/language/structure/bitwise-operators/bitshiftleft/ '''<< (bitshift left)''']; [https://www.arduino.cc/reference/en/language/structure/bitwise-operators/bitshiftright/ '''>> (bitshift right)''']
 
|-
Click Close and you can see the following device in the Device Manager.<br>
 
| align="center" | 4
<br>[[Image:图片1jhfgjf-10.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.4-4.png|200px|frameless]]<br>
| align="center" | Click to select the [https://www.arduino.cc/reference/en/language/functions/trigonometry/sin/ '''sin''']; [https://www.arduino.cc/reference/en/language/functions/trigonometry/cos/ '''cos''']; '''tan; asin; acos; atan; ln; log10; e^; 10^;''' [https://www.arduino.cc/reference/en/language/structure/compound-operators/increment/ '''++ (increment)'''] ;
[https://www.arduino.cc/reference/en/language/structure/compound-operators/decrement/ '''-- (decrement)''']
|-


| align="center" | 5 
If your computer is Windows7/8, please follow our instruction.<br>
| align="center" | <br>[[Image:3.4-5.png|200px|frameless]]<br>
| align="center" | Click to select the '''Round; Ceil; Floor; abs; sq; sqrt''' <br>
'''Round:''' Returns the integer part a number using around.<br>
'''Ceil:''' Returns the integer part a number using ceil.<br>
'''Floor:''' Returns the integer part a number using floor.<br>
'''abs:''' Return the absolute value of a number.<br>
'''sq:''' Return the square of a number.<br>
'''sqrt:''' Return the square root of a number.
|-


| align="center" | 6
When you connect the board to your computer at the first time, right-click the icon of your “Computer” —>for “Properties”—> click “Device manager”, under “Other Devices”, you should see an icon for “Unknown device” with a little yellow warning triangle next to it. <br>
| align="center" | <br>[[Image:3.4-6.png|400px|frameless]]<br>
| align="center" | If select the '''max''', returns the larger number; <br>
if select the '''min''', returns the smaller number.


|-
<br>[[Image:图片1jhfgjf-11.png|800px|frameless]]<br>
| align="center" | 7
| align="center" | <br>[[Image:3.4-7.png|400px|frameless]]<br>
| align="center" | Initialize the random seed
|-
| align="center" | 8 
| align="center" | <br>[[Image:3.4-8.png|400px|frameless]]<br>
| align="center" | Return a random integer between the two specified limits, inclusive.
|-
| align="center" | 9 
| align="center" | <br>[[Image:3.4-9.png|400px|frameless]]<br>
| align="center" | Constrain a number to be between the specified limits (inclusive).  <br>
(generally used to constrain an analog value read from sensor)
|-
| align="center" | 10
| align="center" | <br>[[Image:3.4-10.png|400px|frameless]]<br>
| align="center" | Map a number from the first interval to the second interval. <br>
(For instance, potentiometer-controlled servo, map the range of potentiometer (0, 1023) to the angle of servo (0, 180)).
|-
|}


<br>
Then right-click on the device and select the top menu option (Update Driver Software...) shown as the figure below.   
 
<br>[[Image:图片1jhfgjf-12.png|800px|frameless]]<br>


====Text Block====
It will then be prompted to either “Search Automatically for updated driver software” or “Browse my computer for driver software”. Shown as below. In this page, select “Browse my computer for driver software”. 
[[Image:3.5.png|900px|frameless]]<br>


{| width="80%" cellspacing="0" border="1"
<br>[[Image:图片1jhfgjf-13.png|800px|frameless]]<br>
|-


! align="center" scope="col" | No.
Click “Browse”, then find out the drivers folder and enter “driver” to search in rectangular box.  
! align="center" scope="col" | BLOCK ICON
Click “Next”, the driver will be installed successfully. (I place Arduino software folder on the desktop, you could follow my way)
! align="center" scope="col" | DEFINITION
 
|-
<br>[[Image:图片1jhfgjf-14.png|800px|frameless]]<br>
| align="center" |
 
| align="center" | <br>[[Image:3.5-1.png|800px|frameless]]<br>
<br>[[Image:图片1jhfgjf-15.png|800px|frameless]]<br>
| align="center" | character string: a letter, word, or line of text.
 
|-
 
The driver of your device is already installed.
 
Click“Close”
 
<br>[[Image:图片1jhfgjf-16.png|800px|frameless]]<br>
 
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.
 
<br>[[Image:图片1jhfgjf-17.png|800px|frameless]]<br>
 
 
=== Start the first program ===
 
Click “Open”→ sample → arduino→ Arduino → 01 IN-OUT→01-LED Blink.mix
 
<br>[[Image:图片1jhfgjf-18.png|800px|frameless]]<br>


| align="center" | 2 
We have to choose correct Arduino development board and name, as shown below:
| align="center" | <br>[[Image:3.5-2.png|800px|frameless]]<br>
| align="center" | A character
|-


| align="center" | 3
<br>[[Image:图片1jhfgjf-19.png|800px|frameless]]<br>  
| align="center" | <br>[[Image:3.5-3.png|800px|frameless]]<br>
| align="center" | Creates a piece of text by joining together two piece of text. <br>
( Here Hello join Mixly equals HelloMixly)
|-
| align="center" | 4
| align="center" | <br>[[Image:3.5-4.png|800px|frameless]]<br>
| align="center" | Converts a string into an integer or an float.
|-


| align="center" | 5  
The corresponding board and COM port will be shown after setting board and COM port.  
| align="center" | <br>[[Image:3.5-5.png|800px|frameless]]<br>
| align="center" | Returns the char corresponding to an ASCII code <br>
(Decimal number 97 corresponding to a)
|-


| align="center" | 6
<br>[[Image:图片1jhfgjf-20.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.5-6.png|800px|frameless]]<br>
<br>[[Image:图片1jhfgjf-21.png|800px|frameless]]<br>  
| align="center" | Returns the ASCII code corresponding to a char.
<br>[[Image:图片1jhfgjf-22.png|800px|frameless]]<br>
|-
   
   
| align="center" | 7
Click Upload to upload the program
| align="center" | <br>[[Image:3.5-7.png|800px|frameless]]<br>
 
| align="center" | Converts a number into a string.
<br>[[Image:图片1jhfgjf-23.png|800px|frameless]]<br>  
|-
| align="center" | 8 
| align="center" | <br>[[Image:3.5-8.png|800px|frameless]]<br>
| align="center" | Calculates the length of a string
|-
| align="center" | 9 
| align="center" | <br>[[Image:3.5-9.png|800px|frameless]]<br>
| align="center" | Output the char of a string (the char at 0 of hello is h)
|-
| align="center" | 10
| align="center" | <br>[[Image:3.5-10.png|800px|frameless]]<br>
| align="center" |The first string equals or startsWith or endsWith the second string, returns 1, otherwise returns 0.<br>
(if equals, both strings are abc, returns 1.)
|-


| align="center" | 11
| align="center" | <br>[[Image:3.5-11.png|800px|frameless]]<br>
| align="center" |Returns a decimal value of the first string subtracts  the second string.
|-
|}


<br>
Upload successfully. After uploading the program successfully, the onboard LED lights up for 1s, lights off for 1s.


====List Block====
[[Image:3.6.png|800px|frameless]]<br>


{| width="80%" cellspacing="0" border="1"
== Import the Library ==
|-


! align="center" scope="col" | No.
Open Mixly 1.0 for keyestudio software, click“Import”then select“Local import”, as shown below:
! align="center" scope="col" | BLOCK ICON
<br>[[Image:图片1jhfgjf-24.png|800px|frameless]]<br>
! align="center" scope="col" | DEFINITION
Double-click the folder“KS_EasyPulg”and select“KS_EasyPulg”library file
|-
<br>[[Image:图片1jhfgjf-25.png|800px|frameless]]<br>
| align="center" |
<br>[[Image:图片1jhfgjf-26.png|800px|frameless]]<br>  
| align="center" | <br>[[Image:3.6-1.png|300px|frameless]]<br>
After importing it, you will see it in the blocks list. Also, the interface will show “import custom library successfully!”
| align="center" | Create a list with any number of items
<br>[[Image:图片1jhfgjf-27.png|800px|frameless]]<br>
|-


| align="center" | 2 
==Installing Arduino Software==
| align="center" | <br>[[Image:3.6-2.png|800px|frameless]]<br>
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.
| align="center" | Creats a list from a text. (int mylist [ ]={0,0,0};)
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.
<br>[[Image:KS0313-1.png|600px|frameless]]<br>


| align="center" | 3
Then click the '''SOFTWARE''' on the browse bar, you will have two options ONLINE TOOLS and DOWNLOADS.
| align="center" | <br>[[Image:3.6-3.png|400px|frameless]]<br>
<br>[[Image:KS0313-2.png|600px|frameless]]<br>
| align="center" | Creats a list from a text. (int mylist [ ]={0,0,0};)
 
|-
Click '''DOWNLOADS''', it will appear the latest software version of ARDUINO 1.8.5 shown as below. 
<br>[[Image:KS0313-3.png|600px|frameless]]<br>
| align="center" | 4
 
| align="center" | <br>[[Image:3.6-4.png|700px|frameless]]<br>
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.<br>
| align="center" | Returns the value of at the specified position in a list.
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.<br>
<br>[[Image:KS0313-4.png|600px|frameless]]<br>
<br>[[Image:KS0313-5.png|600px|frameless]]<br>


| align="center" | 5 
This way you just need to click JUST DOWNLOAD, then click the downloaded file to install it. <br>
| align="center" | <br>[[Image:3.6-5.png|800px|frameless]]<br>
For non-installed version, first click Windows ZIP file, you will also get the pop-up interface as the above figure.<br>
| align="center" | Sets the value of at the specified position in a list.<br>
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. <br>
Set the first item in mylist to another item.
|-
|}


<br>
<br>
====Installing Arduino (Windows)====
Install Arduino with the exe. Installation package downloaded well.
<br>[[File:Arduino Setup 1.jpg|800px|frameless|thumb]]<br>


====Logic Block====
Click“I Agree”to see the following interface.
[[Image:3.7.png|900px|frameless]]<br>
<br>[[File:Arduino Setup 2.jpg|800px|frameless|thumb]]<br>


{| width="80%" cellspacing="0" border="1"
Click “Next”. Pop up the interface below.
|-
<br>[[File:Arduino Setup 3.jpg|800px|frameless|thumb]]<br>


! align="center" scope="col" | No.
You can press Browse… to choose an installation path or directly type in the directory you want.<br>
! align="center" scope="col" | BLOCK ICON
Then click “Install” to initiate installation.
! align="center" scope="col" | DEFINITION
<br>[[File:Arduino Setup 4.jpg|800px|frameless|thumb]]<br>
|-
| align="center" | 1 
| align="center" | <br>[[Image:3.7-1.png|400px|frameless]]<br>
| align="center" | '''logic comparision'''<br>
'''=:''' Return true if both inputs equal each other.<br>
'''≠:''' Return true if both inputs are not equal to each other.<br>
'''<:''' Return true if the first input is smaller than the second input.<br>
'''≤ :''' Return true if the first input is smaller than or equal to the second input.<br>
'''>:''' Return true if the first input is greater than the second input. <br>
'''≥ :''' Return true if the first input is greater than or equal to the second input.
|-


| align="center" | 2 
Wait for the installing process, if appear the interface of Window Security, just continue to click Install to finish the installation.
| align="center" | <br>[[Image:3.7-2.png|400px|frameless]]<br>
<br>[[File:Arduino1.5.6- setup 5.png|800px|frameless|thumb]]<br>
| align="center" | '''and:'''Return true if both inputs are true;
'''or:''' Return true if at least one of the inputs is true
|-
 
| align="center" | 3
| align="center" | <br>[[Image:3.7-3.png|600px|frameless]]<br>
| align="center" | Returns true if the input is false. Returns false if the input is true.  
|-
| align="center" | 4
| align="center" | <br>[[Image:3.7-4.png|600px|frameless]]<br>
| align="center" | Returns either true or false.
|-
 
| align="center" | 5
| align="center" | <br>[[Image:3.7-5.png|600px|frameless]]<br>
| align="center" | Returns null
|-
 
| align="center" | 6 
| align="center" | <br>[[Image:3.7-6.png|600px|frameless]]<br>
| align="center" | If the first number is true, the second number is returned, otherwise the third number.
|-
|}


<br>
<br>
====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. <br>
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.<br>
<br>[[Image:KS0001-1.jpg|600px|frameless]]<br>
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.<br>
<br>[[Image:Driver 1.png|600px|frameless]]<br>
Then right-click on the device and select the top menu option (Update Driver Software...) shown as the figure below.. 
<br>[[Image:Driver 2.png|600px|frameless]]<br>


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”.
<br>[[Image:Driver 3.png|600px|frameless]]<br>


====Variable Block====
After that, select the option to browseand navigate to the “drivers” folder of Arduino installation.
[[Image:3.8.png|900px|frameless]]<br>
<br>[[Image:KS0286-4.png|800px|frameless]]<br>
 
 
{| width="80%" cellspacing="0" border="1"
Click “Next” and you may get a security warning, if so, allow the software to be installed. Shown as below.
|-
<br>[[Image:Driver 5.png|600px|frameless]]<br>


! align="center" scope="col" | No.
Once the software has been installed, you will get a confirmation message. Installation completed, click “Close”.  
! align="center" scope="col" | BLOCK ICON
<br>[[Image:Driver 6.png|600px|frameless]]<br>
! align="center" scope="col" | DEFINITION
|-
| align="center" | 1 
| align="center" | <br>[[Image:3.8-1.png|800px|frameless]]<br>
| align="center" | Declare and initialize a variable.<br>
Click to select [https://www.arduino.cc/reference/en/language/variables/data-types/int/ '''int'''], [https://www.arduino.cc/reference/en/language/variables/data-types/long/ '''long'''],[https://www.arduino.cc/reference/en/language/variables/data-types/float/ '''float'''], [https://www.arduino.cc/reference/en/language/variables/data-types/boolean/ '''boolean'''], '''[https://www.arduino.cc/reference/en/language/variables/data-types/byte/ byte'''],[https://www.arduino.cc/reference/en/language/variables/data-types/char/  '''char'''], [https://www.arduino.cc/reference/en/language/variables/data-types/string/ '''string''']
|-


| align="center" | 2 
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. 
| align="center" | <br>[[Image:3.8-2.png|600px|frameless]]<br>
<br>[[Image:Driver 7.png|600px|frameless]]<br>
| align="center" | Define the data types
|-
|}


<br>
<br>


'''For example: LED breath'''<br>
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.
<br>[[Image:3.8 LED breath.PNG|800px|frameless]]<br>


==Let’s Get Started With Your Projects==
===Project 1: Hello World===
<br>
<br>
'''Overview'''<br>
[[Image:Arduino_quickstart.jpg|200px|right|thumb|]]
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.<br>
Note that need to use a serial communication software, Arduino IDE.
In the above part, you can check the detailed use of Arduino IDE.<br>


====SerialPort Block====
<br>
[[Image:3.9.png|900px|frameless]]<br>
'''Component Required:''' <br>  
* EASY plug control board*1
* USB cable*1


{| width="80%" cellspacing="0" border="1"
<br>
|-
'''Component Introduction:'''<br>
<br>[[File:ks0397-1.jpg|500px|frameless|thumb]]<br>
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.


! align="center" scope="col" | No.
<br>
! align="center" scope="col" | BLOCK ICON
'''Connect It Up'''<br>
! align="center" scope="col" | DEFINITION
Connect the control board to your computer via a micro USB cable.
|-
<br>[[File:0397Connect1.png|500px|frameless|thumb]]<br>
| align="center" | 1 
<br>
| align="center" | <br>[[Image:3.9-1.png|600px|frameless]]<br>
'''Upload the Code'''<br>
| align="center" | Set the serial buad rate to 9600
Below is an example code for displaying the Hello World!
|-
<pre>
 
int val;
| align="center" | 2 
int ledpin=13;
| align="center" | <br>[[Image:3.9-2.png|400px|frameless]]<br>
void setup()
| align="center" | Write the specified number, text or other value.
{
|-
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!");
}
}
</pre>


| align="center" | 3
<br>
| align="center" | <br>[[Image:3.9-3.png|400px|frameless]]<br>
'''Select the Arduino Board''' <br>
| align="center" | Print the specified number, text or other value on monitor.
Open the Arduino IDE, you’ll need to click the “Tools”, then select the Board that corresponds to your Arduino.
|-
<br>[[File:Arduino Board.png|500px|frameless|thumb]]<br>
| align="center" | 4
| align="center" | <br>[[Image:3.9-4.png|400px|frameless]]<br>
| align="center" | Print the specified number, text or other value on newline of monitor.
|-


| align="center" |
<br>
| align="center" | <br>[[Image:3.9-5.png|600px|frameless]]<br>
'''Select your serial port'''<br>
| align="center" | Print the specified number in hexademical format on newline of monitor.
Select the serial device of the Arduino board from the Tools | Serial Port menu. <br>
|-
<br><span style="color: red">'''Note: ''' to avoid errors, the COM Port should keep the same as the Ports shown on Device Manager.<br>
<br>[[File:serial port.jpg|600px|frameless|thumb]] [[File:serial port2.jpg|400px|frameless|thumb]]<br>
<br>
Then click verify button to check the errors. If compiling successfully, the message "Done compiling" will appear in the status bar.
<br>[[File:serial port3.png|700px|frameless|thumb]]<br>
<br>
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.  
<br>[[File:serial port4.png|700px|frameless|thumb]]<br>


| align="center" | 6
<br>
| align="center" | <br>[[Image:3.9-6.png|600px|frameless]]<br>
'''Open the Serial Monitor''' <br>
| align="center" | If the serial port is available, it returns true, otherwise returns false.<br>
After that, click the monitor button to open the serial monitor.
(generally used in Bluetooth communication)
<br>[[File:Serial Monitor.png|500px|frameless|thumb]]<br>
|-
<br>
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. <br>
| align="center" | 7
Congrats! Your first simple program is complete.<br>
| align="center" | <br>[[Image:3.9-7.png|600px|frameless]]<br>
<br>[[File:Hello World1.png|500px|frameless|thumb]]<br>
| align="center" | Returns a string in serial port
<br>
|-
<span style="color: red">'''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. </span>
| align="center" | 8 
| align="center" | <br>[[Image:3.9-8.png|600px|frameless]]<br>
| align="center" | A string read from serial port to a string variable, pause until read the specified character.
|-
| align="center" | 9 
| align="center" | <br>[[Image:3.9-9.png|600px|frameless]]<br>
| align="center" | Read the serial data by byte (generally used to read the value sent from Bluetooth) (delete the data has been read)
|-
| align="center" | 10
| align="center" | <br>[[Image:3.9-10.png|600px|frameless]]<br>
| align="center" | Wait for the output data completed
|-
| align="center" | 11
| align="center" | <br>[[Image:3.9-11.png|600px|frameless]]<br>
| align="center" | Set the software serial port <br>
(call this function if need to use several serial ports)
|-
| align="center" | 12
| align="center" | <br>[[Image:3.9-12.png|600px|frameless]]<br>
| align="center" | Event function trigger by serial port data, that is, serial port is ready to call this function.<br>  
(equal to an interrupt function)
|-
|}


<br>
<br>
====How To Get Started With Mixly Projects====


'''For example: serial communication'''<br>
*'''Import the Library'''<br>
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”.  
'''1)''' Begin with the Mixly projects, the first step you should import the corresponding library. <br>
<br>[[Image:3.9 Serial port -1.PNG|800px|frameless]]<br>
Open the Mixly 0.998 software, click '''Import'''. Shown below.
<br>[[Image:3.9-13.png|800px|frameless]]<br>
<br>[[File:Mixly 01.png|500px|frameless|thumb]]<br>
 
<br>
<br>
 
'''2)''' Open the folder we provided, you can double-click to open the library '''KS_EasyPulg''' <br>
====Communicate Block====
<br>[[File:Mixly 02.png|500px|frameless|thumb]]<br>
[[Image:Communicate.PNG|900px|frameless]]<br>
<br>[[File:Mixly 03.png|500px|frameless|thumb]]<br>
 
<br>[[File:Mixly 04.png|500px|frameless|thumb]]<br>
{| width="80%" cellspacing="0" border="1"
|-
 
! align="center" scope="col" | No.
! align="center" scope="col" | BLOCK ICON
! align="center" scope="col" | DEFINITION
|-
| align="center" | 1  
| align="center" | <br>[[Image:3.10-1.png|500px|frameless]]<br>
| align="center" | Do something when receiving infrared signals.
<br>[[Image:3.10-1-1.png|500px|frameless]]<br>
|-
 
| align="center" | 2 
| align="center" | <br>[[Image:3.10-2.png|500px|frameless]]<br>
| align="center" | Sends infrared signals of the specified types.<br>
IR transmitter sends the data, here use the libraries, only PIN3 port.
|-
 
| align="center" | 3
| align="center" | <br>[[Image:3.10-3.png|800px|frameless]]<br>
| align="center" | Enable IR decoding
|-
| align="center" | 4
| align="center" | <br>[[Image:3.10-4.png|800px|frameless]]<br>
| align="center" | Print the Infrared signal in RAW types when receiving it.
|-
 
| align="center" | 5 
| align="center" | <br>[[Image:3.10-5.png|800px|frameless]]<br>
| align="center" | Sends RAW infrared signals (set the pin number, list, length of list and IR frequency)
|-
|}
 
 
<br>
<br>
'''For example:''' <br>
'''3)''' If import the custom library successfully, you should see it on the Mixly blocks interface. Shown below.  
You need an Arduino Uno board, an IR receiver module and an IR remote control.<br>
<br>[[File:Mixly 05.png|500px|frameless|thumb]]<br>
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.
<br>[[Image:3.10 ir.PNG|900px|frameless]]<br>


<br>
<br>
====Start with Mixly Project - Saying Hello World====


====Sensor Block====
'''1) Hookup Guide'''<br>
[[Image:Sensor.PNG|1000px|frameless]]<br>
Connect the control board to your computer via a micro USB cable.
<br>[[File:0397Connect1.png|500px|frameless|thumb]]<br>
<br>
'''2) Open the Program''' <br>
Click Open to open your first program Hello World. Follow the steps below.
<br>[[File:0397hello 1.png|500px|frameless|thumb]]<br>
<br>[[File:0397hello 2.png|500px|frameless|thumb]]<br>
<br>[[File:0397hello 3.png|500px|frameless|thumb]]<br>
<br>[[File:0397hello 4.png|500px|frameless|thumb]]<br>
<br>
In fact, you can double click or directly drag the program to open Hello World. Then you should see the Blocks code, shown below.
<br>[[File:0397hello 5.png|500px|frameless|thumb]]<br>
<br>[[File:0397hello 6.png|500px|frameless|thumb]]<br>
<br>
After that, select the proper '''Board''' and '''Port'''. Upload the code to your EASY Plug control board.
<br>[[File:0397hello 7.png|500px|frameless|thumb]]<br>


<br>
'''3) Displaying Hello World''' <br>
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 !
<br>[[File:0397hello 8.png|500px|frameless|thumb]]<br>


{| width="80%" cellspacing="0" border="1"
|-
! align="center" scope="col" | No.
! align="center" scope="col" | BLOCK ICON
! align="center" scope="col" | DEFINITION
|-
| align="center" | 1 
| align="center" | <br>[[Image:3.11-1.png|800px|frameless]]<br>
| align="center" | Set the Trig and Echo pin of ultrasonic sensor.<br>
Returns the distance of ultrasonic sensor measured. ('''unit:''' cm)
|-
| align="center" | 2 
| align="center" | <br>[[Image:3.11-2.png|800px|frameless]]<br>
| align="center" | Set the control pin of DHT11 temperature and humidity sensor. <br>
Returns the temperature or humidity of DHT 11 sensor measured.
|-
| align="center" | 3
| align="center" | <br>[[Image:3.11-3.png|800px|frameless]]<br>
| align="center" | Set the control pin of DHT11 temperature and humidity sensor. <br>
Returns the temperature or humidity of DHT 11 sensor measured.
|-
|}
<br>
<br>
'''For example: ultrasonic ranging'''<br>
'''4) Check Arduino Code''' <br>
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.
What’ more, you can also click to check the Arduino code on the right side. Amazing! So powerful the Mixly blocks code is!
<br>[[Image:3.11-4.png|800px|frameless]]<br>
<br>[[File:0397hello 9.png|500px|frameless|thumb]]<br>
<br>
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!


<br>
<br>


====Actuator Block====
===Project 2: LED Light===
[[Image:Actuator.PNG|1000px|frameless]]<br>


{| width="80%" cellspacing="0" border="1"
'''Overview'''<br>
|-
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.<br>


! align="center" scope="col" | No.
[[image:红绿黄.png|thumb|300px|right|]]
! align="center" scope="col" | BLOCK ICON
'''Component Required'''<br>
! align="center" scope="col" | DEFINITION
* EASY plug control board*1
|-
* EASY plug LED Module *3
| align="center" | 1 
* RJ11 cable*1
| align="center" | <br>[[Image:3.12-1.png|800px|frameless]]<br>
* USB cable*1 
| align="center" | Sets the servo pin;<br>
Moves between 0-180 degree;<br>
Delay time for servo to rotate.
|-


| align="center" | 2 
| align="center" | <br>[[Image:3.12-2.png|800px|frameless]]<br>
| align="center" | Returns that degree with the last servo move.<br>
Read the degree of servo connected to IO pin set
|-


| align="center" | 3
<br>
| align="center" | <br>[[Image:3.12-3.png|800px|frameless]]<br>
'''Component Introduction:'''<br>
| align="center" | Set the pin and specified frequency for buzzer to play sound.  
The LED light modules have shiny colors, ideal for Arduino starters. It can be easily connected to IO/Sensor shield. <br>
|-
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.<br>
* Sensor type: Digital
| align="center" | 4
* Interface: Easy plug
| align="center" | <br>[[Image:3.12-4.png|800px|frameless]]<br>
* PH2.54 socket
| align="center" | Stop playing sound
|-
|}


<br>
<br>
'''For example:''' <br>
'''Connect It Up'''<br>
Connect the signal end of servo to Digital 0 of Uno, then upload the code below, servo will rotate 90 degrees. <br>
Connect the EASY Plug LED module to control board using an RJ11 cable.  
'''Note:''' Delay 100ms is the time required for servo to move.
<br>[[File:ks0101.jpg|500px|frameless|thumb]]<br>
<br>[[Image:3.12-5.png|800px|frameless]]<br>


<br>
<br>
====Example 1: Light up LED====
'''Upload the Code'''<br>
Below is an example code for lighting up an LED.
<br>[[File:ks0397 2.1.png|500px|frameless|thumb]]<br>
<br>
'''What You Should See'''<br>
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.
<br>[[File:ks0398 2-1.png|500px|frameless|thumb]]<br>


<br>


====Monitor Block====
====Example 2: LED Blink====
[[Image:Monitor.PNG|900px|frameless]]<br>
'''Upload the Code'''<br>
Below is an example code for LED blinking.
<br>[[File:ks0398 2.2.png|500px|frameless|thumb]]<br>
<br>
'''What You Should See'''
<br>[[File:ks0398 2-2.png|500px|frameless|thumb]]<br>
The LED will flash on for one second, then blink off for one second. <br>
<br>[[File:ks0398 2-3.png|500px|frameless|thumb]]<br>
If it doesn’t, make sure you have assembled the circuit correctly and verified and uploaded the code to your board.


{| width="80%" cellspacing="0" border="1"
<span style="color: red">'''Little Knowledge:'''</span> <br>
|-
If you want to make the LED flash on and off more quickly or slowly, you can modify the Delay time here.<br>
<br>[[File:ks0398 2-4.png|500px|frameless|thumb]]<br>
Thank you! Enjoy the following programming.


! align="center" scope="col" | No.
<br>
! align="center" scope="col" | BLOCK ICON
 
! align="center" scope="col" | DEFINITION
====Example 3: LED Breath====
|-
Here do you know how to connect the LED module? Check the code.<br>
| align="center" |
'''Test Code'''<br>
| align="center" | <br>[[Image:3.13-1.png|800px|frameless]]<br>
Below is an example code for one LED breathing.<br>
| align="center" | Set the IIC LCD1602 address
<br>[[File:ks0397 2.3.png|500px|frameless|thumb]]<br>
|-
<br>
<span style="color: red">'''Little Knowledge:'''</span> <br>
Here no connection diagram, which port should you choose? Yeah, Pin 5. <br>
See the code, you can modify the connection pin here.<br>
<br>[[File:Little Knowledge2-1.png|500px|frameless|thumb]]<br>
<br>
'''What You Should See'''<br>
The LED gradually becomes brighter for one second, then gradually dimming for one second.
<br>[[File:0397 Result2-3.png|500px|frameless|thumb]]<br>
If it doesn’t, make sure you have assembled the circuit correctly and verified and uploaded the code to your board.


| align="center" | 2 
| align="center" | <br>[[Image:3.13-2.png|800px|frameless]]<br>
| align="center" | Input the value on LCD line 1 and line 2 from left to right.
|-
| align="center" | 3
| align="center" | <br>[[Image:3.13-3.png|800px|frameless]]<br>
| align="center" | Set the row and column of LCD to print the char
|-
| align="center" | 4
| align="center" | <br>[[Image:3.13-4.png|500px|frameless]]<br>
| align="center" | Clear the LCD screen
|-


| align="center" | 5 
<br>
| align="center" | <br>[[Image:3.13-5.png|800px|frameless]]<br>
| align="center" | Set the control pin and the number of RGB light.
|-


| align="center" | 6
====Example 4: Brighten and Dim====
| align="center" | <br>[[Image:3.13-6.png|800px|frameless]]<br>
'''Hookup Guide'''<br>
| align="center" | Set the RGB light pin, light number and brightness
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.
|-
<br>[[File:黄绿红三灯.jpg|500px|frameless|thumb]]<br>
<br>
| align="center" | 7
'''Upload the Code'''<br>
| align="center" | <br>[[Image:3.13-7.png|800px|frameless]]<br>
Below is an example code for three LED modules experiment.
| align="center" | Set the control pin, light number and color. (click to select the color)
<br>[[File:ks0397 2.4.1.png|500px|frameless|thumb]]<br>
|-
<br>[[File:ks0397 2.4.2.png|500px|frameless|thumb]]<br>
| align="center" | 8 
| align="center" | <br>[[Image:3.13-8.png|800px|frameless]]<br>
| align="center" | Clear the data, namely turn off digital display
|-
| align="center" | 9 
| align="center" | <br>[[Image:3.13-9.png|800px|frameless]]<br>
| align="center" | Four-digit display, displaying abcd.
|-
| align="center" | 10
| align="center" | <br>[[Image:3.13-10.png|800px|frameless]]<br>
| align="center" | Turn on or off the digitdisplay <br>
(here turn on the first digitdisplay)
|-
|}


<br>
<br>
'''For example: serial communication'''<br>
'''What You Should See'''<br>
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.<br>
The three LEDs are gradually brighter then gradually off one by one, circularly. <br>
<br>[[Image:3.13 LCD16002.PNG|800px|frameless]]<br>
If it doesn’t, make sure you have assembled the circuit correctly and verified and uploaded the code to your board.
<br>[[File:ks0398 2-5.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 2-6.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 2-7.png|500px|frameless|thumb]]<br>


<br>
<br>
 
'''<span style="color: red"> Troubleshooting''' </span> <br>
====Functions Block====
* '''LED Not Lighting Up?'''<br>
[[Image:Function.PNG|800px|frameless]]<br>
If upload the code successfully, but LED still not lights up. Make sure your board and LED module are connected correctly.
 
<br>  
{| width="80%" cellspacing="0" border="1"
*'''Program Not Uploading?'''<br>
|-
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 2-5.png|500px|frameless|thumb]]<br>
! align="center" scope="col" | No.
! align="center" scope="col" | BLOCK ICON
! align="center" scope="col" | DEFINITION
|-
| align="center" | 1 
| align="center" | <br>[[Image:3.14-1.png|500px|frameless]]<br>
| align="center" | Creates a function with no output.<br>
Click the blue icon to set the procedure parameter.(no return value)
|-
 
| align="center" | 2 
| align="center" | <br>[[Image:3.14-2.png|500px|frameless]]<br>
| align="center" | Creates a function with an output.<br>
Click the blue icon to set the procedure parameter.<br>
(with return value and can set the data types)
|-
 
| align="center" | 3
| align="center" | <br>[[Image:3.14-3.png|500px|frameless]]<br>
| align="center" | If a value is true, then return a second value.
|-
|}


<br>
<br>
'''For example: ultrasonic ranging'''<br>
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.
<br>[[Image:图片1-mixly 3.14.png|800px|frameless]]<br>
<br>[[Image:3.14-4.png|800px|frameless]]<br>


<br>
===Project 3: Knocking===
'''Overview'''<br>
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.
We will make a simple experiment, testing the knock sensor.


'''Component Required'''<br>
* EASY plug control board*1
* EASY plug Knock Sensor *1
* RJ11 cable *2
* USB cable*1


==Installing Arduino Software==
'''Component Introduction''' <br>
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.  
[[image:ks0114图.jpg|thumb|600px|right|EASY plug Knock Sensor ]]
You can download it from the link below:
The knock sensor is mainly composed of SW-280 vibration switch, which is an inductive proximity switch.
https://www.arduino.cc/en/Main/OldSoftwareReleases#1.5.x
It is an electronic switch that transmits the sensing result to the circuit device and induces the circuit to start working when the vibration force is induced.  
Or you can browse the ARDUINO website to download the latest version from this link, https://www.arduino.cc, pop up the following interface.
The module comes with a positioning hole for you to fix it to other devices.
<br>[[Image:KS0313-1.png|600px|frameless]]<br>
You can make full use of it with creative thinking, like electronic drum, and so on.
* Connector: Easy plug
* Working voltage: 5V
* Sensor type: Digital


Then click the '''SOFTWARE''' on the browse bar, you will have two options ONLINE TOOLS and DOWNLOADS.  
<br>
<br>[[Image:KS0313-2.png|600px|frameless]]<br>
'''Connect It Up'''<br>
Connect the EASY Plug knock sensor to control board using an RJ11 cable.  
<br>[[File:敲击灯.jpg|500px|frameless|thumb]]<br>


Click '''DOWNLOADS''', it will appear the latest software version of ARDUINO 1.8.5 shown as below. 
<br>
<br>[[Image:KS0313-3.png|600px|frameless]]<br>
'''Upload the Code'''<br>
<br>[[File:Ks0398 3.1.png|500px|frameless|thumb]]<br>


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.<br>
<br>
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.
'''What You Should See'''<br>
For simple installed version, first click '''Windows Installer''', you will get the following page.<br>
Done uploading the code, if knock the module hard, the led will be turned on.
<br>[[Image:KS0313-4.png|600px|frameless]]<br>
<br>[[File:ks0398 3-1.png|500px|frameless|thumb]]<br>
<br>[[Image:KS0313-5.png|600px|frameless]]<br>
<br>[[File:ks0398 3-3.png|500px|frameless|thumb]]<br>


This way you just need to click JUST DOWNLOAD, then click the downloaded file to install it. <br>
===Project 4: How much light===
For non-installed version, first click Windows ZIP file, you will also get the pop-up interface as the above figure.<br>
'''Overview'''<br>
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. <br>
In this project, you’ll be using a photo resistor module, which changes resistance based on how much light the sensor receives.  


<br>
'''Component Required'''<br>
====Installing Arduino (Windows)====
* EASY plug control board*1
Install Arduino with the exe. Installation package downloaded well.
* EASY plug Photocell Sensor *1
<br>[[File:Arduino Setup 1.jpg|800px|frameless|thumb]]<br>
* EASY plug LED module*1
* RJ11 cable *2
* USB cable*1


Click“I Agree”to see the following interface.
<br>[[File:Arduino Setup 2.jpg|800px|frameless|thumb]]<br>


Click “Next”. Pop up the interface below.  
'''Component Introduction'''  <br>
<br>[[File:Arduino Setup 3.jpg|800px|frameless|thumb]]<br>
[[image:Ks0106.png|thumb|600px|right|EASY plug Photocell Sensor]]
A photoresistor or light-dependent resistor (LDR) or photocell is a light-controlled variable resistor. The principal is very simple.
The resistance of photoresistor varies with incident light intensity.
If the incident light intensity is high, the resistance decreases; if the light intensity is low, the resistance increases.
keyestudio EASY Plug photocell sensor is a semiconductor, integrated with a photoresistor, easy to use and very convenient for wiring.
It has features of high sensitivity, quick response, spectral characteristic and R-value consistence.
It can be applied in light-sensitive detector circuits, intelligent switch design and light- and dark-activated switching circuits.
* Interface: Easy plug
* Working voltage: 5V
<br>
'''Connect It Up'''<br>
Connect the EASY Plug photocell sensor to control board using an RJ11 cable.  
<br>[[File:光敏.jpg|500px|frameless|thumb]]<br>


You can press Browse… to choose an installation path or directly type in the directory you want.<br>
'''Upload the Code'''<br>
Then click “Install” to initiate installation.
<br>[[File:ks0398 4.1.png|500px|frameless|thumb]]<br>
<br>[[File:Arduino Setup 4.jpg|800px|frameless|thumb]]<br>
 
Wait for the installing process, if appear the interface of Window Security, just continue to click Install to finish the installation.
<br>[[File:Arduino1.5.6- setup 5.png|800px|frameless|thumb]]<br>


<br>
<br>
====Installing Driver====
'''What You Should See'''<br>
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. <br>
Done uploading the code, you should see the analog value change in accordance with how much light your photoresistor is sensing.  
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.<br>
<br>[[File:ks0398 4-1.png|500px|frameless|thumb]]<br>
<br>[[Image:KS0001-1.jpg|600px|frameless]]<br>
<br>[[File:ks0398 4-2.png|500px|frameless|thumb]]<br>
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.<br>
<br>[[Image:Driver 1.png|600px|frameless]]<br>
Then right-click on the device and select the top menu option (Update Driver Software...) shown as the figure below.. 
<br>[[Image:Driver 2.png|600px|frameless]]<br>


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”.
<br>[[Image:Driver 3.png|600px|frameless]]<br>


After that, select the option to browseand navigate to the “drivers” folder of Arduino installation.  
====Controlling light brightness====
<br>[[Image:KS0286-4.png|800px|frameless]]<br>
'''Hookup Guide'''<br>
Connect the EASY Plug photocell sensor and LED module to control board using RJ11 cable.
<br>[[File:光敏灯.jpg|500px|frameless|thumb]]<br>
<br>
'''Test Code'''<br>
Below is an example code for three LED modules experiment.
<br>[[File:ks0398 4.2.png|500px|frameless|thumb]]<br>


Click “Next” and you may get a security warning, if so, allow the software to be installed. Shown as below.  
<br>
<br>[[Image:Driver 5.png|600px|frameless]]<br>
'''What You Should See'''<br>
The three LEDs are gradually brighter then gradually off one by one, circularly. <br>
If it doesn’t, make sure you have assembled the circuit correctly and verified and uploaded the code to your board.
<br>[[File:ks0398 4-3.png|500px|frameless|thumb]]<br>


Once the software has been installed, you will get a confirmation message. Installation completed, click “Close”.
<br>
<br>[[Image:Driver 6.png|600px|frameless]]<br>


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.    
===Project 5: Buzzer clicking===
<br>[[Image:Driver 7.png|600px|frameless]]<br>
'''Overview'''<br>
In this project, we’ll bridge the gap between the digital world and the analog world. We’ll be using a buzzer module that makes a small “click” when you apply voltage to it (try it!). 
 
'''Component Required'''<br>
* EASY plug control board*1
* EASY plug Passive Buzzer Module*1
* RJ11 cable*1
* USB cable*1    
 
'''Component Introduction'''  <br>
[[image:Ks0103-1-.png|thumb|600px|right|EASY plug Passive Buzzer Module]]<br>
We can use Arduino to make many interactive works of which the most commonly used is acoustic-optic display. <br>
The buzzer we introduced here is a passive buzzer. It cannot be actuated by itself, but by external pulse frequencies. <br>
Different frequencies produce different sounds. You can use Arduino to code the melody of a song, which is quite fun and simple.<br>
* Interface: Easy plug
* Working voltage: 3.3-5v
* Sensor type: digital


<br>
<br>
'''Connect It Up'''<br>
Connect the EASY Plug passive buzzer module to control board using an RJ11 cable.
<br>[[File:Ks0103-2-.png|700px|frameless|thumb]]<br>


'''Upload the Code'''<br>
<br>[[File:ks0398 5.1.png|500px|frameless|thumb]]<br>


==Let’s Get Started With Your Projects==
===Project 1: Hello World===
<br>
<br>
'''What You Should See'''<br>
Done uploading the code, you should be able to hear the buzzer module make a small “click”.
<br>[[File:ks0398 5-1.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 5-2.png|500px|frameless|thumb]]<br>
===Project 6: Capacitive Touch===
'''Overview'''<br>
'''Overview'''<br>
[[Image:Arduino_quickstart.jpg|200px|right|thumb|]]
Are you tired of clicking mechanic buttons? Well, try our capacitive touch sensor. In this project, we’ll use the EASY Plug touch sensor to make a simple test.  
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.<br>
Note that need to use a serial communication software, Arduino IDE.
In the above part, you can check the detailed use of Arduino IDE.<br>


<br>
'''Component Required'''<br>
'''Component Required:''' <br>  
* EASY plug control board*1
* EASY plug control board*1
* EASY plug Touch Sensor *1
* EASY plug LED Module *1
* RJ11 cable *2
* USB cable*1
* USB cable*1


<br>
'''Component Introduction''' <br>
'''Component Introduction:'''<br>
[[image:ks0113图.jpg|thumb|600px|right|EASY plug Capacitive Touch Sensor ]]
<br>[[File:ks0397-1.jpg|500px|frameless|thumb]]<br>
You can find touch sensors mostly on electronic device. Instead of buttons, upgrade your Arduino project with our new version touch sensor and make it cool!<br>
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.
This EASY Plug digital capacitive touch sensor provides a one-touch style switch on your Arduino project. It uses the most popular capacitive sensing technology which is the same as your mobile phone.<br>
This little sensor can "feel" people and metal touch and feedback a high/low voltage level. Even isolated by some cloth and paper, it can still feel the touch. The sensitivity will decrease as the isolation getting thick.
* Supply Voltage: 3.3V to 5V
* Sensor type: Digital
* Function range: 0℃ to 100℃


<br>
'''Connect It Up'''<br>
'''Connect It Up'''<br>
Connect the control board to your computer via a micro USB cable.  
Connect the EASY Plug touch sensor and LED module to control board using RJ11 cable.  
<br>[[File:0397Connect1.png|500px|frameless|thumb]]<br>
<br>[[File:触摸灯.jpg|500px|frameless|thumb]]<br>
<br>
'''Upload the Code'''<br>
Below is an example code for displaying the Hello World!
<pre>
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!");
}
}
</pre>


<br>
<br>
'''Select the Arduino Board''' <br>
'''Test Code'''<br>
Open the Arduino IDE, you’ll need to click the “Tools”, then select the Board that corresponds to your Arduino.
Below is an example code.
<br>[[File:Arduino Board.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 6.1.png|500px|frameless|thumb]]<br>


<br>
<br>
'''Select your serial port'''<br>
'''What You Should See'''<br>
Select the serial device of the Arduino board from the Tools | Serial Port menu. <br>
Done uploading the code, when you touch the sensor, the led on the sensor will light up.
<br><span style="color: red">'''Note: ''' to avoid errors, the COM Port should keep the same as the Ports shown on Device Manager.<br>
<br>[[File:ks0398 6-3.png|500px|frameless|thumb]]<br>
<br>[[File:serial port.jpg|600px|frameless|thumb]] [[File:serial port2.jpg|400px|frameless|thumb]]<br>
<br>
Then click verify button to check the errors. If compiling successfully, the message "Done compiling" will appear in the status bar.
<br>[[File:serial port3.png|700px|frameless|thumb]]<br>
<br>
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.  
<br>[[File:serial port4.png|700px|frameless|thumb]]<br>


<br>
Open the monitor, it will print out the value read from the touch sensor.
'''Open the Serial Monitor''' <br>
<br>[[File:ks0398 6-2.png|500px|frameless|thumb]]<br>
After that, click the monitor button to open the serial monitor.
<br>[[File:Serial Monitor.png|500px|frameless|thumb]]<br>
<br>
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. <br>
Congrats! Your first simple program is complete.<br>
<br>[[File:Hello World1.png|500px|frameless|thumb]]<br>
<br>
<span style="color: red">'''Note: '''</span>  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.


<br>
<br>
====How To Get Started With Mixly Projects====
====Simulating Table Lamp====
'''Test Code'''<br>
<br>[[File:ks0398 6.2.png|800px|frameless|thumb]]<br>
 
'''What You Should See'''<br>
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>
<br>[[File:ks0398 6-5.png|500px|frameless|thumb]]<br>
 
Open the monitor, you should be able to see how many times do you touch the sensor.
<br>[[File:ks0398 6-4.png|500px|frameless|thumb]]<br>


'''* Import the Library'''<br>
'''1)''' Begin with the Mixly projects, the first step you should import the corresponding library. <br>
Open the Mixly 0.998 software, click '''Import'''. Shown below.
<br>[[File:Mixly 01.png|500px|frameless|thumb]]<br>
<br>
<br>
'''2)''' Open the folder we provided, you can double-click to open the library '''KS_EasyPulg''' <br>
<span style="color: red">'''Troubleshooting:'''</span> <br>
<br>[[File:Mixly 02.png|500px|frameless|thumb]]<br>
* '''Program Not Uploading?'''<br>
<br>[[File:Mixly 03.png|500px|frameless|thumb]]<br>
This happens sometimes, the most likely case is a confused Board and serial port, you should firstly select your proper board and port. <br>
<br>[[File:Mixly 04.png|500px|frameless|thumb]]<br>
If it doesn’t, make sure you have assembled the circuit correctly and verified and uploaded the code to your board. <br>
<br>
<br>[[File:ks0398 6-6.png|500px|frameless|thumb]]<br>
'''3)''' If import the custom library successfully, you should see it on the Mixly blocks interface. Shown below.
 
<br>[[File:Mixly 05.png|500px|frameless|thumb]]<br>


<br>
<br>
====Start with Mixly Project - Saying Hello World====


'''1) Hookup Guide'''<br>
===Project 7: Fire extinguishing ===
Connect the control board to your computer via a micro USB cable.
'''Overview'''<br>
<br>[[File:0397Connect1.png|500px|frameless|thumb]]<br>
How to blow out the fire? You might be able to use this fan module to add  flavor to your own interesting projects.  
<br>
'''2) Open the Program''' <br>
Click Open to open your first program Hello World. Follow the steps below.
<br>[[File:0397hello 1.png|500px|frameless|thumb]]<br>
<br>[[File:0397hello 2.png|500px|frameless|thumb]]<br>
<br>[[File:0397hello 3.png|500px|frameless|thumb]]<br>
<br>[[File:0397hello 4.png|500px|frameless|thumb]]<br>
<br>
In fact, you can double click or directly drag the program to open Hello World. Then you should see the Blocks code, shown below.
<br>[[File:0397hello 5.png|500px|frameless|thumb]]<br>
<br>[[File:0397hello 6.png|500px|frameless|thumb]]<br>
<br>
After that, select the proper '''Board''' and '''Port'''. Upload the code to your EASY Plug control board.
<br>[[File:0397hello 7.png|500px|frameless|thumb]]<br>


<br>
'''Component Required'''<br>
'''3) Displaying Hello World''' <br>
* EASY plug control board*1
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.  
* EASY plug Fan Motor Module*1 
Congrats! You make it !
* RJ11 cable*1
<br>[[File:0397hello 8.png|500px|frameless|thumb]]<br>
* USB cable*1 
 
'''Component Introduction'''  
[[image:ks0241图.jpg|thumb|600px|right|EASY plug Fan Motor Module ]]
The fan motor module uses the L9110 driver to control the forward and reverse rotation of propeller, which can easily blow out the fire of a lighter 20cm away.<br>
It should be connected to the double digital port with only one line, pretty convenient.<br>
Make an air aerial propeller vessel, a cooling system, or spinning machine with this small fan module. Add flavor to your own interesting projects with this module. This module is commonly used for STEM class.
* Fan diameter: 75mm
* Interface: double digital
* Working voltage: 5V
 
'''Connect It Up'''<br>
Connect the EASY Plug fan motor module to control board using an RJ11 cable.
<br>[[File:KS0241.jpg|500px|frameless|thumb]]<br>
 
'''Upload the Code'''<br>
<br>[[File:ks0398 7.1.png|500px|frameless|thumb]]<br>
 
'''What You Should See'''<br>
Done uploading the code, the motor fan will rotate forward for 3 seconds, and then rotate reverse for 3 seconds, repeatedly.
<br>[[File:ks0241 Result.png|500px|frameless|thumb]]<br>


<br>
<br>
'''4) Check Arduino Code''' <br>
What’ more, you can also click to check the Arduino code on the right side. Amazing! So powerful the Mixly blocks code is!
<br>[[File:0397hello 9.png|500px|frameless|thumb]]<br>
<br>
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!


<br>
===Project 8: There’s flame===
===Project 2: LED Light===


'''Overview'''<br>
'''Overview'''<br>
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.<br>
What's the simplest way to check the fire happened? Use a flame sensor. In this project, we simply test the flame sensor to turn on led if detecting flame.  


[[image:红绿黄.png|thumb|300px|right|]]
'''Component Required'''<br>
'''Component Required'''<br>
* EASY plug control board*1
* EASY plug control board*1
* EASY plug LED Module *3
* EASY plug Flame Sensor *1 
* RJ11 cable*1
* EASY plug LED Module*1
* USB cable*1
* EASY plug Fan Motor*1
 
* RJ11 cable *2
 
* USB cable*1
<br>
<br>
'''Component Introduction:'''<br>
'''Component Introduction'''
The LED light modules have shiny colors, ideal for Arduino starters. It can be easily connected to IO/Sensor shield. <br>
[[image:ks0116图.jpg|thumb|600px|right|EASY plug Flame Sensor Module]] 
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.<br>
The flame sensor can be used to detect fire or other wavelength at 760nm ~1100nm light. <br>
* Sensor type: Digital
In the fire-fighting robot game, the flame plays an important role in the probe, which can be used as the robot's eyes to find fire source.<br>
* Interface: Easy plug
The potentiometer on the flame sensor can be used to adjust the sensitivity.<br>
* PH2.54 socket
* Supply Voltage: 3.3V to 5V
* Detection range: 500px (4.8V) ~ 2500px (1V)
* Spectral Bandwidth Range: 760nm ~ 1100nm
* Operating temperature: -25℃ to 85℃
* Sensor type: digital


<br>
<br>
'''Connect It Up'''<br>
'''Connect It Up'''<br>
Connect the EASY Plug LED module to control board using an RJ11 cable.  
Connect the EASY Plug Flame Sensor and LED module to control board using RJ11 cables.  
<br>[[File:ks0101.jpg|500px|frameless|thumb]]<br>
<br>[[File:火焰灯.jpg|500px|frameless|thumb]]<br>


<br>
<br>
====Example 1: Light up LED====
'''Upload the Code'''<br>
'''Upload the Code'''<br>
Below is an example code for lighting up an LED.
<br>[[File:ks0398 8.1.png|500px|frameless|thumb]]<br>
<br>[[File:ks0397 2.1.png|500px|frameless|thumb]]<br>
 
<br>
<br>
'''What You Should See'''<br>
'''What You Should See'''<br>
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.  
Done uploading the code, put a lighter close to the flame sensor. Once the sensor detects the flame, the led lights up. <br>
<br>[[File:ks0398 2-1.png|500px|frameless|thumb]]<br>
If isn’t, you are able to adjust the sensitivity by a potentiometer.
<br>[[File:ks0398 8-1.png|500px|frameless|thumb]]<br>


<br>
<br>
<span style="color: red">''' Little Knowledge:'''</span> <br>
* You are able to adjust the sensitivity by a blue potentiometer on the sensor.
[[image:ks0116图.jpg|thumb|600px|right|EASY plug Flame Sensor Module]] 
<br>
====Simulating Fire Extinguisher ====


====Example 2: LED Blink====
Let’s go into an interesting project. When detecting the flame by flame sensor, the fan motor will rotate to blow out the fire.  
'''Upload the Code'''<br>
Below is an example code for LED blinking.
<br>[[File:ks0398 2.2.png|500px|frameless|thumb]]<br>
<br>
<br>
'''What You Should See'''
'''Hookup Guide'''<br>
<br>[[File:ks0398 2-2.png|500px|frameless|thumb]]<br>
<br>[[File:火焰电机.jpg|500px|frameless|thumb]]<br>
The LED will flash on for one second, then blink off for one second. <br>
<br>[[File:ks0398 2-3.png|500px|frameless|thumb]]<br>
If it doesn’t, make sure you have assembled the circuit correctly and verified and uploaded the code to your board.
 
<span style="color: red">'''Little Knowledge:'''</span> <br>
If you want to make the LED flash on and off more quickly or slowly, you can modify the Delay time here.<br>
<br>[[File:ks0398 2-4.png|500px|frameless|thumb]]<br>
Thank you! Enjoy the following programming.


<br>
<br>
'''Test Code'''<br>
<br>[[File:0398----1.png|500px|frameless|thumb]]<br>


====Example 3: LED Breath====
Here do you know how to connect the LED module? Check the code.<br>
'''Test Code'''<br>
Below is an example code for one LED breathing.<br>
<br>[[File:ks0397 2.3.png|500px|frameless|thumb]]<br>
<br>
<span style="color: red">'''Little Knowledge:'''</span> <br>
Here no connection diagram, which port should you choose? Yeah, Pin 5. <br>
See the code, you can modify the connection pin here.<br>
<br>[[File:Little Knowledge2-1.png|500px|frameless|thumb]]<br>
<br>
<br>
'''What You Should See'''<br>
'''What You Should See'''<br>
The LED gradually becomes brighter for one second, then gradually dimming for one second.  
Done uploading the code, put a lighter close to the flame sensor. Once the sensor detects the flame, you should see the fan motor run.  
<br>[[File:0397 Result2-3.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 8-2.png|500px|frameless|thumb]]<br>
If it doesn’t, make sure you have assembled the circuit correctly and verified and uploaded the code to your board.
 


<br>
<br>


====Example 4: Brighten and Dim====
===Project 9: Avoiding obstacles===
'''Hookup Guide'''<br>
'''Overview'''<br>
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.
Why some intelligent robots can automatically avoid an obstacle ahead? Easily, use an obstacle avoidance sensor. In this project, we’ll simply test the obstacle avoidance sensor.  
<br>[[File:黄绿红三灯.jpg|500px|frameless|thumb]]<br>
 
<br>
'''Component Required'''<br>
'''Upload the Code'''<br>
* EASY plug control board*1
Below is an example code for three LED modules experiment.
* EASY plug obstacle detector sensor *1
<br>[[File:ks0397 2.4.1.png|500px|frameless|thumb]]<br>
* EASY plug LED module *1
<br>[[File:ks0397 2.4.2.png|500px|frameless|thumb]]<br>
* EASY plug motor *1 
* RJ11 cable *2
* USB cable*1 
 
'''Component Introduction'''
[[image:ks0120图.jpg|thumb|600px|right|EASY plug Obstacle Avoidance Sensor]]
Infrared obstacle avoidance sensor is equipped with distance adjustment function and is especially designed for wheeled robots. <br>
This sensor has strong adaptability to ambient light and is of high precision. It has a pair of infrared transmitting and receiving tube. <br>
When infrared ray launched by the transmitting tube encounters an obstacle (its reflector), the infrared ray is reflected to the receiving tube, after a comparator circuit processing, the indicator will light up. <br>
You can adjust the detection distance by rotating the potentiometer knob, the effective distance range of 2~40cm. <br>
They can be widely used in robot obstacle avoidance, avoidance car, line count, and black and white line tracking and many other occasions.<br>
* Working voltage: DC 3.3V-5V
* Working current: ≥20mA
* Working temperature: -10℃ to+50℃
* Detection distance: 2~40cm
* Output signal: TTL voltage
* Effective Angle: 35°


<br>
<br>
'''What You Should See'''<br>
'''Connect It Up'''<br>
The three LEDs are gradually brighter then gradually off one by one, circularly. <br>
Connect the EASY Plug obstacle detector sensor and LED module to control board using RJ11 cables.  
If it doesn’t, make sure you have assembled the circuit correctly and verified and uploaded the code to your board.
<br>[[File:避障灯.jpg|500px|frameless|thumb]]<br>
<br>[[File:ks0398 2-5.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 2-6.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 2-7.png|500px|frameless|thumb]]<br>
 
<br>
<br>
'''<span style="color: red"> Troubleshooting''' </span> <br>
* '''LED Not Lighting Up?'''<br>
If upload the code successfully, but LED still not lights up. Make sure your board and LED module are connected correctly.
<br>
*'''Program Not Uploading?'''<br>
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 2-5.png|500px|frameless|thumb]]<br>


'''Test Code'''<br>
<br>[[File:0398----6.png|500px|frameless|thumb]]<br>
<br>
<br>


===Project 3: Knocking===
'''What You Should See'''<br>
'''Overview'''<br>
<br>[[File:0398----7.png|500px|frameless|thumb]]<br>
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.
Done uploading the code, when the sensor detects an obstacle, the led is turned on.
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.
<br>[[File:ks0398 9-2.png|500px|frameless|thumb]]<br>
We will make a simple experiment, testing the knock sensor.
 
'''Component Required'''<br>
* EASY plug control board*1
* EASY plug Knock Sensor *1
* RJ11 cable *2
* USB cable*1
 
'''Component Introduction''' <br>
[[image:ks0114图.jpg|thumb|600px|right|EASY plug Knock Sensor ]]
The knock sensor is mainly composed of SW-280 vibration switch, which is an inductive proximity switch.
It is an electronic switch that transmits the sensing result to the circuit device and induces the circuit to start working when the vibration force is induced.
The module comes with a positioning hole for you to fix it to other devices.
You can make full use of it with creative thinking, like electronic drum, and so on.  
* Connector: Easy plug
* Working voltage: 5V
* Sensor type: Digital


<br>
<br>
'''Connect It Up'''<br>
====Controlling Motor ====
Connect the EASY Plug knock sensor to control board using an RJ11 cable.
In the previous section, we use the obstacle detector sensor to control the LED on and off. Now, let’s try another play, controlling the motor rotating.
<br>[[File:敲击灯.jpg|500px|frameless|thumb]]<br>
<br>
 
'''Hookup Guide'''<br>
<br>[[File:避障电机.jpg|500px|frameless|thumb]]<br>
<br>
<br>
'''Upload the Code'''<br>
'''Test Code'''<br>
<br>[[File:ks0398 2.1.png|500px|frameless|thumb]]<br>
<br>[[File:0398----8.png|700px|frameless|thumb]]<br>
 
 
<br>
<br>
'''What You Should See'''<br>
'''What You Should See'''<br>
Done uploading the code, if knock the module hard, the led will be turned on.
Done uploading the code, when the sensor detects an obstacle, the fan motor rotates. Otherwise, fan motor stops.
<br>[[File:ks0398 3-1.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 9-3.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 3-3.png|500px|frameless|thumb]]<br>
<br>
 
<span style="color: red">'''Troubleshooting:'''</span> <br>
* '''Compiling Fails ?'''<br>
This happens sometimes, the most likely case is a library file not added.  You should be sure that all the libraries are added to the libraries directory of Arduino-1.8.5. Shown below.<br>
<br>[[File:ks0398 9-4.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 9-5.png|500px|frameless|thumb]]<br>
* '''Program Not Uploading?'''<br>
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:0398----2.png|500px|frameless|thumb]]<br>
<br>


===Project 4: How much light===
===Project 10: Servo===  
'''Overview'''<br>
'''Overview'''<br>
In this project, you’ll be using a photo resistor module, which changes resistance based on how much light the sensor receives.  
This lesson we are going to rotate the servo motor.


'''Component Required'''<br>
'''Component Required'''<br>
* EASY plug control board*1
* EASY plug control board*1
* EASY plug Photocell Sensor *1
* EASY plug Servo Module *1
* EASY plug LED module*1
* Keyestudio Micro Servo *1
* RJ11 cable *2
* RJ11 cable *1
* USB cable*1
* USB cable*1  
 
<br> 
'''Component Introduction''' <br>
If you want to use the Micro Servo and EASY PLUG control board to do some experiments, you need to use the EASY plug Servo extension module. <br>
The EASY plug Servo module is extended into Registered Jack, so you can connect it to EASY PLUG control board using only a RJ11 cable.<br>
The Servo module also comes with 3pins of 2.54mm pin pitch, fully compatible with servo pins.<br>
[[image:ks0372图.jpg|thumb|600px|right|EASY plug Servo Module +Micro Servo]]<br>
Servo motor comes with many specifications. But all of them have three connection wires, distinguished by brown, red, orange colors. Brown one is for ground, red one for power positive, orange one for signal line.<br>
Included with your Micro Servo you will find a variety of white motor mounts that connect to the shaft of your servo. <br>
You may choose to attach any mount you wish for the circuit. It will serve as a visual aid, making it easier to see the servo spin.<br>


'''Component Introduction'''  <br>  
The rotation angle of servo is controlled by regulating the duty cycle of the PWM(Pulse-Width Modulation) signal. <br>
[[image:Ks0106.png|thumb|600px|right|EASY plug Photocell Sensor]]
The standard cycle of the PWM signal is fixed at 20ms (50 Hz), and the pulse width is distributed between 1ms-2ms. <br>
A photoresistor or light-dependent resistor (LDR) or photocell is a light-controlled variable resistor. The principal is very simple.
The pulse width corresponds to the rotation angle ( 0°~90°) of servo. <br>
The resistance of photoresistor varies with incident light intensity.
<br>[[File:ks0372 Servo.jpg|500px|frameless|thumb]]<br>
If the incident light intensity is high, the resistance decreases; if the light intensity is low, the resistance increases.
keyestudio EASY Plug photocell sensor is a semiconductor, integrated with a photoresistor, easy to use and very convenient for wiring.
It has features of high sensitivity, quick response, spectral characteristic and R-value consistence.
It can be applied in light-sensitive detector circuits, intelligent switch design and light- and dark-activated switching circuits.  
* Interface: Easy plug
* Working voltage: 5V
<br>
<br>
'''Connect It Up'''<br>
'''Micro Servo Parameters'''<br>
Connect the EASY Plug photocell sensor to control board using an RJ11 cable.  
* Operating voltage: DC 4.8V〜6V
<br>[[File:光敏.jpg|500px|frameless|thumb]]<br>
* Angle range: about 90°(in 1000→2000μsec)
 
* Pulsewidth range: 1000→2000μsec
'''Upload the Code'''<br>
* No-load speed: 0.12±0.01 sec/60(DC 4.8V); 0.1±0.01 sec/60(DC 6V)
<br>[[File:ks0398 4.1.png|500px|frameless|thumb]]<br>
* No-load current: 200±20mA(DC 4.8V); 220±20mA(DC 6V)
* Stop torque: 1.1±0.01kg/cm(DC 4.8V); 1.3±0.1kg/cm(DC 6V)
* Stop current: 600±30mA(DC 4.8V); 750±30mA(DC 6V)
* Standby current: 4±1mA(DC 4.8V); 4±1mA(DC 6V)
* Operation temperature: -10℃〜50℃
* Save temperature: -20℃〜60℃
* Motor wire length: 250 ± 5 mm


<br>
<br>
'''What You Should See'''<br>
'''Connect It Up'''<br>
Done uploading the code, you should see the analog value change in accordance with how much light your photoresistor is sensing.
Connect the servo motor to EASY Plug Servo module. Brown line is for ground, red one for V pin, orange one for signal pin.
<br>[[File:ks0398 4-1.png|500px|frameless|thumb]]<br>
Then connect them to control board using an RJ11 cable. <br>
<br>[[File:ks0398 4-2.png|500px|frameless|thumb]]<br>
<br>[[File:KS0372.jpg|600px|frameless|thumb]]<br>
 
 
====Controlling light brightness====
'''Hookup Guide'''<br>
Connect the EASY Plug photocell sensor and LED module to control board using RJ11 cable.  
<br>[[File:光敏灯.jpg|500px|frameless|thumb]]<br>
<br>
<br>
'''Test Code'''<br>
'''Upload the Code'''
Below is an example code for three LED modules experiment.
<br>[[File:ks0398 10.1.png|1000px|frameless|thumb]]<br>
<br>[[File:ks0398 4.2.png|500px|frameless|thumb]]<br>
 
<br>
<br>
'''What You Should See'''<br>
'''What You Should See'''<br>
The three LEDs are gradually brighter then gradually off one by one, circularly. <br>
<br>[[File:ks0398 10-1.png|500px|frameless|thumb]]<br>
If it doesn’t, make sure you have assembled the circuit correctly and verified and uploaded the code to your board.
After uploading the code, open the serial monitor, enter the number 1 to 9, and click Send, it will control the servo motor rotate at a certain angle.
<br>[[File:ks0398 4-3.png|500px|frameless|thumb]]<br>
<br>[[File:0372-图片3.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 10-2.png|500px|frameless|thumb]]<br>
<br>


====Rotating back and forth====
Complete the above project, you can also upload the code below to control the servo motor rotating back and forth at a certain angle.
<br>
'''Test Code'''<br>
<br>[[File:ks0398 10.2.png|500px|frameless|thumb]]<br>
<br>
<br>


===Project 5: Buzzer clicking===
===Project 11: Slide Position===
'''Overview'''<br>
'''Overview'''<br>
In this project, we’ll bridge the gap between the digital world and the analog world. We’ll be using a buzzer module that makes a small “click” when you apply voltage to it (try it!).
This lesson you will learn how to use slide potentiometer to control the LED brightness and servo rotation.  


'''Component Required'''<br>
'''Component Required'''<br>
* EASY plug control board*1
* EASY plug control board*1
* EASY plug Passive Buzzer Module*1
* EASY plug slide potentiometer *1
* RJ11 cable*1
* EASY plug LED module*1
* USB cable*1  
* Servo motor *1 
* RJ11 cable*2
* USB cable*1


[[image:ks0373图.jpg|thumb|500px|right|EASY plug Slide Potentiometer ]]
'''Component Introduction'''  <br>
'''Component Introduction'''  <br>
[[image:Ks0103-1-.png|thumb|600px|right|EASY plug Passive Buzzer Module]]<br>
The EASY plug slide potentiometer uses high quality sliding appliances for stable and reliable performance. It is a dual analog output that outputs a 0-VCC analog voltage signal.
We can use Arduino to make many interactive works of which the most commonly used is acoustic-optic display. <br>
The module pins are extended into Registered jack, so you can easily connect it to EASY Plug control board using a RJ11 cable.<br>
The buzzer we introduced here is a passive buzzer. It cannot be actuated by itself, but by external pulse frequencies. <br>
There are 6 pad interfaces on the module. So you can solder two 3pin headers with a pitch of 2.54mm on the module. <br>
Different frequencies produce different sounds. You can use Arduino to code the melody of a song, which is quite fun and simple.<br>
It can be used to connect with other MCUs. The signal terminal outputs two analog values. The sum of the two analog values is 1023.
* Interface: Easy plug
* Working voltage: 3.3-5v
* Sensor type: digital


<br>
<br>  
'''Connect It Up'''<br>
'''Connect It Up'''<br>
Connect the EASY Plug passive buzzer module to control board using an RJ11 cable.
Connect the EASY Plug Slide Potentiometer module to control board using an RJ11 cable.
<br>[[File:Ks0103-2-.png|700px|frameless|thumb]]<br>
<br>[[File:0373-1.png|500px|frameless|thumb]]<br>


<br>
'''Upload the Code'''<br>
'''Upload the Code'''<br>
<br>[[File:ks0398 5.1.png|500px|frameless|thumb]]<br>
<br>[[File:0373-2.png|600px|frameless|thumb]]<br>


<br>
'''What You Should See'''<br>
<br>[[File:KS0373-3.png|600px|frameless|thumb]]<br>
<br>
<br>
'''What You Should See'''<br>
After uploading the code, open the serial monitor and set the baud rate to 9600; <br>
Done uploading the code, you should be able to hear the buzzer module make a small “click”.
you should be able to see the analog value of analog pin A6,A7. If slide the slider, the value will change.  
<br>[[File:ks0398 5-1.png|500px|frameless|thumb]]<br>
<br>[[File:KS0373-4.png|600px|frameless|thumb]]<br>
<br>[[File:ks0398 5-2.png|500px|frameless|thumb]]<br>


<br>
====Controlling LED Brightness====
Except from reading the analog value of slide potentiometer, you are able to use the slide potentiometer to control the brightness of LED.
<br>
'''Hookup Guide'''<br>
<br>[[File:KS0373-5.png|500px|frameless|thumb]]<br>


===Project 6: Capacitive touch===
<br>
'''Overview'''<br>
'''Test Code'''<br>
Are you tired of clicking mechanic buttons? Well, try our capacitive touch sensor. In this project, we’ll use the EASY Plug touch sensor to make a simple test.  
<br>[[File:KS0373-6.png|500px|frameless|thumb]]<br>
 
<br>
'''What You Should See'''<br>
After uploading the code, slide the potentiometer, the brightness of LED will change. <br>


'''Component Required'''<br>
<br>
* EASY plug control board*1
====Controlling Servo Angle====
* EASY plug Touch Sensor *1
* EASY plug LED Module *1
* RJ11 cable *2
* USB cable*1


'''Component Introduction''' <br>
'''Hookup Guide'''<br>
[[image:ks0113图.jpg|thumb|600px|right|EASY plug Capacitive Touch Sensor ]]<br>
<br>[[File:KS0373-8.png|600px|frameless|thumb]]<br>
You can find touch sensors mostly on electronic device. Instead of buttons, upgrade your Arduino project with our new version touch sensor and make it cool!<br>
This EASY Plug digital capacitive touch sensor provides a one-touch style switch on your Arduino project. It uses the most popular capacitive sensing technology which is the same as your mobile phone.<br>
This little sensor can "feel" people and metal touch and feedback a high/low voltage level. Even isolated by some cloth and paper, it can still feel the touch. The sensitivity will decrease as the isolation getting thick.
* Supply Voltage: 3.3V to 5V
* Sensor type: Digital
* Function range: 0℃ to 100℃


'''Connect It Up'''<br>
<br>  
Connect the EASY Plug touch sensor to control board using an RJ11 cable.
<br>[[File:触摸灯.jpg|500px|frameless|thumb]]<br>
<br>
'''Test Code'''<br>
'''Test Code'''<br>
Below is an example code for three LED modules experiment.
<br>[[File:KS0373-9.png|800px|frameless|thumb]]<br>
<br>[[File:ks0398 6.1.png|500px|frameless|thumb]]<br>


<br>
<br>  
'''What You Should See'''<br>
'''What You Should See'''<br>
Done uploading the code, when you touch the sensor, the led on the sensor will light up.
After uploading the code, slide the potentiometer, the servo motor will rotate to a certain angle.
<br>[[File:ks0398 6-3.png|500px|frameless|thumb]]<br>
Open the monitor, it will print out the value read from the touch sensor.
<br>[[File:ks0398 6-2.png|500px|frameless|thumb]]<br>


<br>
<br>
====Simulating Table Lamp====
'''Test Code'''<br>
<br>[[File:ks0398 6.2.png|500px|frameless|thumb]]<br>
'''What You Should See'''<br>
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>
<br>[[File:ks0398 6-5.png|500px|frameless|thumb]]<br>
Open the monitor, you should be able to see how many times do you touch the sensor.
<br>[[File:ks0398 6-4.png|500px|frameless|thumb]]<br>
<span style="color: red">'''Troubleshooting:'''</span> <br>
* '''Program Not Uploading?'''<br>
This happens sometimes, the most likely case is a confused Board and serial port, you should firstly select your proper board and port. <br>
If it doesn’t, make sure you have assembled the circuit correctly and verified and uploaded the code to your board. <br>
<br>[[File:ks0398 6-6.png|500px|frameless|thumb]]<br>


===Project 12: RGB === 
'''Overview'''<br>
This lesson we are going to show you shiny light color.
<br>
<br>
===Project 7: Fire extinguishing ===
'''Overview'''<br>
How to blow out the fire? You might be able to use this fan module to add  flavor to your own interesting projects.
'''Component Required'''<br>
'''Component Required'''<br>
* EASY plug control board*1
* EASY plug control board*1
* EASY plug Fan Motor Module*1   
* EASY plug RGB module *1   
* RJ11 cable*1
* RJ11 cable*1
* USB cable*1   
* USB cable*1   
 
'''Component Introduction'''   <br>
<br>
[[image:ks0241图.jpg|thumb|600px|right|EASY plug Fan Motor Module ]]<br>
'''Component Introduction'''  
The fan motor module uses the L9110 driver to control the forward and reverse rotation of propeller, which can easily blow out the fire of a lighter 20cm away.<br>
[[image:ks0370 图.jpg|thumb|600px|right|EASY plug 2812 2x2 full-color RGB Module ]]
It should be connected to the double digital port with only one line, pretty convenient.<br>
EASY plug 2812 2x2 full color RGB module is a smart external control LED light source that integrates control circuit and lighting circuit. <br>
Make an air aerial propeller vessel, a cooling system, or spinning machine with this small fan module. Add flavor to your own interesting projects with this module. This module is commonly used for STEM class.
Each LED has the same appearance as a 5050 LED bead, and each component is a pixel point. <br>
* Fan diameter: 75mm
The pixel point includes an intelligent digital interface data latch signal shaping and amplifying driving circuit, as well as a high-precision internal oscillator and a 12V high-voltage programmable constant current control part, which effectively ensures that the color of the pixel point light is highly uniform.<br>
* Interface: double digital
The data protocol adopts the single-line return-to-zero code communication mode. After power-on and reset the pixel point, the S pin receives the data transmitted from the controller. And the 24-bit data are extracted by the first pixel and then sent to the data latch inside the pixel point. <br>
* Working voltage: 5V
LED has advantages of low voltage drive, environmental protection and energy saving, high brightness, wide scattering angle, good consistency, ultra low power, long life and so on.


'''Connect It Up'''<br>
<br>
Connect the EASY Plug fan motor module to control board using an RJ11 cable.  
'''Specifications'''<br>
<br>[[File:KS0241.jpg|500px|frameless|thumb]]<br>
* Operating Voltage: DC5V
* Power: 0.1W
* Light Source: SMD 5050 RGB
* IC model: 4 / WS2811
* Gray level: 256 levels
* Illumination angle: 180°
* Luminous color: can be adjusted by the controller, white, red, yellow, blue, green, etc.


<br>
'''Connect It Up'''<br>
<br>[[File:KS0370.jpg|500px|frameless|thumb]]<br>
<br>
'''Upload the Code'''<br>
'''Upload the Code'''<br>
<br>[[File:ks0398 7.1.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 12.1.png|800px|frameless|thumb]]<br>


<br>
'''What You Should See'''<br>
'''What You Should See'''<br>
Done uploading the code, the motor fan will rotate forward for 3 seconds, and then rotate reverse for 3 seconds, repeatedly.  
<br>[[File:Uklyuk-1.png|500px|frameless|thumb]]<br>
<br>[[File:ks0241 Result.png|500px|frameless|thumb]]<br>
After uploading the code, you should see the 4 RGB LEDs flashing in red, green, and blue,circularly.
<br>[[File:ks0398 12-2.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 12-3.png|500px|frameless|thumb]]<br>


<br>
<br>


===Project 8: There’s flame===
===Project 13: Someone is in this area!===
'''Overview'''<br>
'''Overview'''<br>
What's the simplest way to check the fire happened? Use a flame sensor. In this project, we simply test the flame sensor to turn on led if detecting flame.  
How can we know someone enters and leaves a certain area? Great, use a PIR motion sensor. The PIR sensor allows to detect motion.That information can be useful, for example, to trigger an alarm or to turn on the lights.


<br>
'''Component Required'''<br>
'''Component Required'''<br>
* EASY plug control board*1
* EASY plug control board*1
* EASY plug Flame Sensor *1
* EASY plug PIR Motion Sensor*1
* EASY plug LED Module*1
* EASY plug LED module*1
* EASY plug Fan Motor*1
* EASY plug Fan motor*1
* RJ11 cable *2
* RJ11 cable*3
* USB cable*1
* USB cable*1  


'''Component Introduction'''<br>
<br>
[[image:ks0116图.jpg|thumb|600px|right|EASY plug Flame Sensor Module]]   <br>
'''Component Introduction'''  
The flame sensor can be used to detect fire or other wavelength at 760nm ~1100nm light. <br>
[[image:ks0122图.jpg|thumb|600px|right|EASY plug Flame Sensor Module]]
In the fire-fighting robot game, the flame plays an important role in the probe, which can be used as the robot's eyes to find fire source.<br>
PIR stands for Pyroelectric Infrared (many times, they are also referred as Passive Infrared sensors). This is because their principle of operation is based on the detection of infrared energy emitted by a moving body.<br>
The potentiometer on the flame sensor can be used to adjust the sensitivity.
The PIR sensor can detect infrared signals from a moving person or moving animal, outputting switching signals. <br>
* Supply Voltage: 3.3V to 5V
One important thing to mention is that when motion is detected, the output will stay high for 2.3 to 3 seconds after the motion stops.<br>
* Detection range: 500px (4.8V) ~ 2500px (1V)
Regarding the power supply, it can work with voltages of both 3.3V and 5V. The device has a detection range of 7 meters and a detection angle of 100º.<br>
* Spectral Bandwidth Range: 760nm ~ 1100nm
 
* Operating temperature: -25℃ to 85℃
* Input Voltage: 3.3 ~ 5V, Maximum 6V
* Sensor type: digital
* Working Current: 15uA
* Working Temperature: -20 ~ 85℃
* Output Voltage: High 3V, Low 0V
* Output Delay Time (High Level): About 2.3 to 3 Seconds
* Detection angle: 100°
* Detection distance: 7 meters
* Pin limit current: 100mA


<br>
'''Connect It Up'''<br>
'''Connect It Up'''<br>
Connect the EASY Plug Flame Sensor and LED module to control board using RJ11 cables.  
Connect the EASY Plug PIR Motion sensor and LED module to control board using RJ11 cables.
<br>[[File:火焰灯.jpg|500px|frameless|thumb]]<br>
<br>[[File:人体灯.jpg|500px|frameless|thumb]]<br>


'''Upload the Code'''<br>
<br>
<br>[[File:ks0398 8.1.png|500px|frameless|thumb]]<br>
'''Test Code'''<br>
<br>[[File:0398----9.png|500px|frameless|thumb]]<br>


<br>
'''What You Should See'''<br>
'''What You Should See'''<br>
Done uploading the code, put a lighter close to the flame sensor. Once the sensor detects the flame, the led lights up. <br>
After uploading the code, slide the potentiometer, the servo motor will rotate to a certain angle.
If isn’t, you are able to adjust the sensitivity by a potentiometer.
<br>[[File:0398----10.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 8-1.png|500px|frameless|thumb]]<br>
Done uploading the code, if the sensor detects someone moving nearby, you should see the LED is turned on.
<br>[[File:ks0398 13-3.png|500px|frameless|thumb]]<br>
Open the serial monitor and set the baud rate to 9600, it will print out the data.
<br>[[File:ks0398 13-2.png|500px|frameless|thumb]]<br>
<br>


<span style="color: red">''' Little Knowledge:'''</span> <br>
* You are able to adjust the sensitivity by a blue potentiometer on the sensor.
[[image:ks0116图.jpg|thumb|600px|right|EASY plug Flame Sensor Module]] 
<br>
<br>
 
====Controlling Fan Motor====
====Simulating Fire Extinguisher ====
Let’s go into an interesting project. When detecting the flame by flame sensor, the fan motor will rotate to blow out the fire.
 
'''Hookup Guide'''<br>
'''Hookup Guide'''<br>
<br>[[File:火焰电机.jpg|500px|frameless|thumb]]<br>
<br>[[File:人体电机灯.jpg|500px|frameless|thumb]]<br>
 
<br>
'''Test Code'''<br>
'''Test Code'''<br>
<br>[[File:ks0398 8.2.png|500px|frameless|thumb]]<br>
<br>[[File:0398----11.png|500px|frameless|thumb]]<br>
 
<br>
'''What You Should See'''<br>
'''What You Should See'''<br>
Done uploading the code, put a lighter close to the flame sensor. Once the sensor detects the flame, you should see the fan motor run.  
If the sensor detects someone moving nearby, you should see the LED is turned on, and the fan motor is rotating. Otherwise, LED is turned off and motor stops rotating.
<br>[[File:ks0398 8-2.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 13-4.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 13-5.png|500px|frameless|thumb]]<br>


<br>
<br>
===Project 9: Avoiding obstacles===
 
===Project 14: Joystick===  
 
'''Overview'''<br>
'''Overview'''<br>
Why some intelligent robots can automatically avoid an obstacle ahead? Easily, use an obstacle avoidance sensor. In this project, we’ll simply test the obstacle avoidance sensor.  
Lots of robot projects need joystick. This joystick module provides an affordable solution. In the following, we are going to test the joystick.


'''Component Required'''<br>
'''Component Required'''<br>
* EASY plug control board*1
* EASY plug control board*1
* EASY plug obstacle detector sensor *1
* EASY plug Joystick Module *1  
* EASY plug LED module *1
* EASY plug LED module *3
* EASY plug motor *1 
* RJ11 cable *4
* RJ11 cable *2
* USB cable*1   
* USB cable*1   
 
'''Component Introduction''' <br>
[[image:ks0120图.jpg|thumb|600px|right|EASY plug Obstacle Avoidance Sensor]]<br>
Infrared obstacle avoidance sensor is equipped with distance adjustment function and is especially designed for wheeled robots. <br>
This sensor has strong adaptability to ambient light and is of high precision. It has a pair of infrared transmitting and receiving tube. <br>
When infrared ray launched by the transmitting tube encounters an obstacle (its reflector), the infrared ray is reflected to the receiving tube, after a comparator circuit processing, the indicator will light up. <br>
You can adjust the detection distance by rotating the potentiometer knob, the effective distance range of 2~40cm. <br>
They can be widely used in robot obstacle avoidance, avoidance car, line count, and black and white line tracking and many other occasions.<br>
* Working voltage: DC 3.3V-5V
* Working current: ≥20mA
* Working temperature: -10℃ to+50℃
* Detection distance: 2~40cm
* Output signal: TTL voltage
* Effective Angle: 35°


<br>
'''Component Introduction'''
[[image:ks0245图.jpg|thumb|600px|right|EASY plug Joystick Module ]]
Lots of robot projects need joystick. This module provides an affordable solution. <br>
By simply connecting to two analog inputs, the robot is at your commands with X, Y control. <br>
It also has a switch that is connected to a digital pin. <br>
This joystick module can be easily connect to EASY PLUG control board with only one cable.
* Interface: Easy plug
* Supply Voltage: 3.3V to 5V
* Interface: Digital
<br>
'''Connect It Up'''<br>
'''Connect It Up'''<br>
Connect the EASY Plug obstacle detector sensor and LED module to control board using RJ11 cables.  
Connect the EASY Plug Joystick module to control board using an RJ11 cable.  
<br>[[File:避障灯.jpg|500px|frameless|thumb]]<br>
<br>[[File:KS0245.jpg|500px|frameless|thumb]]<br>
<span style="color: red">'''Note:''' X-axis is connected to A6, Y-axis is connected to A7, Z-axis is default by D2  <br>


'''Test Code'''<br>
<br>
<br>[[File:ks0398 9.1.png|500px|frameless|thumb]]<br>
'''Upload the Code'''<br>
<br>[[File:ks0398 14.1.png|500px|frameless|thumb]]<br>


<br>
'''What You Should See'''<br>
'''What You Should See'''<br>
<br>[[File:ks0398 9-1.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 14-1.png|500px|frameless|thumb]]<br>
Done uploading the code, when the sensor detects an obstacle, the led is turned on.
<br>
<br>[[File:ks0398 9-2.png|500px|frameless|thumb]]<br>
Done uploading the code, open the serial monitor and set the baud rate to 9600. If push the Joystick button towards different direction, you should get the different value.
<br>[[File:ks0398 14-2.png|500px|frameless|thumb]]<br>


<br>
<br>
====Controlling Motor ====
====Controlling LED Lights====
In the previous section, we use the obstacle detector sensor to control the LED on and off. Now, let’s try another play, controlling the motor rotating.
<br>
 
'''Hookup Guide'''<br>
'''Hookup Guide'''<br>
<br>[[File:避障电机.jpg|500px|frameless|thumb]]<br>
<br>[[File:遥感灯.jpg|500px|frameless|thumb]]<br>
 
<br>
'''Test Code'''<br>
'''Test Code'''<br>
<br>[[File:ks0398 9.2.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 14.2.png|500px|frameless|thumb]]<br>
 
<br>
'''What You Should See'''<br>
'''What You Should See'''<br>
Done uploading the code, when the sensor detects an obstacle, the fan motor rotates. Otherwise, fan motor stops.
Upload the code successfully, push the Joystick X-axis to downward, the LED light connected to D5 will become off. <br>
<br>[[File:ks0398 9-3.png|500px|frameless|thumb]]<br>
If push the Joystick Y-axis to leftward, the LED light connected to D6 will be turned off.
<br>
Z-axis will control the LED light connected to D7.
<br>[[File:ks0398 14-3.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 14-4.png|500px|frameless|thumb]]<br>


<span style="color: red">'''Troubleshooting:'''</span> <br>
* '''Compiling Fails ?'''<br>
This happens sometimes, the most likely case is a library file not added.  You should be sure that all the libraries are added to the libraries directory of Arduino-1.8.5. Shown below.<br>
<br>[[File:ks0398 9-4.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 9-5.png|500px|frameless|thumb]]<br>
* '''Program Not Uploading?'''<br>
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:ks0398 9-6.png|500px|frameless|thumb]]<br>
<br>
<br>


===Project 10: Servo===  
===Project 15: Ambient Light===  
'''Overview'''<br>
'''Overview'''<br>
This lesson we are going to rotate the servo motor.
This project we will test the ambient light. You can use analog reading to read the data from this sensor.  
 
<br>
'''Component Required'''<br>
'''Component Required'''<br>
* EASY plug control board*1
* EASY plug control board*1
* EASY plug Servo Module *1
* EASY plug TEMT6000 Light Sensor *1
* Keyestudio Micro Servo *1
* EASY plug LED module *1
* RJ11 cable *1
* EASY plug RGB module *1
* USB cable*1  
* RJ11 cable *2
 
* USB cable*1
'''Component Introduction''' <br>
If you want to use the Micro Servo and EASY PLUG control board to do some experiments, you need to use the EASY plug Servo extension module. <br>
The EASY plug Servo module is extended into Registered Jack, so you can connect it to EASY PLUG control board using only a RJ11 cable.<br>
The Servo module also comes with 3pins of 2.54mm pin pitch, fully compatible with servo pins.<br>
[[image:ks0372图.jpg|thumb|600px|right|EASY plug Servo Module +Micro Servo]]<br>
Servo motor comes with many specifications. But all of them have three connection wires, distinguished by brown, red, orange colors. Brown one is for ground, red one for power positive, orange one for signal line.<br>
Included with your Micro Servo you will find a variety of white motor mounts that connect to the shaft of your servo. <br>
You may choose to attach any mount you wish for the circuit. It will serve as a visual aid, making it easier to see the servo spin.<br>


The rotation angle of servo is controlled by regulating the duty cycle of the PWM(Pulse-Width Modulation) signal. <br>
<br>
The standard cycle of the PWM signal is fixed at 20ms (50 Hz), and the pulse width is distributed between 1ms-2ms. <br>
'''Component Introduction'''
The pulse width corresponds to the rotation angle ( 0°~90°) of servo. <br>
[[image:ks0244图.jpg|thumb|600px|right|EASY plug TEMT6000 Ambient Light Sensor ]]
<br>[[File:ks0372 Servo.jpg|500px|frameless|thumb]]<br>
Light sensors are probably one of the most common sensors in life. They can be found in your laptop, phone or home lighting system. <br>
 
A light sensor measures the level of light in a room or ambient light in a space. <br>
'''Micro Servo Parameters'''<br>
This EASY plug TEMT6000 light sensor uses a special ambient light detector (TEMT6000) with spectral response that closely emulates the human eye.<br>
* Operating voltage: DC 4.8V〜6V
It does react well to very small changes in a wide range of brightness, however, it does not react well to IR or UV light.<br>
* Angle range: about 90°(in 1000→2000μsec)
The sensor can help you to to detect the light density.
* Pulsewidth range: 1000→2000μsec
* Supply Voltage: +5V DC 50mA
* No-load speed: 0.12±0.01 sec/60(DC 4.8V); 0.1±0.01 sec/60(DC 6V)
* Interface:Analog Input
* No-load current: 200±20mA(DC 4.8V); 220±20mA(DC 6V)
* Near Human Eye Spectral Response and Very Low IR Sensitivity
* Stop torque: 1.1±0.01kg/cm(DC 4.8V); 1.3±0.1kg/cm(DC 6V)
* Stop current: 600±30mA(DC 4.8V); 750±30mA(DC 6V)
* Standby current: 4±1mA(DC 4.8V); 4±1mA(DC 6V)
* Operation temperature: -10℃〜50℃
* Save temperature: -20℃〜60℃
* Motor wire length: 250 ± 5 mm


<br>
<br>
'''Connect It Up'''<br>
'''Connect It Up'''<br>
Connect the servo motor to EASY Plug Servo module. Brown line is for ground, red one for V pin, orange one for signal pin.
Connect the EASY Plug TEMT6000 sensor to control board using an RJ11 cable.  
Then connect them to control board using an RJ11 cable. <br>
<br>[[File:环境光灯.jpg|500px|frameless|thumb]]<br>
<br>[[File:KS0372.jpg|600px|frameless|thumb]]<br>


<br>
'''Upload the Code'''<br>
'''Upload the Code'''<br>
<br>[[File:ks0398 10.1.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 15.1.png|500px|frameless|thumb]]<br>


<br>
'''What You Should See'''<br>
'''What You Should See'''<br>
<br>[[File:ks0398 10-1.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 15-1.png|500px|frameless|thumb]]<br>
After uploading the code, open the serial monitor, enter the number 1 to 9, and click Send, it will control the servo motor rotate at a certain angle.
Done uploading the code, open the serial monitor and set the baud rate to 9600, you should be able to see the printed analog value. <br>
<br>[[File:ks0398 10-2.png|500px|frameless|thumb]]<br>
When the sensor detects different light intensity, the brightness of LED will change.<br>
<br>[[File:ks0398 15-2.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 15-3.png|500px|frameless|thumb]]<br>
 
<br>
====<big>Controlling RGB Flash</big>====
<br>
<br>
'''Hookup Guide'''<br>
<br>[[File:环境光RGB.jpg|500px|frameless|thumb]]<br>


====Rotating back and forth====
Complete the above project, you can also upload the code below to control the servo motor rotating back and forth at a certain angle.
<br>
<br>
'''Test Code'''<br>
'''Test Code'''<br>
<br>[[File:ks0398 10.2.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 15.2.png|500px|frameless|thumb]]<br>
 
<br>
'''What You Should See'''<br>
Upload the code successfully, when the measured light intensity is less than 50, RGB lights are turned on. <br>
Light 1 flashes in red, light 2 flashes in green, light 3 flashes in blue, light 4 flashes in white, with a delay time 500ms. <br>
<br>[[File:ks0398 15-4.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 15-5.png|500px|frameless|thumb]]<br>
 
<br>
<br>


===Project 11: Slide Position===
===Project 16: Hello, kaka!===
'''Overview'''<br>
'''Overview'''<br>
This lesson you will learn how to use slide potentiometer to control the LED brightness and servo rotation.  
An OLED (organic light-emitting diode) can be widely used in mobile devices for display applications. <br>
In the project, we will show you how to use an OLED module to display the text.


'''Component Required'''<br>
'''Component Required'''<br>
* EASY plug control board*1
* EASY plug control board*1
* EASY plug slide potentiometer *1
* EASY plug OLED Module*1   
* EASY plug LED module*1
* RJ11 cable*1
* Servo motor *1   
* RJ11 cable*2
* USB cable*1   
* USB cable*1   
    
    
'''Component Introduction'''  <br>
'''Component Introduction'''   
[[image:ks0373图.jpg|thumb|500px|right|EASY plug Slide Potentiometer ]]
[[image:ks0136图.jpg|thumb|600px|right|EASY plug OLED Module]]
The EASY plug slide potentiometer uses high quality sliding appliances for stable and reliable performance. It is a dual analog output that outputs a 0-VCC analog voltage signal.
OLED is short for organic light emitting diode. On the microscopic level, an OLED display is a matrix of organic LEDs that light up when they emit energy. <br>
The module pins are extended into Registered jack, so you can easily connect it to EASY Plug control board using a RJ11 cable.<br>
Our EASY Plug OLED displays are perfect when you need a small display with vivid, high-contrast color. The visible portion of the OLED measures 0.96" diagonal and contains 128 x 64 pixels. <br>
There are 6 pad interfaces on the module. So you can solder two 3pin headers with a pitch of 2.54mm on the module. <br>
An OLED display works without a backlight. Thus, it can display deep black levels and can be thinner and lighter than a liquid crystal display (LCD). <br>
It can be used to connect with other MCUs. The signal terminal outputs two analog values. The sum of the two analog values is 1023.
In low ambient light conditions such as a dark room an OLED screen can achieve a higher contrast ratio than an LCD. <br>
OLED technology is used in commercial applications such as displays for mobile phones and portable digital media players, car radios and digital cameras among others.
 
<br>
'''Specifications'''<br>
* 0.96" diagonal OLED
* Pixels: 128 × 64
* Color Depth: Monochrome(White)
* 5V power
* Brightness (cd/m2): 100(Typ)


<br>
'''Connect It Up'''<br>
'''Connect It Up'''<br>
Connect the EASY Plug Slide Potentiometer module to control board using an RJ11 cable.
Connect the EASY Plug OLED module to control board using an RJ11 cable.  
<br>[[File:KS0373.jpg|500px|frameless|thumb]]<br>
<br>[[File:ks0136.jpg|500px|frameless|thumb]]<br>


<br>
'''Upload the Code'''<br>
'''Upload the Code'''<br>
<br>[[File:ks0398 11.1.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 16.1.png|500px|frameless|thumb]]<br>


<br>
'''What You Should See'''<br>
'''What You Should See'''<br>
<br>[[File:ks0398 11-1.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 16-1.png|500px|frameless|thumb]]<br>
After uploading the code, open the serial monitor and set the baud rate to 9600, you should be able to see the analog value of analog pin A0.
Done uploading the code, you should be able to see the text is displayed on the OLED screen.
If slide the slider, the value will change.  
<br>[[File:ks0398 16-2.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 11-2.png|500px|frameless|thumb]]<br>


<br>
<br>
====Controlling LED Brightness====
<span style="color: red">'''Troubleshooting:'''</span> <br>
Except from reading the analog value of slide potentiometer, you are able to use the slide potentiometer to control the brightness of LED.
* '''Upload Failed ?''' <br>
 
This happens sometimes, the most likely case is a confused Board and serial port, you should firstly select your proper board and port.<br>
'''Hookup Guide'''<br>
Or make sure you have placed all the libraries below into arduino-1.8.5 libraries folder directory.  <br>
<br>[[File:滑竿灯.jpg|500px|frameless|thumb]]<br>
Pay more attention that the library folder can’t be overlapped.
 
<br>[[File:ks0398 16-3.png|500px|frameless|thumb]]<br>
'''Test Code'''<br>
<br>[[File:Ks0398 9-5.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 10.2.png|500px|frameless|thumb]]<br>


'''What You Should See'''<br>
After uploading the code, slide the potentiometer, the brightness of LED will change.
<br>[[File:ks0398 10-3.png|500px|frameless|thumb]]<br>
<br>
<br>


====Controlling Servo Angle====
===Project 17: I’m thirsty===
'''Overview'''<br>
This lesson we are going to use the soil sensor to detect the soil moisture of your plant.


'''Hookup Guide'''<br>
'''Component Required'''<br>
<br>[[File:滑竿舵机.jpg|500px|frameless|thumb]]<br>
* EASY plug control board*1
* EASY plug soil moisture sensor*1
* EASY plug OLED module*1
* RJ11 cable * 2
* USB cable*1


'''Test Code'''<br>
'''Component Introduction'''<br>
<br>[[File:ks0398 11.3.png|500px|frameless|thumb]]<br>
[[image:ks0108图.jpg|thumb|600px|right|Keyestudio EASY plug Soil Moisture Sensor]]<br>
The EASY Plug soil moisture sensor can read the amount of moisture present in the soil surrounding it. It's an ideal for monitoring an urban garden, or your pet plant's water level.<br>
This soil moisture sensor uses the two probes to pass current through the soil, and then it reads that resistance to get the moisture level. <br>
More water makes the soil conduct electricity more easily (less resistance), while dry soil conducts electricity poorly (more resistance).<br>
If you use this sensor to make an automatic watering device, it will be helpful to remind you to water your indoor plants or to monitor the soil moisture in your garden.
* Connector: Easy plug
* Power Supply: 3.3V or 5V
* Working Current: ≤ 20mA
* Output Voltage: 0-2.3V
* Sensor type: Analog output
* Surface finish: immersion tin
 
'''Connect It Up'''<br>
Connect the EASY Plug soil sensor to control board using an RJ11 cable.
<br>[[File:KS0108.jpg|500px|frameless|thumb]]<br>
 
'''Upload the Code'''<br>
<br>[[File:ks0398 17.1.png|500px|frameless|thumb]]<br>


'''What You Should See'''<br>
'''What You Should See'''<br>
After uploading the code, slide the potentiometer, the servo motor will rotate to a certain angle.
<br>[[File:ks0398 17-1.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 11-4.png|500px|frameless|thumb]]<br>
Done uploading the code, open the serial monitor and set the baud rate to 9600, you can see the analog value is 0. <br>
When place the two probes of moisture sensor into your plant soil, you can see the value change. <br>
<br>[[File:ks0108 Result.png|500px|frameless|thumb]]
<br>[[File:ks0398 17-2.png|500px|frameless|thumb]]<br>


<br>
<br>
====Adding OLED Display====
If you want to display the soil moisture value more convenient, you can add  OLED screen.
'''Hookup Guide'''<br>
<br>[[File:OLED土壤.jpg|500px|frameless|thumb]]<br>
'''Test Code'''<br>
<br>[[File:ks0398 17.1.png|500px|frameless|thumb]]<br>
<br>
'''What You Should See'''<br>
Upload success, you should see the soil value is showed on the OLED screen.
<br>[[File:ks0398 17-3.png|500px|frameless|thumb]]<br>
<br>
===Project 18: Is there gas leakage?===


===Project 12: RGB === 
'''Overview'''<br>
'''Overview'''<br>
This lesson we are going to show you shiny light color.
This project we will test the gas sensor. You can use analog reading to read the data from this sensor.  
 
<br>
'''Component Required'''<br>
'''Component Required'''<br>
* EASY plug control board*1
* EASY plug control board*1
* EASY plug RGB module *1
* EASY plug Analog Gas Sensor *1
* RJ11 cable*1
* EASY plug OLED module*1
* USB cable*1  
* RJ11 cable*2
 
* USB cable*1
'''Component Introduction''' <br>
 
[[image:ks0370 图.jpg|thumb|600px|right|EASY plug 2812 2x2 full-color RGB Module ]]<br>
'''Component Introduction'''
EASY plug 2812 2x2 full color RGB module is a smart external control LED light source that integrates control circuit and lighting circuit. <br>
[[image:ks0131图.jpg|thumb|600px|right|EASY plug Analog Gas Sensor ]]  
Each LED has the same appearance as a 5050 LED bead, and each component is a pixel point. <br>
This analog gas sensor - MQ2 is used in gas leakage detecting equipment in consumer electronics and industrial markets. <br>
The pixel point includes an intelligent digital interface data latch signal shaping and amplifying driving circuit, as well as a high-precision internal oscillator and a 12V high-voltage programmable constant current control part, which effectively ensures that the color of the pixel point light is highly uniform.<br>
This sensor is suitable for detecting LPG, I-butane, propane, methane, alcohol, Hydrogen and smoke. It has high sensitivity and quick response. <br>
The data protocol adopts the single-line return-to-zero code communication mode. After power-on and reset the pixel point, the S pin receives the data transmitted from the controller. And the 24-bit data are extracted by the first pixel and then sent to the data latch inside the pixel point. <br>
In addition, the sensitivity can be adjusted by the potentiometer. <br>
LED has advantages of low voltage drive, environmental protection and energy saving, high brightness, wide scattering angle, good consistency, ultra low power, long life and so on.
* Interface: Easy plug
 
* Power supply: 5V
'''Specifications'''<br>
* Interface type: Digital and Analog
* Operating Voltage: DC5V
* Wide detecting scope
* Power: 0.1W
* Simple drive circuit
* Light Source: SMD 5050 RGB
* Stable and long lifespan
* IC model: 4 / WS2811
* Quick response and High sensitivity
* Gray level: 256 levels
* Illumination angle: 180°
* Luminous color: can be adjusted by the controller, white, red, yellow, blue, green, etc.


'''Connect It Up'''<br>
'''Connect It Up'''<br>
<br>[[File:KS0370.jpg|500px|frameless|thumb]]<br>
Connect the EASY Plug analog gas sensor to control board using an RJ11 cable.
<br>[[File:ks0131.jpg|500px|frameless|thumb]]<br>


'''Upload the Code'''<br>
'''Upload the Code'''<br>
<br>[[File:ks0398 12.1.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 18.1.png|500px|frameless|thumb]]<br>


'''What You Should See'''<br>
'''What You Should See'''<br>
<br>[[File:ks0398 12-1.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 18-1.png|600px|frameless|thumb]]<br>
After uploading the code, you should see the 4 RGB LEDs flash in different colors Red, Green, Blue.  
Done uploading the test code, open the serial monitor and set the baud rate to 9600, you should be able to see the analog value.
<br>[[File:ks0398 12-2.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 18-2.png|600px|frameless|thumb]]<br>
<br>[[File:ks0398 12-3.png|500px|frameless|thumb]]<br>
<br>[[File:ks0131 Result.png|600px|frameless|thumb]]
 
<br>
====Adding OLED Display====
If you want to display the gas analog value more convenient, you can add  OLED screen.
 
'''Hookup Guide'''<br>
<br>[[File:OLED气体.jpg|500px|frameless|thumb]]<br>
 
'''Test Code'''<br>
<br>[[File:ks0398 18.1.png|500px|frameless|thumb]]<br>
 
'''What You Should See'''<br>
Upload success, you should be able to see the analog value is showed on the OLED screen. 
<br>[[File:ks0398 18-3.png|500px|frameless|thumb]]<br>


<br>
<br>
===Project 13: Someone is in this area!===
 
===Project 19: Ultrasonic ranging===
'''Overview'''<br>
'''Overview'''<br>
How can we know someone enters and leaves a certain area? Great, use a PIR motion sensor. The PIR sensor allows to detect motion.That information can be useful, for example, to trigger an alarm or to turn on the lights.
The distance sensors are really commonly seen in robotics projects. So in this project we will measure the distance with an ultrasound sensor.


'''Component Required'''<br>
'''Component Required'''<br>
* EASY plug control board*1
* EASY plug control board*1
* EASY plug PIR Motion Sensor*1
* EASY plug SR01 Ultrasonic *1  
* EASY plug LED module*1
* EASY plug LED module *1  
* EASY plug Fan motor*1 
* RJ11 cable *2
* RJ11 cable*3
* USB cable *1   
* USB cable*1   
 
'''Component Introduction''' <br>
[[image:ks0122图.jpg|thumb|600px|right|EASY plug Flame Sensor Module]]  <br>
PIR stands for Pyroelectric Infrared (many times, they are also referred as Passive Infrared sensors). This is because their principle of operation is based on the detection of infrared energy emitted by a moving body.<br>
The PIR sensor can detect infrared signals from a moving person or moving animal, outputting switching signals. <br>
One important thing to mention is that when motion is detected, the output will stay high for 2.3 to 3 seconds after the motion stops.<br>
Regarding the power supply, it can work with voltages of both 3.3V and 5V. The device has a detection range of 7 meters and a detection angle of 100º.<br>
* Input Voltage: 3.3 ~ 5V, Maximum 6V
* Working Current: 15uA
* Working Temperature: -20 ~ 85℃
* Output Voltage: High 3V, Low 0V
* Output Delay Time (High Level): About 2.3 to 3 Seconds
* Detection angle: 100°
* Detection distance: 7 meters
* Pin limit current: 100mA


'''Connect It Up'''<br>
<br>
Connect the EASY Plug PIR Motion sensor and LED module to control board using RJ11 cables.
'''Component Introduction'''  
<br>[[File:人体灯.jpg|500px|frameless|thumb]]<br>
[[image:ks0242图.jpg|thumb|600px|right|EASY plug SR01 Ultrasonic Module]]
 
This EASY Plug SR01 Ultrasonic module includes ultrasonic transmitter, receiver and corresponding control circuit.<br>
'''Test Code'''<br>
It should be connected to the double digital interface with only one line, which is very convenient. The distance sensor are really common in robotics projects, very useful for automation, interactive art and motion sensing. <br>
<br>[[File:ks0398 13.1.png|500px|frameless|thumb]]<br>
The module comes with four fixed holes, so that can easily fix it on other devices, such as the servo plastic platform and so on. <br>
* Operating Voltage: DC 5V
* Operating Current: 15mA
* Operating Frequency: 40KHz
* Max Range: 3--5m
* Min Range: 2cm
* Measuring Angle: 15 degree
* Trigger Input Signal: 10µS TTL pulse
* Interface:double digital


<br>
'''Connect It Up'''<br>
Connect the EASY Plug Ultrasonic module to control board using an RJ11 cable.
<br>[[File:KS0242.jpg|500px|frameless|thumb]]<br>
<br>
'''Upload the Code'''<br>
<br>[[File:ks0398 19.1.png|500px|frameless|thumb]]<br>
<br>
'''What You Should See'''<br>
'''What You Should See'''<br>
After uploading the code, slide the potentiometer, the servo motor will rotate to a certain angle.
Done uploading the code, open the serial monitor and set the baud rate to 9600. You should see the measured distance between the ultrasonic sensor and front obstacle.
<br>[[File:ks0398 13-1.png|500px|frameless|thumb]]<br>
<br>[[File:ks0242 Result.png|500px|frameless|thumb]]
Done uploading the code, if the sensor detects someone moving nearby, you should see the LED is turned on.
<br>[[File:ks0398 19-1.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 13-3.png|500px|frameless|thumb]]<br>
 
Open the serial monitor and set the baud rate to 9600, it will print out the data.
<br>
<br>[[File:ks0398 13-2.png|500px|frameless|thumb]]<br>
====<big>Turn on Light</big> ====
<br>
When the measured distance between an obstacle and ultrasonic sensor is less than a certain range, turn the led on.<br>
<br>
<br>
====Controlling Fan Motor====
'''Hookup Guide'''<br>
'''Hookup Guide'''<br>
<br>[[File:人体电机灯.jpg|500px|frameless|thumb]]<br>
<br>[[File:超声波灯.jpg|500px|frameless|thumb]]<br>
 
<br>
'''Test Code'''<br>
'''Test Code'''<br>
<br>[[File:ks0398 13.2.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 19.2.png|500px|frameless|thumb]]<br>
 
<br>
'''What You Should See'''<br>
'''What You Should See'''<br>
If the sensor detects someone moving nearby, you should see the LED is turned on, and the fan motor is rotating. Otherwise, LED is turned off and motor stops rotating.
Upload success, when the measured distance is less than 30, the LED will be turned on. Otherwise, the LED is turned off.
<br>[[File:ks0398 13-4.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 19-3.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 13-5.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 19-2.png|500px|frameless|thumb]]<br>


<br>
<br>
<span style="color: red">'''Little Knowledge:'''</span> <br>
* You can modify the setting distance in the code here, so that turn on or off led according to the obstacle distance measured by ultrasonic sensor.
<br>[[File:ks0398 19-4.png|500px|frameless|thumb]]<br>


===Project 14: Joystick===
<br>


===Project 20: What’s the temperature ===
'''Overview'''<br>
'''Overview'''<br>
Lots of robot projects need joystick. This joystick module provides an affordable solution. In the following, we are going to test the joystick.
In this project, you will learn how to use the temperature sensor with your EASY Plug control board, and display the analog temperature value on the serial monitor.


'''Component Required'''<br>
'''Component Required'''<br>
* EASY plug control board*1
* EASY plug control board*1
* EASY plug Joystick Module *1  
* EASY plug DS18B20 Sensor *1
* EASY plug LED module *3
* EASY plug OLED Module*
* RJ11 cable *4
* RJ11 cable *2
* USB cable*1   
* USB cable*1   
    
    
'''Component Introduction''' <br>
'''Component Introduction''' <br>
[[image:ks0245图.jpg|thumb|600px|right|EASY plug Joystick Module ]]<br>
[[image:ks0124图.jpg|thumb|600px|right|EASY plug DS18B20 Temperature Sensor]] <br>
Lots of robot projects need joystick. This module provides an affordable solution. <br>
The DS18B20 temperature sensor is exactly what it sounds like - a sensor used to measure ambient temperature.<br>
By simply connecting to two analog inputs, the robot is at your commands with X, Y control. <br>
The usable temperature ranges from -55°C to +125°C. It also supports multi-point mesh networking. <br>
It also has a switch that is connected to a digital pin. <br>
While there are many types of temperature sensors available in the market, the DS18B20 temperature sensor is the best choice in applications which require high accuracy and high reliability.<br>
This joystick module can be easily connect to EASY PLUG control board with only one cable.
For electronic enthusiasts and hobbyists, the DS18B20 is a good start for learning and developing temperature-dependent prototypes.
* Interface: Easy plug
* Supply Voltage: 3.3V to 5V
* Supply Voltage: 3.3V to 5V
* Temperature range: -55°C to +125°C
* Interface: Digital
* Interface: Digital


'''Connect It Up'''<br>
'''Connect It Up'''<br>
Connect the EASY Plug Joystick module to control board using an RJ11 cable.  
Connect the EASY Plug DS18B20 temperature sensor to control board using an RJ11 cable.  
<br>[[File:KS0245.jpg|500px|frameless|thumb]]<br>
<br>[[File:ks0124.jpg|500px|frameless|thumb]]<br>
<span style="color: red">'''Note:''' X-axis is connected to A6, Y-axis is connected to A7, Z-axis is default by D2  <br>


'''Upload the Code'''<br>
'''Upload the Code'''<br>
<br>[[File:ks0398 14.1.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 20.1.png|500px|frameless|thumb]]<br>


'''What You Should See'''<br>
'''What You Should See'''<br>
<br>[[File:ks0398 14-1.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 20-1.png|500px|frameless|thumb]]<br>
Done uploading the code, open the serial monitor and set the baud rate to 9600. If push the Joystick button towards different direction, you should get the different value.
Done uploading the code, open the serial monitor, on the window will print out the Celsius and Fahrenheit value.
<br>[[File:ks0398 14-2.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 20-2.png|500px|frameless|thumb]]<br>


<br>
<br>
====Controlling LED Lights====
====<big> OLED Display </big>====
'''Hookup Guide'''<br>
'''Hookup Guide'''<br>
<br>[[File:遥感灯.jpg|500px|frameless|thumb]]<br>
<br>[[File:18B20 OLED.jpg|500px|frameless|thumb]]<br>


'''Test Code'''<br>
'''Test Code'''<br>
<br>[[File:ks0398 14.2.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 20.2.png|500px|frameless|thumb]]<br>


'''What You Should See'''<br>
'''What You Should See'''<br>
Upload the code successfully, push the Joystick X-axis to downward, the LED light connected to D5 will become off. <br>
Upload success, you should be able to see the Celsius and Fahrenheit value are printed out on the OLED screen.
If push the Joystick Y-axis to leftward, the LED light connected to D6 will be turned off.<br>
<br>[[File:ks0398 20-6.png|500px|frameless|thumb]]<br>
Z-axis will control the LED light connected to D7.
 
<br>[[File:ks0398 14-3.png|500px|frameless|thumb]]<br>
<br>
<br>[[File:ks0398 14-4.png|500px|frameless|thumb]]<br>
<span style="color: red">'''Troubleshooting:'''</span> <br>
* '''OLED Not Lighting Up?'''<br>
If upload the code successfully, but LED still not lights up. Make sure your board and OLED module are connected correctly.
* '''Upload Failed ?'''<br>
This happens sometimes, the most likely case is a confused Board and serial port, you should firstly select your proper board and port. <br>
Or check whether add the library or not.
<br>[[File:ks0398 20-3.png|500px|frameless|thumb]]<br>
<br>[[File:Ks0398 9-4.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 9-5.png|500px|frameless|thumb]]<br>


<br>
<br>


===Project 15: Ambient Light===  
===Project 21: What time is it?===
'''Overview'''<br>
'''Overview'''<br>
This project we will test the ambient light. You can use analog reading to read the data from this sensor.  
In this project, we will show you how to display the time and date.


'''Component Required'''<br>
'''Component Required'''<br>
* EASY plug control board*1
* EASY plug control board*1
* EASY plug TEMT6000 Light Sensor *1
* EASY plug DS3231 Clock Module*1
* EASY plug LED module *1
* RJ11 cable*1
* EASY plug RGB module *1
* USB cable*1 
* RJ11 cable *2
 
* USB cable*1
'''Component Introduction''' 
[[image:ks0130图.jpg|thumb|600px|right|EASY plug DS3231 Clock Module]]
The DS3231 is a low-cost, extremely accurate I2C real-time clock (RTC) with an integrated temperature-compensated crystal oscillator (TCXO) and crystal. <br>
A real-time clock (RTC) is a computer clock (most often in the form of an integrated circuit) that keeps track of the current time.<br>
It integrated with a battery input, which can maintain accurate timekeeping when power off. The integrated crystal resonator ensures the accuracy of clock. So this RTC solution should be worth to try.<br>
* Temperature range: -40℃ to +85℃
* Timing accuracy: about ± 5ppm
* Output: 1Hz and 32.768kHz
* High speed (400kHz), I2C serial bus
* Supply voltage: 3.3V to 5.5V
* Output Level: TTL level


'''Component Introduction'''<br>
<br>
[[image:ks0244图.jpg|thumb|600px|right|EASY plug TEMT6000 Ambient Light Sensor ]] <br>
'''Connect It Up'''
Light sensors are probably one of the most common sensors in life. They can be found in your laptop, phone or home lighting system. <br>
<br>[[File:ks0130.jpg|500px|frameless|thumb]]<br>
A light sensor measures the level of light in a room or ambient light in a space. <br>
This EASY plug TEMT6000 light sensor uses a special ambient light detector (TEMT6000) with spectral response that closely emulates the human eye.<br>
It does react well to very small changes in a wide range of brightness, however, it does not react well to IR or UV light.<br>
The sensor can help you to to detect the light density.
* Supply Voltage: +5V DC 50mA
* Interface:Analog Input
* Near Human Eye Spectral Response and Very Low IR Sensitivity


'''Connect It Up'''<br>
Connect the EASY Plug TEMT6000 sensor to control board using an RJ11 cable.
<br>[[File:环境光灯.jpg|500px|frameless|thumb]]<br>
<br>
<br>
'''Upload the Code'''<br>
'''Upload the Code'''<br>
<br>[[File:ks0398 15.1.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 21.png|500px|frameless|thumb]]<br>


<br>
'''What You Should See'''<br>
'''What You Should See'''<br>
<br>[[File:ks0398 15-1.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 21-2.png|500px|frameless|thumb]]<br>
Done uploading the code, open the serial monitor and set the baud rate to 9600, you should be able to see the printed analog value. <br>
Done uploading the code, open the serial monitor and set the baud rate to 9600, you should be able to see the date and the time.
When the sensor detects different light intensity, the brightness of LED will change.<br>
<br>[[File:ks0398 21-3.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 15-2.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 15-3.png|500px|frameless|thumb]]<br>
 
<br>
<br>
====Controlling RGB Flash====
'''Hookup Guide'''<br>
<br>[[File:环境光RGB.jpg|500px|frameless|thumb]]<br>


'''Test Code'''<br>
===Project 22: I receive a signal===
<br>[[File:ks0398 15.2.png|500px|frameless|thumb]]<br>
 
'''What You Should See'''<br>
Upload the code successfully, when the measured light intensity is less than 50, RGB lights are turned on. <br>
Light 1 flashes in red, light 2 flashes in green, light 3 flashes in blue, light 4 flashes in white, with a delay time 500ms.
<br>[[File:ks0398 15-4.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 15-5.png|500px|frameless|thumb]]<br>
 
 
===Project 16: Hello, kaka!===
'''Overview'''<br>
'''Overview'''<br>
An OLED (organic light-emitting diode) can be widely used in mobile devices for display applications. <br>
Infrared devices are widely used, and often for remote controlled devices. With this IR receiver, your program project is now able to receive command from any IR remote controller. Next, let’s do a simple test.
In the project, we will show you how to use an OLED module to display the text.
<br>
 
'''Component Required'''<br>
'''Component Required'''<br>
* EASY plug control board*1
* EASY plug control board*1
* EASY plug OLED Module*1
* EASY plug IR Receiver Module *1  
* RJ11 cable*1
* EASY plug LED Module *1 
* RJ11 cable*2
* USB cable*1   
* USB cable*1   
 
<br>
'''Component Introduction'''  <br>
'''Component Introduction'''  <br>
[[image:ks0136图.jpg|thumb|600px|right|EASY plug OLED Module]]<br>
[[image:ks0125图.jpg|thumb|600px|right|EASY plug IR Receiver Module]]
OLED is short for organic light emitting diode. On the microscopic level, an OLED display is a matrix of organic LEDs that light up when they emit energy. <br>
Infrared receiver is a component with functions of reception, amplification, and demodulation. <br>
Our EASY Plug OLED displays are perfect when you need a small display with vivid, high-contrast color. The visible portion of the OLED measures 0.96" diagonal and contains 128 x 64 pixels. <br>
The internal IC has already been demodulated so that can directly output digital signal. <br>
An OLED display works without a backlight. Thus, it can display deep black levels and can be thinner and lighter than a liquid crystal display (LCD). <br>
Well, it will be also easy to make your own IR controller using IR transmitter. <br>
In low ambient light conditions such as a dark room an OLED screen can achieve a higher contrast ratio than an LCD. <br>
* Socket: Easy plug
OLED technology is used in commercial applications such as displays for mobile phones and portable digital media players, car radios and digital cameras among others.
* Power Supply: 5V
 
* Interface:Digital
'''Specifications'''<br>
* Modulate Frequency: 38Khz
* 0.96" diagonal OLED
<br>
* Pixels: 128 × 64
'''Connect It Up'''<br>
* Color Depth: Monochrome (White)
Connect the EASY Plug Infrared receiver module to control board using an RJ11 cable.  
* 5V power
<br>[[File:ks0125.jpg|500px|frameless|thumb]]<br>
* Brightness (cd/m2): 100 (Typ)
 
'''Connect It Up'''<br>
Connect the EASY Plug OLED module to control board using an RJ11 cable.  
<br>[[File:ks0136.jpg|500px|frameless|thumb]]<br>


<br>
'''Upload the Code'''<br>
'''Upload the Code'''<br>
<br>[[File:ks0398 16.1.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 22.1.png|500px|frameless|thumb]]<br>
<br>


'''What You Should See'''<br>
'''What You Should See'''<br>
<br>[[File:ks0398 16-1.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 22-1.png|600px|frameless|thumb]]<br>
Done uploading the code, you should be able to see the text is displayed on the OLED screen.
Done uploading the code, when aiming at the IR receiver, press down the key on an IR remote controller, you should see the key decoding is displayed on the serial monitor. If long press the key, it will appear wrong code FFFFFFFF.
<br>[[File:ks0398 16-2.png|500px|frameless|thumb]]<br>
<br>[[File:ks0125 Result.png|600px|frameless|thumb]]<br>
 
<br>[[File:ks0398 22-2.png|600px|frameless|thumb]]<br>
<span style="color: red">'''Troubleshooting:'''</span> <br>
* Upload Failed ?<br>
This happens sometimes, the most likely case is a confused Board and serial port, you should firstly select your proper board and port.<br>
Or make sure you have placed all the libraries below into arduino-1.8.5 libraries folder directory.  <br>
Pay more attention that the library folder can’t be overlapped.
<br>[[File:ks0398 16-3.png|500px|frameless|thumb]]<br>
<br>[[File:Ks0398 9-5.png|500px|frameless|thumb]]<br>


<br>
<span style="color: red">'''Little Knowledge:'''</span> <br>
This test can record all your remote control key decoding. So you can apply them to the next experiment to control LED lights. 
<br>
<br>


===Project 17: I’m thirsty===
====Remote Controlled Light====
'''Overview'''<br>
This lesson we are going to use the soil sensor to detect the soil moisture of your plant.


'''Component Required'''<br>
'''Hookup Guide'''<br>
* EASY plug control board*1
Connect the EASY Plug Infrared receiver module and LED module to control board using RJ11 cables.
* EASY plug soil moisture sensor*1
<br>[[File:红外接收灯.jpg|500px|frameless|thumb]]<br>
* EASY plug OLED module*1
<br>
* RJ11 cable * 2
'''Test Code'''<br>
* USB cable*1
<br>[[File:ks0398 22.2.png|500px|frameless|thumb]]<br>


'''Component Introduction'''<br>
'''What You Should See'''<br>
[[image:ks0108图.jpg|thumb|600px|right|Keyestudio EASY plug Soil Moisture Sensor]]<br>
Upload success, press the key 1 on your remote controller, LED lights up. Then press the key 2, LED is turned off.  
The EASY Plug soil moisture sensor can read the amount of moisture present in the soil surrounding it. It's an ideal for monitoring an urban garden, or your pet plant's water level.<br>
<br>[[File:ks0398 22-4.png|500px|frameless|thumb]]<br>
This soil moisture sensor uses the two probes to pass current through the soil, and then it reads that resistance to get the moisture level. <br>
More water makes the soil conduct electricity more easily (less resistance), while dry soil conducts electricity poorly (more resistance).<br>
If you use this sensor to make an automatic watering device, it will be helpful to remind you to water your indoor plants or to monitor the soil moisture in your garden.
* Connector: Easy plug
* Power Supply: 3.3V or 5V
* Working Current: ≤ 20mA
* Output Voltage: 0-2.3V
* Sensor type: Analog output
* Surface finish: immersion tin


'''Connect It Up'''<br>
<span style="color: red">'''Little Knowledge:'''</span> <br>
Connect the EASY Plug soil sensor to control board using an RJ11 cable.  
If you want to change another remote control key, you should be able to change your remote key decoding. Shown below.  
<br>[[File:KS0108.jpg|500px|frameless|thumb]]<br>
<br>[[File:ks0398 22-3.png|500px|frameless|thumb]]<br>
After that, upload the code again and have a try.


'''Upload the Code'''<br>
<br>[[File:ks0398 17.1.png|500px|frameless|thumb]]<br>


'''What You Should See'''<br>
<br>
<br>[[File:ks0398 17-1.png|500px|frameless|thumb]]<br>
Done uploading the code, open the serial monitor and set the baud rate to 9600, you can see the analog value is 0. <br>
When place the two probes of moisture sensor into your plant soil, you can see the value change. <br>
<br>[[File:ks0108 Result.png|500px|frameless|thumb]]
<br>[[File:ks0398 17-2.png|500px|frameless|thumb]]<br>


<br>
==Resources==
====Adding OLED Display====
* '''Keyestudio Official Website:''' http://www.keyestudio.com/<br>
If you want to display the soil moisture value more convenient, you can add  OLED screen.
* '''Keyestudio WIKI Website:''' http://wiki.keyestudio.com/<br>


'''Hookup Guide'''<br>
* '''Download Arduino, Mixly Software :''' <br>
<br>[[File:OLED气体.jpg|500px|frameless|thumb]]<br>
https://fs.keyestudio.com/KS0398


'''Test Code'''<br>
<br>[[File:ks0398 17.1.png|500px|frameless|thumb]]<br>
<br>
'''What You Should See'''<br>
Upload success, you should see the soil value is showed on the OLED screen.
<br>[[File:ks0398 17-3.png|500px|frameless|thumb]]<br>
<br>
<br>


===Project 18: Is there gas leakage?===
==Our Tutorial==
From the tutorial, you will learn all the basic information about EASY Plug controller board, sensor module, very easy to play and and to make interactive projects. Enjoy your time! <br>
Well, it's just the beginning of programming journey. There are more and more awesome projects for you to explore. <br>
Furthermore, our KEYESTUDIO research and development team will continue to explore on this path, walking you through the basics up to complex projects. <br>
Hope that you can enjoy our works!
<br>
==About keyestudio==
Located in Shenzhen, the Silicon Valley of China, KEYES DIY ROBOT CO.,LTD is a thriving technology company dedicated to open-source hardware research & development, production and marketing. <br>
Keyestudio is a best-selling brand owned by KEYES Corporation, our product lines range from Arduino boards, shields, sensor modules, Raspberry Pi, micro:bit extension boards and smart car to complete starter kits designed for customers of any level to learn programming knowledge. <br>
All of our products comply with international quality standards and are greatly appreciated in a variety of different markets throughout the world.<br>
For more details of our products, you can check it from the links below.<br>
Official website: http://www.keyestudio.com/<br>
US Amazon storefront: http://www.amazon.com/shops/A26TCVWBQE4D9T<br>
CA Amazon storefront: http://www.amazon.ca/shops/A26TCVWBQE4D9T<br>
UK Amazon storefront:http://www.amazon.co.uk/shops/A39F7KX4U3W9JH<br>
DE Amazon storefront: http://www.amazon.de/shops/A39F7KX4U3W9JH<br>
FR Amazon storefront: http://www.amazon.de/shops/A39F7KX4U3W9JH<br>
ES Amazon storefront: http://www.amazon.de/shops/A39F7KX4U3W9JH<br>
IT Amazon storefront: http://www.amazon.de/shops/A39F7KX4U3W9JH<br>
US Amazon storefront: http://www.amazon.com/shops/APU90DTITU5DG<br>
CA Amazon storefront: http://www.amazon.ca/shops/APU90DTITU5DG<br>
JP Amazon storefront: http://www.amazon.jp/shops/AE9VWCCXQIC6J<br>
<br>
 


'''Overview'''<br>
This project we will test the gas sensor. You can use analog reading to read the data from this sensor.
<br>
'''Component Required'''<br>
* EASY plug control board*1
* EASY plug Analog Gas Sensor *1
* EASY plug OLED module*1
* RJ11 cable*2
* USB cable*1
'''Component Introduction''' <br>
[[image:ks0131图.jpg|thumb|600px|right|EASY plug Analog Gas Sensor ]] <br>
This analog gas sensor - MQ2 is used in gas leakage detecting equipment in consumer electronics and industrial markets. <br>
This sensor is suitable for detecting LPG, I-butane, propane, methane, alcohol, Hydrogen and smoke. It has high sensitivity and quick response. <br>
In addition, the sensitivity can be adjusted by the potentiometer. <br>
* Interface: Easy plug
* Power supply: 5V
* Interface type: Digital and Analog
* Wide detecting scope
* Simple drive circuit
* Stable and long lifespan
* Quick response and High sensitivity
'''Connect It Up'''<br>
Connect the EASY Plug analog gas sensor to control board using an RJ11 cable.
<br>[[File:ks0131.jpg|500px|frameless|thumb]]<br>
'''Upload the Code'''<br>
<br>[[File:ks0398 18.1.png|500px|frameless|thumb]]<br>
'''What You Should See'''<br>
<br>[[File:ks0398 18-1.png|500px|frameless|thumb]]<br>
Done uploading the test code, open the serial monitor and set the baud rate to 9600, you should be able to see the analog value.
<br>[[File:ks0398 18-2.png|500px|frameless|thumb]]<br>
<br>[[File:ks0131 Result.png|600px|frameless|thumb]]
<br>
====Adding OLED Display====
If you want to display the gas analog value more convenient, you can add  OLED screen.
'''Hookup Guide'''<br>
<br>[[File:OLED气体.jpg|500px|frameless|thumb]]<br>
'''Test Code'''<br>
<br>[[File:ks0398 18.1.png|500px|frameless|thumb]]<br>
'''What You Should See'''<br>
Upload success, you should be able to see the analog value is showed on the OLED screen. 
<br>[[File:ks0398 18-3.png|500px|frameless|thumb]]<br>
<br>
===Project 19: Ultrasonic ranging===
'''Overview'''<br>
The distance sensors are really commonly seen in robotics projects. So in this project we will measure the distance with an ultrasound sensor. 
'''Component Required'''<br>
* EASY plug control board*1
* EASY plug SR01 Ultrasonic *1
* EASY plug LED module *1
* RJ11 cable *2
* USB cable *1 
<br>
'''Component Introduction''' <br>
[[image:ks0242图.jpg|thumb|600px|right|EASY plug SR01 Ultrasonic Module]]<br>
This EASY Plug SR01 Ultrasonic module includes ultrasonic transmitter, receiver and corresponding control circuit.<br>
It should be connected to the double digital interface with only one line, which is very convenient. The distance sensor are really common in robotics projects, very useful for automation, interactive art and motion sensing. <br>
The module comes with four fixed holes, so that can easily fix it on other devices, such as the servo plastic platform and so on. <br>
* Operating Voltage: DC 5V
* Operating Current: 15mA
* Operating Frequency: 40KHz
* Max Range: 3--5m
* Min Range: 2cm
* Measuring Angle: 15 degree
* Trigger Input Signal: 10µS TTL pulse
* Interface:double digital
'''Connect It Up'''<br>
Connect the EASY Plug Ultrasonic module to control board using an RJ11 cable.
<br>[[File:KS0242.jpg|500px|frameless|thumb]]<br>
'''Upload the Code'''<br>
<br>[[File:ks0398 19.1.png|500px|frameless|thumb]]<br>
'''What You Should See'''<br>
Done uploading the code, open the serial monitor and set the baud rate to 9600. You should see the measured distance between the ultrasonic sensor and front obstacle.
<br>[[File:ks0242 Result.png|500px|frameless|thumb]]
<br>[[File:ks0398 19-1.png|500px|frameless|thumb]]<br>
<br>
====Turn on Light ====
When the measured distance between an obstacle and ultrasonic sensor is less than a certain range, turn the led on.<br>
'''Hookup Guide'''<br>
<br>[[File:超声波灯.jpg|500px|frameless|thumb]]<br>
'''Test Code'''<br>
<br>[[File:ks0398 19.2.png|500px|frameless|thumb]]<br>
'''What You Should See'''<br>
Upload success, when the measured distance is less than 30, the LED will be turned on. Otherwise, the LED is turned off.
<br>[[File:ks0398 19-3.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 19-2.png|500px|frameless|thumb]]<br>
<br>
<span style="color: red">'''Little Knowledge:'''</span> <br>
* You can modify the setting distance in the code here, so that turn on or off led according to the obstacle distance measured by ultrasonic sensor.
<br>[[File:ks0398 19-4.png|500px|frameless|thumb]]<br>
<br>
===Project 20: What’s the temperature ===
'''Overview'''<br>
In this project, you will learn how to use the temperature sensor with your EASY Plug control board, and display the analog temperature value on the serial monitor. 
'''Component Required'''<br>
* EASY plug control board*1
* EASY plug DS18B20 Sensor *1
* EASY plug OLED Module*1 
* RJ11 cable *2
* USB cable*1 
 
'''Component Introduction''' <br>
[[image:ks0124图.jpg|thumb|600px|right|EASY plug DS18B20 Temperature Sensor]]  <br> 
The DS18B20 temperature sensor is exactly what it sounds like - a sensor used to measure ambient temperature.<br>
The usable temperature ranges from -55°C to +125°C. It also supports multi-point mesh networking. <br>
While there are many types of temperature sensors available in the market, the DS18B20 temperature sensor is the best choice in applications which require high accuracy and high reliability.<br>
For electronic enthusiasts and hobbyists, the DS18B20 is a good start for learning and developing temperature-dependent prototypes. 
* Supply Voltage: 3.3V to 5V
* Temperature range: -55°C to +125°C
* Interface: Digital
'''Connect It Up'''<br>
Connect the EASY Plug DS18B20 temperature sensor to control board using an RJ11 cable.
<br>[[File:ks0124.jpg|500px|frameless|thumb]]<br>
'''Upload the Code'''<br>
<br>[[File:ks0398 20.1.png|500px|frameless|thumb]]<br>
'''What You Should See'''<br>
<br>[[File:ks0398 20-1.png|500px|frameless|thumb]]<br>
Done uploading the code, open the serial monitor, on the window will print out the Celsius and Fahrenheit value.
<br>[[File:ks0398 20-2.png|500px|frameless|thumb]]<br>
<br>
====OLED Display====
'''Hookup Guide'''<br>
<br>[[File:18B20 OLED.jpg|500px|frameless|thumb]]<br>
'''Test Code'''<br>
<br>[[File:ks0398 20.2.png|500px|frameless|thumb]]<br>
'''What You Should See'''<br>
Upload success, you should be able to see the Celsius and Fahrenheit value are printed out on the OLED screen.
<br>[[File:ks0398 20-6.png|500px|frameless|thumb]]<br>
<br>
<span style="color: red">'''Troubleshooting:'''</span> <br>
* '''OLED Not Lighting Up?'''<br>
If upload the code successfully, but LED still not lights up. Make sure your board and OLED module are connected correctly.
* '''Upload Failed ?'''<br>
This happens sometimes, the most likely case is a confused Board and serial port, you should firstly select your proper board and port. <br>
Or check whether add the library or not.
<br>[[File:ks0398 20-3.png|500px|frameless|thumb]]<br>
<br>[[File:Ks0398 9-4.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 9-5.png|500px|frameless|thumb]]<br>
<br>
===Project 21: What time is it?===
'''Overview'''<br>
In this project, we will show you how to display the time and date.
'''Component Required'''<br>
* EASY plug control board*1
* EASY plug DS3231 Clock Module*1 
* RJ11 cable*1
* USB cable*1 
 
'''Component Introduction'''  <br>
[[image:ks0130图.jpg|thumb|600px|right|EASY plug DS3231 Clock Module]]<br>
The DS3231 is a low-cost, extremely accurate I2C real-time clock (RTC) with an integrated temperature-compensated crystal oscillator (TCXO) and crystal. <br>
A real-time clock (RTC) is a computer clock (most often in the form of an integrated circuit) that keeps track of the current time.<br>
It integrated with a battery input, which can maintain accurate timekeeping when power off. The integrated crystal resonator ensures the accuracy of clock. So this RTC solution should be worth to try.
* Temperature range: -40℃ to +85℃
* Timing accuracy: about ± 5ppm
* Output: 1Hz and 32.768kHz
* High speed (400kHz), I2C serial bus
* Supply voltage: 3.3V to 5.5V
* Output Level: TTL level
<br>
'''Connect It Up'''
<br>[[File:ks0130.jpg|500px|frameless|thumb]]<br>
<br>
'''Upload the Code'''<br>
<br>[[File:ks0398 21.png|500px|frameless|thumb]]<br>
<br>
'''What You Should See'''<br>
<br>[[File:ks0398 21-2.png|500px|frameless|thumb]]<br>
Done uploading the code, open the serial monitor and set the baud rate to 9600, you should be able to see the date and the time.
<br>[[File:ks0398 21-3.png|500px|frameless|thumb]]<br>
<br>
===Project 22: I receive a signal===
'''Overview'''<br>
Infrared devices are widely used, and often for remote controlled devices. With this IR receiver, your program project is now able to receive command from any IR remote controller. Next, let’s do a simple test.
<br>
'''Component Required'''<br>
* EASY plug control board*1
* EASY plug IR Receiver Module *1
* EASY plug LED Module *1 
* RJ11 cable*2
* USB cable*1 
<br>
'''Component Introduction'''  <br>
[[image:ks0125图.jpg|thumb|600px|right|EASY plug IR Receiver Module]]
Infrared receiver is a component with functions of reception, amplification, and demodulation. <br>
The internal IC has already been demodulated so that can directly output digital signal. <br>
Well, it will be also easy to make your own IR controller using IR transmitter. <br>
* Socket: Easy plug
* Power Supply: 5V
* Interface:Digital
* Modulate Frequency: 38Khz
<br>
'''Connect It Up'''<br>
Connect the EASY Plug Infrared receiver module to control board using an RJ11 cable.
<br>[[File:ks0125.jpg|500px|frameless|thumb]]<br>
<br>
'''Upload the Code'''<br>
<br>[[File:ks0398 22.1.png|500px|frameless|thumb]]<br>
<br>
'''What You Should See'''<br>
<br>[[File:ks0398 22-1.png|500px|frameless|thumb]]<br>
Done uploading the code, when aiming at the IR receiver, press down the key on an IR remote controller, you should see the key decoding is displayed on the serial monitor. If long press the key, it will appear wrong code FFFFFFFF.
<br>[[File:ks0125 Result.png|600px|frameless|thumb]]<br>
<br>[[File:ks0398 22-2.png|500px|frameless|thumb]]<br>
<br>
<span style="color: red">'''Little Knowledge:'''</span> <br>
This test can record all your remote control key decoding. So you can apply them to the next experiment to control LED lights. 
<br>
====Remote Controlled Light====
'''Hookup Guide'''<br>
Connect the EASY Plug Infrared receiver module and LED module to control board using RJ11 cables.
<br>[[File:红外接收灯.jpg|500px|frameless|thumb]]<br>
<br>
'''Test Code'''<br>
<br>[[File:ks0398 22.2.png|500px|frameless|thumb]]<br>
'''What You Should See'''<br>
Upload success, press the key 1 on your remote controller, LED lights up. Then press the key 2, LED is turned off.
<br>[[File:ks0398 22-4.png|500px|frameless|thumb]]<br>
<span style="color: red">'''Little Knowledge:'''</span> <br>
If you want to change another remote control key, you should be able to change your remote key decoding. Shown below.
<br>[[File:ks0398 22-3.png|500px|frameless|thumb]]<br>
After that, upload the code again and have a try.
<br>
==Resources==
* Keyestudio Official Website: http://www.keyestudio.com/<br>
* Keyestudio WIKI Website: http://wiki.keyestudio.com/<br>
* User Guide Download: <br>
https://drive.google.com/open?id=18LIx8Tp8oUYidKidEuqbhHS_EktBGEBp
* Download all the information here: <br>
https://drive.google.com/open?id=1yuif8ccIuPNRuqow0hP16eHJu2flHuj1
* Arduino Software: <br>
https://www.arduino.cc/en/Main/OldSoftwareReleases#1.5.x
<br>
==Our Tutorial==
From the tutorial, you will learn all the basic information about EASY Plug controller board, sensor module, very easy to play and and to make interactive projects. Enjoy your time! <br>
Well, it's just the beginning of programming journey. There are more and more awesome projects for you to explore. <br>
Furthermore, our KEYESTUDIO research and development team will continue to explore on this path, walking you through the basics up to complex projects. <br>
Hope that you can enjoy our works!
<br>
==About keyestudio==
Located in Shenzhen, the Silicon Valley of China, KEYES DIY ROBOT CO.,LTD is a thriving technology company dedicated to open-source hardware research & development, production and marketing. <br>
Keyestudio is a best-selling brand owned by KEYES Corporation, our product lines range from Arduino boards, shields, sensor modules, Raspberry Pi, micro:bit extension boards and smart car to complete starter kits designed for customers of any level to learn programming knowledge. <br>
All of our products comply with international quality standards and are greatly appreciated in a variety of different markets throughout the world.<br>
For more details of our products, you can check it from the links below.<br>
Official website: http://www.keyestudio.com/<br>
US Amazon storefront: http://www.amazon.com/shops/A26TCVWBQE4D9T<br>
CA Amazon storefront: http://www.amazon.ca/shops/A26TCVWBQE4D9T<br>
UK Amazon storefront:http://www.amazon.co.uk/shops/A39F7KX4U3W9JH<br>
DE Amazon storefront: http://www.amazon.de/shops/A39F7KX4U3W9JH<br>
FR Amazon storefront: http://www.amazon.de/shops/A39F7KX4U3W9JH<br>
ES Amazon storefront: http://www.amazon.de/shops/A39F7KX4U3W9JH<br>
IT Amazon storefront: http://www.amazon.de/shops/A39F7KX4U3W9JH<br>
US Amazon storefront: http://www.amazon.com/shops/APU90DTITU5DG<br>
CA Amazon storefront: http://www.amazon.ca/shops/APU90DTITU5DG<br>
JP Amazon storefront: http://www.amazon.jp/shops/AE9VWCCXQIC6J<br>
<br>
<br>
 
 
* [https://keyestudio.aliexpress.com/store/new-arrivals/1452162.html?spm=2114.12010612.0.0.a94f484ewotBOX&tracelog=newarrivals_tab  Get one set from the aliexpress store]
==Customer Service==
As a continuous and fast growing technology company, we keep striving our best to offer you excellent products and quality service as to meet your expectation. <br>
We look forward to hearing from you and any of your critical comment or suggestion would be much valuable to us.<br>
You can reach out to us by simply drop a line at '''Fennie@keyestudio.com ''' <br>
Thank you in advance.<br>


<br>
<br>
==Buy From ==
*[https://www.keyestudio.com/2019-new-keyestudio-easy-plug-ultimate-starter-kit-for-arduino-stem-edu-p0522-p0522.html  Official Website ]


==Customer Service==
*[https://www.amazon.com/dp/B07Q8G2PSB  Available on amazon]
As a continuous and fast growing technology company, we keep striving our best to offer you excellent products and quality service as to meet your expectation.  
We look forward to hearing from you and any of your critical comment or suggestion would be much valuable to us. <br>
You can reach out to us by simply drop a line at keyestudio@126.com <br>
Thank you in advance.


Here comes a keyestudio mini tank robot advanced version.This tank robot is essentially a two-drive tracked vehicle.<br>
*[https://keyestudio.aliexpress.com/store/new-arrivals/1452162.html?spm=2114.12010612.0.0.a94f484ewotBOX&tracelog=newarrivals_tab  Get one set from aliexpress ]
The tank robot platform mainly uses the UNO R3 control board and L298P driver shield, no soldering and easy to play. <br>
Mini tank robot is a learning application development system of microcontroller based on Arduino and Mixly blocks. The tank robot kit is designed specifically for those who are interested in learning about Arduino and electronics. <br>

Latest revision as of 15:16, 18 May 2022

EASY PLUG Ultimate Starter Kit For Arduino STEM EDU

Kit Description

The keyestudio EASY PLUG ultimate 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, sound control, learn Mixly Blocks programming, and much more.
These boards and modules are the best to start learning and tinkering with electronics and coding.
The Starter Kit includes a user guide with 22 tutorials that will walk you through the basics up to complex projects.
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 Green LED Module 1
thumb
3 EASY plug Yellow LED Module 1
thumb
4 EASY plug Red LED Module 1
thumb
5 EASY plug Passive Buzzer Module 1
thumb
6 EASY plug Photocell Sensor 1
thumb
7 EASY plug Soil Humidity Sensor 1
thumb
8 EASY plug Analog Gas Sensor 1
thumb
9 EASY plug TEMT6000 Ambient Light Sensor 1
thumb
10 EASY plug slide potentiometer module 1
thumb
11 EASY plug Capacitive Touch Sensor 1
thumb
12 EASY plug Knock Sensor 1
thumb
13 EASY plug Flame Sensor Module 1
thumb
14 EASY plug PIR Motion Sensor 1
thumb
15 EASY plug DS18B20 Temperature Sensor 1
thumb
16 EASY plug IR Receiver Module 1
thumb
17 EASY plug Infrared Obstacle Detector Sensor 1
thumb
18 EASY plug DS3231 Clock Module 1
thumb
19 EASY plug Joystick Module 1
thumb
20 EASY plug SR01 Ultrasonic Module 1
thumb
21 EASY plug OLED Module 1
thumb
22 EASY plug L9110 Fan Motor Module 1
thumb
23 EASY plug Servo Module 1
thumb
24 Keyestudio 9G blue Micro Servo 90° 1
thumb
25 EASY plug 2812 2x2 full-color RGB Module 1
thumb
26 200mm blue RJ11 cable 5
thumb
27 300mm blue RJ11 cable 3
thumb
28 USB cable 1
thumb
29 Acrylic Board 1
thumb
30 Dual-pass M3*15MM Copper Pillars 1
thumb
31 M3*10MM Round Head Screws 1
thumb


Install Mixly and Driver

Download 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.

②Download and install Mixly1.0 software

There are two kind installation packages provided for you in the following links:

Mixly1.0 for Win 7/8/10:https://fs.keyestudio.com/Mixly1-Windows
Mixly1.0 for Mac:https://fs.keyestudio.com/Mixly1-MACOS

Windows version:
We will take Mixly1.0 (Windows version) as example.
Install Software:
You will get installation package after downloading. As shown below:


图片1。0.0.png

Unzip the package, you will see “Mixly 1.0 for keyestudio.exe”
图片1。0.1.png

Double-click ”Mixly 1.0 for keyestudio.exe”, the following interface pops up.
图片1。0.2.png


We have to choose correct Arduino development board and name, as shown below:

20201228110445.png

Select correct COM port(the corresponding port will be shown after installing driver successfully)

20201228110446.png

You have to know the function of every area and interface on Mixly software before uploading program on Arduino development board.


图片1。0.3.png

QQ图片20200707142747.png

More information about Mixly 1.0 for keyestudio:https://wiki.keyestudio.com/Getting_Started_with_Mixly1.0



Install the driver of the development board

Next, we will introduce the driver of the development board. The driver installation may have slight differences in different computer systems. So in the following let’s take an example of the driver installation in the WINDOWS system.

Mixly 1.0 for keyestudio folder contains its software and driver files. Before we launch the Mixly software, you only need to install the USB drivers.

Double-click the Mixly 1.0 for keyestudio folder—> arduino—>drivers

The driver files are shown below:


20201228110449.png


044602.png

Connect the EASY Plug control board V2.0 to the computer with a USB cable.
Right click the icon of your“Computer”—>“Properties”—>“Device manager”.

If your computer is Windows10, the USB Serial Device(COM8) will be shown. That indicates that the USB driver is installed. But for other systems like Windows 7 or 8, you may have to install the USB driver manually.


图片1jhfgjf-4.png

Right-click USB Serial Device(COM8) to select Update driver


图片1jhfgjf-5.png


图片1jhfgjf-6.png

Click “browse my computer for updated driver software”, find out the drivers folder and enter “driver” to search in rectangular box.
Click “Next”, the driver will be installed successfully.


图片1jhfgjf-7.png

Click Install to wait for the installation



图片1jhfgjf-8.png

图片1jhfgjf-9.png

Click Close and you can see the following device in the Device Manager.


File:图片1jhfgjf-10.png

If your computer is Windows7/8, please follow our instruction.

When you connect the board to your computer at the first time, right-click the icon of your “Computer” —>for “Properties”—> click “Device manager”, under “Other Devices”, you should see an icon for “Unknown device” with a little yellow warning triangle next to it.


图片1jhfgjf-11.png

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


图片1jhfgjf-12.png

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


图片1jhfgjf-13.png

Click “Browse”, then find out the drivers folder and enter “driver” to search in rectangular box. Click “Next”, the driver will be installed successfully. (I place Arduino software folder on the desktop, you could follow my way)


图片1jhfgjf-14.png


图片1jhfgjf-15.png


The driver of your device is already installed.

Click“Close”


图片1jhfgjf-16.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.


图片1jhfgjf-17.png


Start the first program

Click “Open”→ sample → arduino→ Arduino → 01 IN-OUT→01-LED Blink.mix


图片1jhfgjf-18.png

We have to choose correct Arduino development board and name, as shown below:


图片1jhfgjf-19.png

The corresponding board and COM port will be shown after setting board and COM port.


图片1jhfgjf-20.png

图片1jhfgjf-21.png

图片1jhfgjf-22.png

Click Upload to upload the program


图片1jhfgjf-23.png


Upload successfully. After uploading the program successfully, the onboard LED lights up for 1s, lights off for 1s.


Import the Library

Open Mixly 1.0 for keyestudio software, click“Import”then select“Local import”, as shown below:
图片1jhfgjf-24.png
Double-click the folder“KS_EasyPulg”and select“KS_EasyPulg”library file
图片1jhfgjf-25.png

图片1jhfgjf-26.png
After importing it, you will see it in the blocks list. Also, the interface will show “import custom library successfully!”
图片1jhfgjf-27.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

Arduino quickstart.jpg

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.
thumb

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.

红绿黄.png

Component Required

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



Component Introduction:
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
thumb
The LED will flash on for one second, then blink off 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.

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

Little Knowledge:
Here no connection diagram, which port should you choose? Yeah, Pin 5.
See the code, you can modify the connection pin here.

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: Knocking

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. We will make a simple experiment, testing the knock sensor.

Component Required

  • EASY plug control board*1
  • EASY plug Knock Sensor *1
  • RJ11 cable *2
  • USB cable*1

Component Introduction

EASY plug Knock Sensor

The knock sensor is mainly composed of SW-280 vibration switch, which is an inductive proximity switch. It is an electronic switch that transmits the sensing result to the circuit device and induces the circuit to start working when the vibration force is induced. The module comes with a positioning hole for you to fix it to other devices. You can make full use of it with creative thinking, like electronic drum, and so on.

  • Connector: Easy plug
  • Working voltage: 5V
  • Sensor type: Digital


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


Upload the Code

thumb


What You Should See
Done uploading the code, if knock the module hard, the led will be turned on.
thumb

thumb

Project 4: How much light

Overview
In this project, you’ll be using a photo resistor module, which changes resistance based on how much light the sensor receives.

Component Required

  • EASY plug control board*1
  • EASY plug Photocell Sensor *1
  • EASY plug LED module*1
  • RJ11 cable *2
  • USB cable*1


Component Introduction

EASY plug Photocell Sensor

A photoresistor or light-dependent resistor (LDR) or photocell is a light-controlled variable resistor. The principal is very simple. The resistance of photoresistor varies with incident light intensity. If the incident light intensity is high, the resistance decreases; if the light intensity is low, the resistance increases. keyestudio EASY Plug photocell sensor is a semiconductor, integrated with a photoresistor, easy to use and very convenient for wiring. It has features of high sensitivity, quick response, spectral characteristic and R-value consistence. It can be applied in light-sensitive detector circuits, intelligent switch design and light- and dark-activated switching circuits.

  • Interface: Easy plug
  • Working voltage: 5V


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

Upload the Code

thumb


What You Should See
Done uploading the code, you should see the analog value change in accordance with how much light your photoresistor is sensing.
thumb

thumb


Controlling light brightness

Hookup Guide
Connect the EASY Plug photocell sensor and LED module to control board using RJ11 cable.
thumb

Test Code
Below is an example code for three LED modules experiment.
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


Project 5: Buzzer clicking

Overview
In this project, we’ll bridge the gap between the digital world and the analog world. We’ll be using a buzzer module that makes a small “click” when you apply voltage to it (try it!).

Component Required

  • EASY plug control board*1
  • EASY plug Passive Buzzer Module*1
  • RJ11 cable*1
  • USB cable*1

Component Introduction

EASY plug Passive Buzzer Module


We can use Arduino to make many interactive works of which the most commonly used is acoustic-optic display.
The buzzer we introduced here is a passive buzzer. It cannot be actuated by itself, but by external pulse frequencies.
Different frequencies produce different sounds. You can use Arduino to code the melody of a song, which is quite fun and simple.

  • Interface: Easy plug
  • Working voltage: 3.3-5v
  • Sensor type: digital


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

Upload the Code

thumb


What You Should See
Done uploading the code, you should be able to hear the buzzer module make a small “click”.
thumb

thumb


Project 6: Capacitive Touch

Overview
Are you tired of clicking mechanic buttons? Well, try our capacitive touch sensor. In this project, we’ll use the EASY Plug touch sensor to make a simple test.

Component Required

  • EASY plug control board*1
  • EASY plug Touch Sensor *1
  • EASY plug LED Module *1
  • RJ11 cable *2
  • USB cable*1

Component Introduction

EASY plug Capacitive Touch Sensor

You can find touch sensors mostly on electronic device. Instead of buttons, upgrade your Arduino project with our new version touch sensor and make it cool!
This EASY Plug digital capacitive touch sensor provides a one-touch style switch on your Arduino project. It uses the most popular capacitive sensing technology which is the same as your mobile phone.
This little sensor can "feel" people and metal touch and feedback a high/low voltage level. Even isolated by some cloth and paper, it can still feel the touch. The sensitivity will decrease as the isolation getting thick.

  • Supply Voltage: 3.3V to 5V
  • Sensor type: Digital
  • Function range: 0℃ to 100℃

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


Test Code
Below is an example code.
thumb


What You Should See
Done uploading the code, when you touch the sensor, the led on the sensor will light up.
thumb

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


Simulating Table Lamp

Test 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 touch the sensor.
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.

thumb



Project 7: Fire extinguishing

Overview
How to blow out the fire? You might be able to use this fan module to add flavor to your own interesting projects.

Component Required

  • EASY plug control board*1
  • EASY plug Fan Motor Module*1
  • RJ11 cable*1
  • USB cable*1

Component Introduction

EASY plug Fan Motor Module

The fan motor module uses the L9110 driver to control the forward and reverse rotation of propeller, which can easily blow out the fire of a lighter 20cm away.
It should be connected to the double digital port with only one line, pretty convenient.
Make an air aerial propeller vessel, a cooling system, or spinning machine with this small fan module. Add flavor to your own interesting projects with this module. This module is commonly used for STEM class.

  • Fan diameter: 75mm
  • Interface: double digital
  • Working voltage: 5V

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

Upload the Code

thumb

What You Should See
Done uploading the code, the motor fan will rotate forward for 3 seconds, and then rotate reverse for 3 seconds, repeatedly.
thumb


Project 8: There’s flame

Overview
What's the simplest way to check the fire happened? Use a flame sensor. In this project, we simply test the flame sensor to turn on led if detecting flame.

Component Required

  • EASY plug control board*1
  • EASY plug Flame Sensor *1
  • EASY plug LED Module*1
  • EASY plug Fan Motor*1
  • RJ11 cable *2
  • USB cable*1


Component Introduction

EASY plug Flame Sensor Module

The flame sensor can be used to detect fire or other wavelength at 760nm ~1100nm light.
In the fire-fighting robot game, the flame plays an important role in the probe, which can be used as the robot's eyes to find fire source.
The potentiometer on the flame sensor can be used to adjust the sensitivity.

  • Supply Voltage: 3.3V to 5V
  • Detection range: 500px (4.8V) ~ 2500px (1V)
  • Spectral Bandwidth Range: 760nm ~ 1100nm
  • Operating temperature: -25℃ to 85℃
  • Sensor type: digital


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


Upload the Code

thumb


What You Should See
Done uploading the code, put a lighter close to the flame sensor. Once the sensor detects the flame, the led lights up.
If isn’t, you are able to adjust the sensitivity by a potentiometer.
thumb


Little Knowledge:

  • You are able to adjust the sensitivity by a blue potentiometer on the sensor.
EASY plug Flame Sensor Module


Simulating Fire Extinguisher

Let’s go into an interesting project. When detecting the flame by flame sensor, the fan motor will rotate to blow out the fire.
Hookup Guide

thumb


Test Code

thumb


What You Should See
Done uploading the code, put a lighter close to the flame sensor. Once the sensor detects the flame, you should see the fan motor run.
thumb


Project 9: Avoiding obstacles

Overview
Why some intelligent robots can automatically avoid an obstacle ahead? Easily, use an obstacle avoidance sensor. In this project, we’ll simply test the obstacle avoidance sensor.

Component Required

  • EASY plug control board*1
  • EASY plug obstacle detector sensor *1
  • EASY plug LED module *1
  • EASY plug motor *1
  • RJ11 cable *2
  • USB cable*1

Component Introduction

EASY plug Obstacle Avoidance Sensor

Infrared obstacle avoidance sensor is equipped with distance adjustment function and is especially designed for wheeled robots.
This sensor has strong adaptability to ambient light and is of high precision. It has a pair of infrared transmitting and receiving tube.
When infrared ray launched by the transmitting tube encounters an obstacle (its reflector), the infrared ray is reflected to the receiving tube, after a comparator circuit processing, the indicator will light up.
You can adjust the detection distance by rotating the potentiometer knob, the effective distance range of 2~40cm.
They can be widely used in robot obstacle avoidance, avoidance car, line count, and black and white line tracking and many other occasions.

  • Working voltage: DC 3.3V-5V
  • Working current: ≥20mA
  • Working temperature: -10℃ to+50℃
  • Detection distance: 2~40cm
  • Output signal: TTL voltage
  • Effective Angle: 35°


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

Test Code

thumb

What You Should See

thumb
Done uploading the code, when the sensor detects an obstacle, the led is turned on.
thumb


Controlling Motor

In the previous section, we use the obstacle detector sensor to control the LED on and off. Now, let’s try another play, controlling the motor rotating.
Hookup Guide

thumb

Test Code

thumb

What You Should See
Done uploading the code, when the sensor detects an obstacle, the fan motor rotates. Otherwise, fan motor stops.
thumb

Troubleshooting:

  • Compiling Fails ?

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

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

Project 10: Servo

Overview
This lesson we are going to rotate the servo motor.

Component Required

  • EASY plug control board*1
  • EASY plug Servo Module *1
  • Keyestudio Micro Servo *1
  • RJ11 cable *1
  • USB cable*1


Component Introduction
If you want to use the Micro Servo and EASY PLUG control board to do some experiments, you need to use the EASY plug Servo extension module.
The EASY plug Servo module is extended into Registered Jack, so you can connect it to EASY PLUG control board using only a RJ11 cable.
The Servo module also comes with 3pins of 2.54mm pin pitch, fully compatible with servo pins.

EASY plug Servo Module +Micro Servo


Servo motor comes with many specifications. But all of them have three connection wires, distinguished by brown, red, orange colors. Brown one is for ground, red one for power positive, orange one for signal line.
Included with your Micro Servo you will find a variety of white motor mounts that connect to the shaft of your servo.
You may choose to attach any mount you wish for the circuit. It will serve as a visual aid, making it easier to see the servo spin.

The rotation angle of servo is controlled by regulating the duty cycle of the PWM(Pulse-Width Modulation) signal.
The standard cycle of the PWM signal is fixed at 20ms (50 Hz), and the pulse width is distributed between 1ms-2ms.
The pulse width corresponds to the rotation angle ( 0°~90°) of servo.

thumb

Micro Servo Parameters

  • Operating voltage: DC 4.8V〜6V
  • Angle range: about 90°(in 1000→2000μsec)
  • Pulsewidth range: 1000→2000μsec
  • No-load speed: 0.12±0.01 sec/60(DC 4.8V); 0.1±0.01 sec/60(DC 6V)
  • No-load current: 200±20mA(DC 4.8V); 220±20mA(DC 6V)
  • Stop torque: 1.1±0.01kg/cm(DC 4.8V); 1.3±0.1kg/cm(DC 6V)
  • Stop current: 600±30mA(DC 4.8V); 750±30mA(DC 6V)
  • Standby current: 4±1mA(DC 4.8V); 4±1mA(DC 6V)
  • Operation temperature: -10℃〜50℃
  • Save temperature: -20℃〜60℃
  • Motor wire length: 250 ± 5 mm


Connect It Up
Connect the servo motor to EASY Plug Servo module. Brown line is for ground, red one for V pin, orange one for signal pin. Then connect them 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, enter the number 1 to 9, and click Send, it will control the servo motor rotate at a certain angle.
thumb

thumb

Rotating back and forth

Complete the above project, you can also upload the code below to control the servo motor rotating back and forth at a certain angle.
Test Code

thumb

Project 11: Slide Position

Overview
This lesson you will learn how to use slide potentiometer to control the LED brightness and servo rotation.

Component Required

  • EASY plug control board*1
  • EASY plug slide potentiometer *1
  • EASY plug LED module*1
  • Servo motor *1
  • RJ11 cable*2
  • USB cable*1
EASY plug Slide Potentiometer

Component Introduction
The EASY plug slide potentiometer uses high quality sliding appliances for stable and reliable performance. It is a dual analog output that outputs a 0-VCC analog voltage signal. The module pins are extended into Registered jack, so you can easily connect it to EASY Plug control board using a RJ11 cable.
There are 6 pad interfaces on the module. So you can solder two 3pin headers with a pitch of 2.54mm on the module.
It can be used to connect with other MCUs. The signal terminal outputs two analog values. The sum of the two analog values is 1023.


Connect It Up
Connect the EASY Plug Slide Potentiometer module 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;
you should be able to see the analog value of analog pin A6,A7. If slide the slider, the value will change.
thumb


Controlling LED Brightness

Except from reading the analog value of slide potentiometer, you are able to use the slide potentiometer to control the brightness of LED.
Hookup Guide

thumb


Test Code

thumb


What You Should See
After uploading the code, slide the potentiometer, the brightness of LED will change.


Controlling Servo Angle

Hookup Guide

thumb


Test Code

thumb


What You Should See
After uploading the code, slide the potentiometer, the servo motor will rotate to a certain angle.


Project 12: RGB

Overview
This lesson we are going to show you shiny light color.
Component Required

  • EASY plug control board*1
  • EASY plug RGB module *1
  • RJ11 cable*1
  • USB cable*1


Component Introduction

EASY plug 2812 2x2 full-color RGB Module

EASY plug 2812 2x2 full color RGB module is a smart external control LED light source that integrates control circuit and lighting circuit.
Each LED has the same appearance as a 5050 LED bead, and each component is a pixel point.
The pixel point includes an intelligent digital interface data latch signal shaping and amplifying driving circuit, as well as a high-precision internal oscillator and a 12V high-voltage programmable constant current control part, which effectively ensures that the color of the pixel point light is highly uniform.
The data protocol adopts the single-line return-to-zero code communication mode. After power-on and reset the pixel point, the S pin receives the data transmitted from the controller. And the 24-bit data are extracted by the first pixel and then sent to the data latch inside the pixel point.
LED has advantages of low voltage drive, environmental protection and energy saving, high brightness, wide scattering angle, good consistency, ultra low power, long life and so on.


Specifications

  • Operating Voltage: DC5V
  • Power: 0.1W
  • Light Source: SMD 5050 RGB
  • IC model: 4 / WS2811
  • Gray level: 256 levels
  • Illumination angle: 180°
  • Luminous color: can be adjusted by the controller, white, red, yellow, blue, green, etc.


Connect It Up

thumb


Upload the Code

thumb


What You Should See

thumb
After uploading the code, you should see the 4 RGB LEDs flashing in red, green, and blue,circularly.
thumb

thumb


Project 13: Someone is in this area!

Overview
How can we know someone enters and leaves a certain area? Great, use a PIR motion sensor. The PIR sensor allows to detect motion.That information can be useful, for example, to trigger an alarm or to turn on the lights.


Component Required

  • EASY plug control board*1
  • EASY plug PIR Motion Sensor*1
  • EASY plug LED module*1
  • EASY plug Fan motor*1
  • RJ11 cable*3
  • USB cable*1


Component Introduction

EASY plug Flame Sensor Module

PIR stands for Pyroelectric Infrared (many times, they are also referred as Passive Infrared sensors). This is because their principle of operation is based on the detection of infrared energy emitted by a moving body.
The PIR sensor can detect infrared signals from a moving person or moving animal, outputting switching signals.
One important thing to mention is that when motion is detected, the output will stay high for 2.3 to 3 seconds after the motion stops.
Regarding the power supply, it can work with voltages of both 3.3V and 5V. The device has a detection range of 7 meters and a detection angle of 100º.

  • Input Voltage: 3.3 ~ 5V, Maximum 6V
  • Working Current: 15uA
  • Working Temperature: -20 ~ 85℃
  • Output Voltage: High 3V, Low 0V
  • Output Delay Time (High Level): About 2.3 to 3 Seconds
  • Detection angle: 100°
  • Detection distance: 7 meters
  • Pin limit current: 100mA


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


Test Code

thumb


What You Should See
After uploading the code, slide the potentiometer, the servo motor will rotate to a certain angle.
thumb
Done uploading the code, if the sensor detects someone moving nearby, you should see the LED is turned on.
thumb
Open the serial monitor and set the baud rate to 9600, it will print out the data.
thumb


Controlling Fan Motor

Hookup Guide

thumb

Test Code

thumb

What You Should See
If the sensor detects someone moving nearby, you should see the LED is turned on, and the fan motor is rotating. Otherwise, LED is turned off and motor stops rotating.
thumb

thumb


Project 14: Joystick

Overview
Lots of robot projects need joystick. This joystick module provides an affordable solution. In the following, we are going to test the joystick.

Component Required

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


Component Introduction

EASY plug Joystick Module

Lots of robot projects need joystick. This module provides an affordable solution.
By simply connecting to two analog inputs, the robot is at your commands with X, Y control.
It also has a switch that is connected to a digital pin.
This joystick module can be easily connect to EASY PLUG control board with only one cable.

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


Connect It Up
Connect the EASY Plug Joystick module to control board using an RJ11 cable.
thumb
Note: X-axis is connected to A6, Y-axis is connected to A7, Z-axis is default by D2


Upload the Code

thumb


What You Should See

thumb

Done uploading the code, open the serial monitor and set the baud rate to 9600. If push the Joystick button towards different direction, you should get the different value.
thumb


Controlling LED Lights


Hookup Guide

thumb

Test Code

thumb

What You Should See
Upload the code successfully, push the Joystick X-axis to downward, the LED light connected to D5 will become off.
If push the Joystick Y-axis to leftward, the LED light connected to D6 will be turned off. Z-axis will control the LED light connected to D7.
thumb

thumb


Project 15: Ambient Light

Overview
This project we will test the ambient light. You can use analog reading to read the data from this sensor.
Component Required

  • EASY plug control board*1
  • EASY plug TEMT6000 Light Sensor *1
  • EASY plug LED module *1
  • EASY plug RGB module *1
  • RJ11 cable *2
  • USB cable*1


Component Introduction

EASY plug TEMT6000 Ambient Light Sensor

Light sensors are probably one of the most common sensors in life. They can be found in your laptop, phone or home lighting system.
A light sensor measures the level of light in a room or ambient light in a space.
This EASY plug TEMT6000 light sensor uses a special ambient light detector (TEMT6000) with spectral response that closely emulates the human eye.
It does react well to very small changes in a wide range of brightness, however, it does not react well to IR or UV light.
The sensor can help you to to detect the light density.

  • Supply Voltage: +5V DC 50mA
  • Interface:Analog Input
  • Near Human Eye Spectral Response and Very Low IR Sensitivity


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


Upload the Code

thumb


What You Should See

thumb
Done uploading the code, open the serial monitor and set the baud rate to 9600, you should be able to see the printed analog value.
When the sensor detects different light intensity, the brightness of LED will change.

thumb

thumb


Controlling RGB Flash


Hookup Guide

thumb


Test Code

thumb


What You Should See
Upload the code successfully, when the measured light intensity is less than 50, RGB lights are turned on.
Light 1 flashes in red, light 2 flashes in green, light 3 flashes in blue, light 4 flashes in white, with a delay time 500ms.

thumb

thumb


Project 16: Hello, kaka!

Overview
An OLED (organic light-emitting diode) can be widely used in mobile devices for display applications.
In the project, we will show you how to use an OLED module to display the text.

Component Required

  • EASY plug control board*1
  • EASY plug OLED Module*1
  • RJ11 cable*1
  • USB cable*1

Component Introduction

EASY plug OLED Module

OLED is short for organic light emitting diode. On the microscopic level, an OLED display is a matrix of organic LEDs that light up when they emit energy.
Our EASY Plug OLED displays are perfect when you need a small display with vivid, high-contrast color. The visible portion of the OLED measures 0.96" diagonal and contains 128 x 64 pixels.
An OLED display works without a backlight. Thus, it can display deep black levels and can be thinner and lighter than a liquid crystal display (LCD).
In low ambient light conditions such as a dark room an OLED screen can achieve a higher contrast ratio than an LCD.
OLED technology is used in commercial applications such as displays for mobile phones and portable digital media players, car radios and digital cameras among others.


Specifications

  • 0.96" diagonal OLED
  • Pixels: 128 × 64
  • Color Depth: Monochrome(White)
  • 5V power
  • Brightness (cd/m2): 100(Typ)


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


Upload the Code

thumb


What You Should See

thumb
Done uploading the code, you should be able to see the text is displayed on the OLED screen.
thumb


Troubleshooting:

  • Upload Failed ?

This happens sometimes, the most likely case is a confused Board and serial port, you should firstly select your proper board and port.
Or make sure you have placed all the libraries below into arduino-1.8.5 libraries folder directory.
Pay more attention that the library folder can’t be overlapped.
thumb

thumb


Project 17: I’m thirsty

Overview
This lesson we are going to use the soil sensor to detect the soil moisture of your plant.

Component Required

  • EASY plug control board*1
  • EASY plug soil moisture sensor*1
  • EASY plug OLED module*1
  • RJ11 cable * 2
  • USB cable*1

Component Introduction

Keyestudio EASY plug Soil Moisture Sensor


The EASY Plug soil moisture sensor can read the amount of moisture present in the soil surrounding it. It's an ideal for monitoring an urban garden, or your pet plant's water level.
This soil moisture sensor uses the two probes to pass current through the soil, and then it reads that resistance to get the moisture level.
More water makes the soil conduct electricity more easily (less resistance), while dry soil conducts electricity poorly (more resistance).
If you use this sensor to make an automatic watering device, it will be helpful to remind you to water your indoor plants or to monitor the soil moisture in your garden.

  • Connector: Easy plug
  • Power Supply: 3.3V or 5V
  • Working Current: ≤ 20mA
  • Output Voltage: 0-2.3V
  • Sensor type: Analog output
  • Surface finish: immersion tin

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

Upload the Code

thumb

What You Should See

thumb
Done uploading the code, open the serial monitor and set the baud rate to 9600, you can see the analog value is 0.
When place the two probes of moisture sensor into your plant soil, you can see the value change.

thumb
thumb


Adding OLED Display

If you want to display the soil moisture value more convenient, you can add OLED screen.

Hookup Guide

thumb

Test Code

thumb

What You Should See
Upload success, you should see the soil value is showed on the OLED screen.
thumb

Project 18: Is there gas leakage?

Overview
This project we will test the gas sensor. You can use analog reading to read the data from this sensor.
Component Required

  • EASY plug control board*1
  • EASY plug Analog Gas Sensor *1
  • EASY plug OLED module*1
  • RJ11 cable*2
  • USB cable*1

Component Introduction

EASY plug Analog Gas Sensor

This analog gas sensor - MQ2 is used in gas leakage detecting equipment in consumer electronics and industrial markets.
This sensor is suitable for detecting LPG, I-butane, propane, methane, alcohol, Hydrogen and smoke. It has high sensitivity and quick response.
In addition, the sensitivity can be adjusted by the potentiometer.

  • Interface: Easy plug
  • Power supply: 5V
  • Interface type: Digital and Analog
  • Wide detecting scope
  • Simple drive circuit
  • Stable and long lifespan
  • Quick response and High sensitivity

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

Upload the Code

thumb

What You Should See

thumb
Done uploading the test code, open the serial monitor and set the baud rate to 9600, you should be able to see the analog value.
thumb

thumb


Adding OLED Display

If you want to display the gas analog value more convenient, you can add OLED screen.

Hookup Guide

thumb

Test Code

thumb

What You Should See
Upload success, you should be able to see the analog value is showed on the OLED screen.
thumb


Project 19: Ultrasonic ranging

Overview
The distance sensors are really commonly seen in robotics projects. So in this project we will measure the distance with an ultrasound sensor.

Component Required

  • EASY plug control board*1
  • EASY plug SR01 Ultrasonic *1
  • EASY plug LED module *1
  • RJ11 cable *2
  • USB cable *1


Component Introduction

EASY plug SR01 Ultrasonic Module

This EASY Plug SR01 Ultrasonic module includes ultrasonic transmitter, receiver and corresponding control circuit.
It should be connected to the double digital interface with only one line, which is very convenient. The distance sensor are really common in robotics projects, very useful for automation, interactive art and motion sensing.
The module comes with four fixed holes, so that can easily fix it on other devices, such as the servo plastic platform and so on.

  • Operating Voltage: DC 5V
  • Operating Current: 15mA
  • Operating Frequency: 40KHz
  • Max Range: 3--5m
  • Min Range: 2cm
  • Measuring Angle: 15 degree
  • Trigger Input Signal: 10µS TTL pulse
  • Interface:double digital


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

Upload the Code

thumb

What You Should See
Done uploading the code, open the serial monitor and set the baud rate to 9600. You should see the measured distance between the ultrasonic sensor and front obstacle.
thumb
thumb


Turn on Light


When the measured distance between an obstacle and ultrasonic sensor is less than a certain range, turn the led on.

Hookup Guide

thumb

Test Code

thumb

What You Should See
Upload success, when the measured distance is less than 30, the LED will be turned on. Otherwise, the LED is turned off.
thumb

thumb


Little Knowledge:

  • You can modify the setting distance in the code here, so that turn on or off led according to the obstacle distance measured by ultrasonic sensor.


thumb


Project 20: What’s the temperature

Overview
In this project, you will learn how to use the temperature sensor with your EASY Plug control board, and display the analog temperature value on the serial monitor.

Component Required

  • EASY plug control board*1
  • EASY plug DS18B20 Sensor *1
  • EASY plug OLED Module*1
  • RJ11 cable *2
  • USB cable*1

Component Introduction

EASY plug DS18B20 Temperature Sensor


The DS18B20 temperature sensor is exactly what it sounds like - a sensor used to measure ambient temperature.
The usable temperature ranges from -55°C to +125°C. It also supports multi-point mesh networking.
While there are many types of temperature sensors available in the market, the DS18B20 temperature sensor is the best choice in applications which require high accuracy and high reliability.
For electronic enthusiasts and hobbyists, the DS18B20 is a good start for learning and developing temperature-dependent prototypes.

  • Supply Voltage: 3.3V to 5V
  • Temperature range: -55°C to +125°C
  • Interface: Digital

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

Upload the Code

thumb

What You Should See

thumb
Done uploading the code, open the serial monitor, on the window will print out the Celsius and Fahrenheit value.
thumb


OLED Display

Hookup Guide

thumb

Test Code

thumb

What You Should See
Upload success, you should be able to see the Celsius and Fahrenheit value are printed out on the OLED screen.
thumb


Troubleshooting:

  • OLED Not Lighting Up?

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

  • Upload Failed ?

This happens sometimes, the most likely case is a confused Board and serial port, you should firstly select your proper board and port.
Or check whether add the library or not.
thumb

thumb

thumb


Project 21: What time is it?

Overview
In this project, we will show you how to display the time and date.

Component Required

  • EASY plug control board*1
  • EASY plug DS3231 Clock Module*1
  • RJ11 cable*1
  • USB cable*1

Component Introduction

EASY plug DS3231 Clock Module

The DS3231 is a low-cost, extremely accurate I2C real-time clock (RTC) with an integrated temperature-compensated crystal oscillator (TCXO) and crystal.
A real-time clock (RTC) is a computer clock (most often in the form of an integrated circuit) that keeps track of the current time.
It integrated with a battery input, which can maintain accurate timekeeping when power off. The integrated crystal resonator ensures the accuracy of clock. So this RTC solution should be worth to try.

  • Temperature range: -40℃ to +85℃
  • Timing accuracy: about ± 5ppm
  • Output: 1Hz and 32.768kHz
  • High speed (400kHz), I2C serial bus
  • Supply voltage: 3.3V to 5.5V
  • Output Level: TTL level


Connect It Up
thumb


Upload the Code

thumb


What You Should See

thumb
Done uploading the code, open the serial monitor and set the baud rate to 9600, you should be able to see the date and the time.
thumb

Project 22: I receive a signal

Overview
Infrared devices are widely used, and often for remote controlled devices. With this IR receiver, your program project is now able to receive command from any IR remote controller. Next, let’s do a simple test.
Component Required

  • EASY plug control board*1
  • EASY plug IR Receiver Module *1
  • EASY plug LED Module *1
  • RJ11 cable*2
  • USB cable*1


Component Introduction

EASY plug IR Receiver Module

Infrared receiver is a component with functions of reception, amplification, and demodulation.
The internal IC has already been demodulated so that can directly output digital signal.
Well, it will be also easy to make your own IR controller using IR transmitter.

  • Socket: Easy plug
  • Power Supply: 5V
  • Interface:Digital
  • Modulate Frequency: 38Khz


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


Upload the Code

thumb

What You Should See

thumb
Done uploading the code, when aiming at the IR receiver, press down the key on an IR remote controller, you should see the key decoding is displayed on the serial monitor. If long press the key, it will appear wrong code FFFFFFFF.
thumb

thumb


Little Knowledge:
This test can record all your remote control key decoding. So you can apply them to the next experiment to control LED lights.

Remote Controlled Light

Hookup Guide
Connect the EASY Plug Infrared receiver module and LED module to control board using RJ11 cables.
thumb

Test Code

thumb

What You Should See
Upload success, press the key 1 on your remote controller, LED lights up. Then press the key 2, LED is turned off.
thumb

Little Knowledge:
If you want to change another remote control key, you should be able to change your remote key decoding. Shown below.
thumb
After that, upload the code again and have a try.



Resources

  • Download Arduino, Mixly Software :

https://fs.keyestudio.com/KS0398


Our Tutorial

From the tutorial, you will learn all the basic information about EASY Plug controller board, sensor module, very easy to play and and to make interactive projects. Enjoy your time!
Well, it's just the beginning of programming journey. There are more and more awesome projects for you to explore.
Furthermore, our KEYESTUDIO research and development team will continue to explore on this path, walking you through the basics up to complex projects.
Hope that you can enjoy our works!


About keyestudio

Located in Shenzhen, the Silicon Valley of China, KEYES DIY ROBOT CO.,LTD is a thriving technology company dedicated to open-source hardware research & development, production and marketing.
Keyestudio is a best-selling brand owned by KEYES Corporation, our product lines range from Arduino boards, shields, sensor modules, Raspberry Pi, micro:bit extension boards and smart car to complete starter kits designed for customers of any level to learn programming knowledge.
All of our products comply with international quality standards and are greatly appreciated in a variety of different markets throughout the world.
For more details of our products, you can check it from the links below.
Official website: http://www.keyestudio.com/
US Amazon storefront: http://www.amazon.com/shops/A26TCVWBQE4D9T
CA Amazon storefront: http://www.amazon.ca/shops/A26TCVWBQE4D9T
UK Amazon storefront:http://www.amazon.co.uk/shops/A39F7KX4U3W9JH
DE Amazon storefront: http://www.amazon.de/shops/A39F7KX4U3W9JH
FR Amazon storefront: http://www.amazon.de/shops/A39F7KX4U3W9JH
ES Amazon storefront: http://www.amazon.de/shops/A39F7KX4U3W9JH
IT Amazon storefront: http://www.amazon.de/shops/A39F7KX4U3W9JH
US Amazon storefront: http://www.amazon.com/shops/APU90DTITU5DG
CA Amazon storefront: http://www.amazon.ca/shops/APU90DTITU5DG
JP Amazon storefront: http://www.amazon.jp/shops/AE9VWCCXQIC6J



Customer Service

As a continuous and fast growing technology company, we keep striving our best to offer you excellent products and quality service as to meet your expectation.
We look forward to hearing from you and any of your critical comment or suggestion would be much valuable to us.
You can reach out to us by simply drop a line at Fennie@keyestudio.com
Thank you in advance.


Buy From