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

From Keyestudio Wiki
Jump to: navigation, search
(Extension Experiment)
(Extension Experiment 2)
 
(54 intermediate revisions by the same user not shown)
Line 1: Line 1:
  
[[image:ks0397.jpg|thumb|600px|right|Keyestudio Super Starter Kit for Arduino STEM EDU]]
+
[[image:Ks0397-----1.png|thumb|600px|right|Keyestudio Super Starter Kit for Arduino STEM EDU]]
  
 
==Kit Description==
 
==Kit Description==
Line 148: Line 148:
 
| align="center" | EASY plug 8x8 LED Matrix  
 
| align="center" | EASY plug 8x8 LED Matrix  
 
| align="center" | 1
 
| align="center" | 1
| align="center" | <br>[[File:397-22.png|500px|frameless|thumb]]<br>
+
| align="center" | <br>[[File:88-1.png|500px|frameless|thumb]]<br>
 
|-
 
|-
 
   
 
   
Line 184: Line 184:
 
<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>
  
<br>
+
②Download and install Mixly1.0 software<br>
===Interface Functions of Mixly ===
+
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>
 +
 
 +
Windows version:<br>
 +
We will take Mixly1.0 (Windows version) as example.<br>
 +
Install Software:<br>
 +
You will get installation package after downloading. As shown below:<br>
 +
 
 +
<br>[[Image:图片1。0.0.png|300px|frameless]]<br>
 +
 
 +
Unzip the package, you will see “Mixly 1.0 for keyestudio.exe”
 +
<br>[[Image:图片1。0.1.png|600px|frameless]]<br>
 +
 
 +
Double-click ”Mixly 1.0 for keyestudio.exe”, the following interface pops up.
 +
<br>[[Image:图片1。0.2.png|800px|frameless]]<br>
 +
 
 +
 
 +
We have to choose correct Arduino development board and name, as shown below:<br>
 +
<br>[[Image:20201228110445.png|800px|frameless]]<br>
  
==== System Functions ====
+
Select correct COM port(the corresponding port will be shown after installing driver successfully) <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:20201228110446.png|800px|frameless]]<br>
<br>[[Image:3.1-1.png|800px|frameless]]<br>
 
  
<br>
+
You have to know the function of every area and interface on Mixly software before uploading program on Arduino development board.
'''Some common functions:''' <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====
+
<br>[[Image:图片1。0.3.png|800px|frameless]]<br>
[[Image:3.2-1.png|800px|frameless]]<br>
+
<br>[[Image:QQ图片20200707142747.png|800px|frameless]]<br>
  
{| width="80%" cellspacing="0" border="1"
+
More information about Mixly 1.0 for keyestudio:https://wiki.keyestudio.com/Getting_Started_with_Mixly1.0
|-
 
  
! align="center" scope="col" | No.
 
! align="center" scope="col" | BLOCK ICON
 
! 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 
 
| align="center" | <br>[[Image:3.2-3.png|400px|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
 
| align="center" | <br>[[Image:3.2-4.png|400px|frameless]]<br>
 
| align="center" | Returns a digital value of a specific Port.<br>
 
Digital IO Read Pin, generally used to read the HIGH or LOW level detected by Digital sensor
 
|-
 
 
| 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 
+
=== Install the driver of the development board ===
| 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
+
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" | <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>
+
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>
'''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====
+
Double-click the Mixly 1.0 for keyestudio folder—> arduino—>drivers<br>
[[Image:Control.PNG|800px|frameless]]<br>
 
  
{| width="80%" cellspacing="0" border="1"
+
The driver files are shown below:<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.3-1.png|600px|frameless]]<br>
 
| align="center" | Initialization (run only once)
 
|-
 
  
| align="center" | 2 
+
<br>[[Image:20201228110449.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.3-2.png|600px|frameless]]<br>
 
| align="center" | End the program, means the program will stop running when use this block.
 
|-
 
  
| align="center" | 3
+
<br>[[Image:044602.png|800px|frameless]]<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 
+
Connect the EASY Plug control board V2.0 to the computer with a USB cable.<br>
| align="center" | <br>[[Image:3.3-5.png|600px|frameless]]<br>
+
Right click the icon of your“Computer”—>“Properties”—>“Device manager”.<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.)
+
 
|-
+
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>
 +
 
 +
<br>[[Image:图片1jhfgjf-4.png|800px|frameless]]<br>
 +
 
 +
Right-click USB Serial Device(COM8) to select Update driver
  
| align="center" | 6
+
<br>[[Image:图片1jhfgjf-5.png|800px|frameless]]<br>
| 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].
 
|-
 
 
| 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)''']
 
|-
 
 
| align="center" | 4
 
| 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 
+
Click Close and you can see the following device in the Device Manager.<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
+
<br>[[Image:图片1jhfgjf-10.png|800px|frameless]]<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.
 
  
|-
+
If your computer is Windows7/8, please follow our instruction.<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>
+
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>
  
====Text Block====
+
<br>[[Image:图片1jhfgjf-11.png|800px|frameless]]<br>
[[Image:3.5.png|900px|frameless]]<br>
 
  
{| width="80%" cellspacing="0" border="1"
+
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>
 +
 
 +
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”. 
  
! align="center" scope="col" | No.
+
<br>[[Image:图片1jhfgjf-13.png|800px|frameless]]<br>
! align="center" scope="col" | BLOCK ICON
 
! align="center" scope="col" | DEFINITION
 
|-
 
| align="center" | 1 
 
| align="center" | <br>[[Image:3.5-1.png|800px|frameless]]<br>
 
| align="center" | character string: a letter, word, or line of text.
 
|-
 
  
| align="center" | 2 
+
Click “Browse”, then find out the drivers folder and enter “driver” to search in rectangular box.
| align="center" | <br>[[Image:3.5-2.png|800px|frameless]]<br>
+
Click “Next”, the driver will be installed successfully. (I place Arduino software folder on the desktop, you could follow my way)
| align="center" | A character
 
|-
 
  
| align="center" | 3
+
<br>[[Image:图片1jhfgjf-14.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 
+
<br>[[Image:图片1jhfgjf-15.png|800px|frameless]]<br>
| 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
 
| align="center" | <br>[[Image:3.5-6.png|800px|frameless]]<br>
 
| align="center" | Returns the ASCII code corresponding to a char.
 
|-
 
 
| align="center" | 7
 
| align="center" | <br>[[Image:3.5-7.png|800px|frameless]]<br>
 
| align="center" | Converts a number into a string.
 
|-
 
 
| 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
+
The driver of your device is already installed.
| 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>
+
Click“Close”
  
====List Block====
+
<br>[[Image:图片1jhfgjf-16.png|800px|frameless]]<br>
[[Image:3.6.png|800px|frameless]]<br>
 
  
{| width="80%" cellspacing="0" border="1"
+
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" scope="col" | No.
+
<br>[[Image:图片1jhfgjf-17.png|800px|frameless]]<br>  
! align="center" scope="col" | BLOCK ICON
 
! align="center" scope="col" | DEFINITION
 
|-
 
| align="center" | 1 
 
| align="center" | <br>[[Image:3.6-1.png|300px|frameless]]<br>
 
| align="center" | Create a list with any number of items
 
|-
 
  
| align="center" | 2 
 
| align="center" | <br>[[Image:3.6-2.png|800px|frameless]]<br>
 
| align="center" | Creats a list from a text. (int mylist [ ]={0,0,0};)
 
|-
 
  
| align="center" | 3
+
=== Start the first program ===
| align="center" | <br>[[Image:3.6-3.png|400px|frameless]]<br>
 
| align="center" | Creats a list from a text. (int mylist [ ]={0,0,0};)
 
|-
 
 
| align="center" | 4
 
| align="center" | <br>[[Image:3.6-4.png|700px|frameless]]<br>
 
| align="center" | Returns the value of at the specified position in a list.
 
|-
 
  
| align="center" | 5 
+
Click “Open”→ sample → arduino→ Arduino → 01 IN-OUT→01-LED Blink.mix
| align="center" | <br>[[Image:3.6-5.png|800px|frameless]]<br>
 
| align="center" | Sets the value of at the specified position in a list.<br>
 
Set the first item in mylist to another item.
 
|-
 
|}
 
  
<br>
+
<br>[[Image:图片1jhfgjf-18.png|800px|frameless]]<br>  
  
====Logic Block====
+
We have to choose correct Arduino development board and name, as shown below:
[[Image:3.7.png|900px|frameless]]<br>
 
  
{| width="80%" cellspacing="0" border="1"
+
<br>[[Image:图片1jhfgjf-19.png|800px|frameless]]<br>
|-
 
  
! align="center" scope="col" | No.
+
The corresponding board and COM port will be shown after setting board and COM port.   
! align="center" scope="col" | BLOCK ICON
 
! align="center" scope="col" | DEFINITION
 
|-
 
| 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" |
+
<br>[[Image:图片1jhfgjf-20.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.7-2.png|400px|frameless]]<br>
+
<br>[[Image:图片1jhfgjf-21.png|800px|frameless]]<br>
| align="center" | '''and:'''Return true if both inputs are true;
+
<br>[[Image:图片1jhfgjf-22.png|800px|frameless]]<br>
'''or:''' Return true if at least one of the inputs is true
+
|-
+
Click Upload to upload the program
  
| align="center" | 3
+
<br>[[Image:图片1jhfgjf-23.png|800px|frameless]]<br>  
| 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 
+
Upload successfully. After uploading the program successfully, the onboard LED lights up for 1s, lights off for 1s.
| 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>
+
==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.
 +
<br>[[Image:KS0313-1.png|600px|frameless]]<br>
  
 +
Then click the '''SOFTWARE''' on the browse bar, you will have two options ONLINE TOOLS and DOWNLOADS.
 +
<br>[[Image:KS0313-2.png|600px|frameless]]<br>
  
====Variable Block====
+
Click '''DOWNLOADS''', it will appear the latest software version of ARDUINO 1.8.5 shown as below. 
[[Image:3.8.png|900px|frameless]]<br>
+
<br>[[Image:KS0313-3.png|600px|frameless]]<br>
  
{| width="80%" cellspacing="0" border="1"
+
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>
|-
+
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" scope="col" | No.
+
This way you just need to click JUST DOWNLOAD, then click the downloaded file to install it. <br>
! align="center" scope="col" | BLOCK ICON
+
For non-installed version, first click Windows ZIP file, you will also get the pop-up interface as the above figure.<br>
! align="center" scope="col" | DEFINITION
+
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>
|-
 
| 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  
 
| align="center" | <br>[[Image:3.8-2.png|600px|frameless]]<br>
 
| align="center" | Define the data types
 
|-
 
|}
 
  
 
<br>
 
<br>
 +
====Installing Arduino (Windows)====
 +
Install Arduino with the exe. Installation package downloaded well.
 +
<br>[[File:Arduino Setup 1.jpg|800px|frameless|thumb]]<br>
  
'''For example: LED breath'''<br>
+
Click“I Agree”to see the following interface.
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>[[File:Arduino Setup 2.jpg|800px|frameless|thumb]]<br>
<br>[[Image:3.8 LED breath.PNG|800px|frameless]]<br>
 
  
<br>
+
Click “Next”. Pop up the interface below.
 +
<br>[[File:Arduino Setup 3.jpg|800px|frameless|thumb]]<br>
  
====SerialPort Block====
+
You can press Browse… to choose an installation path or directly type in the directory you want.<br>
[[Image:3.9.png|900px|frameless]]<br>
+
Then click “Install” to initiate installation.
 +
<br>[[File:Arduino Setup 4.jpg|800px|frameless|thumb]]<br>
  
{| width="80%" cellspacing="0" border="1"
+
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>
  
! align="center" scope="col" | No.
+
<br>
! align="center" scope="col" | BLOCK ICON
+
====Installing Driver====
! align="center" scope="col" | DEFINITION
+
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>
| align="center" |
+
<br>[[Image:KS0001-1.jpg|600px|frameless]]<br>
| align="center" | <br>[[Image:3.9-1.png|600px|frameless]]<br>
+
Plug one end of your USB cable into the Arduino and the other into a USB socket on your computer.
| align="center" | Set the serial buad rate to 9600
+
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>
  
| align="center" | 2 
+
After that, select the option to browseand navigate to the “drivers” folder of Arduino installation.
| align="center" | <br>[[Image:3.9-2.png|400px|frameless]]<br>
+
<br>[[Image:KS0286-4.png|800px|frameless]]<br>
| align="center" | Write the specified number, text or other value.
 
|-
 
  
| align="center" | 3
+
Click “Next” and you may get a security warning, if so, allow the software to be installed. Shown as below.  
| align="center" | <br>[[Image:3.9-3.png|400px|frameless]]<br>
+
<br>[[Image:Driver 5.png|600px|frameless]]<br>
| align="center" | Print the specified number, text or other value on monitor.
 
|-
 
 
| 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" | 5 
+
Once the software has been installed, you will get a confirmation message. Installation completed, click “Close”.
| align="center" | <br>[[Image:3.9-5.png|600px|frameless]]<br>
+
<br>[[Image:Driver 6.png|600px|frameless]]<br>
| align="center" | Print the specified number in hexademical format on newline of monitor.
 
|-
 
  
| align="center" | 6
+
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.9-6.png|600px|frameless]]<br>
+
<br>[[Image:Driver 7.png|600px|frameless]]<br>
| align="center" | If the serial port is available, it returns true, otherwise returns false.<br>
 
(generally used in Bluetooth communication)
 
|-
 
 
| align="center" | 7
 
| align="center" | <br>[[Image:3.9-7.png|600px|frameless]]<br>
 
| align="center" | Returns a string in serial port
 
|-
 
 
| 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>
  
'''For example: serial communication'''<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”.
 
<br>[[Image:3.9 Serial port -1.PNG|800px|frameless]]<br>
 
<br>[[Image:3.9-13.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>
  
====Communicate Block====
+
<br>
[[Image:Communicate.PNG|900px|frameless]]<br>
+
'''Component Required:''' <br>  
 
+
* EASY plug control board*1
{| width="80%" cellspacing="0" border="1"
+
* USB cable*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>
 +
'''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.
  
 
<br>
 
<br>
'''For example:''' <br>
+
'''Connect It Up'''<br>
You need an Arduino Uno board, an IR receiver module and an IR remote control.<br>
+
Connect the control board to your computer via a micro USB cable.  
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>[[File:0397Connect1.png|500px|frameless|thumb]]<br>
<br>[[Image:3.10 ir.PNG|900px|frameless]]<br>
 
 
 
 
<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>
  
====Sensor Block====
+
<br>
[[Image:Sensor.PNG|1000px|frameless]]<br>
+
'''Select the Arduino Board''' <br>
 
+
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>
  
{| width="80%" cellspacing="0" border="1"
+
<br>
|-
+
'''Select your serial port'''<br>
 
+
Select the serial device of the Arduino board from the Tools | Serial Port menu. <br>
! align="center" scope="col" | No.
+
<br><span style="color: red">'''Note: ''' to avoid errors, the COM Port should keep the same as the Ports shown on Device Manager.<br>
! align="center" scope="col" | BLOCK ICON
+
<br>[[File:serial port.jpg|600px|frameless|thumb]] [[File:serial port2.jpg|400px|frameless|thumb]]<br>
! align="center" scope="col" | DEFINITION
+
<br>
|-
+
Then click verify button to check the errors. If compiling successfully, the message "Done compiling" will appear in the status bar.
| align="center" | 1 
+
<br>[[File:serial port3.png|700px|frameless|thumb]]<br>
| align="center" | <br>[[Image:3.11-1.png|800px|frameless]]<br>
+
<br>
| align="center" | Set the Trig and Echo pin of ultrasonic sensor.<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.
Returns the distance of ultrasonic sensor measured. ('''unit:''' cm)
+
<br>[[File:serial port4.png|700px|frameless|thumb]]<br>
|-
 
 
 
| 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>
+
'''Open the Serial Monitor''' <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.  
+
After that, click the monitor button to open the serial monitor.
<br>[[Image:3.11-4.png|800px|frameless]]<br>
+
<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: '''  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>
  
 
<br>
 
<br>
 +
====How To Get Started With Mixly Projects====
  
====Actuator Block====
+
*'''Import the Library'''<br>
[[Image:Actuator.PNG|1000px|frameless]]<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.
{| width="80%" cellspacing="0" border="1"
+
<br>[[File:Mixly 01.png|500px|frameless|thumb]]<br>
|-
+
<br>
 
+
'''2)''' Open the folder we provided, you can double-click to open the library '''KS_EasyPulg'''  <br>
! align="center" scope="col" | No.
+
<br>[[File:Mixly 02.png|500px|frameless|thumb]]<br>
! align="center" scope="col" | BLOCK ICON
+
<br>[[File:Mixly 03.png|500px|frameless|thumb]]<br>
! align="center" scope="col" | DEFINITION
+
<br>[[File:Mixly 04.png|500px|frameless|thumb]]<br>
|-
 
| align="center" | 1 
 
| align="center" | <br>[[Image:3.12-1.png|800px|frameless]]<br>
 
| 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
 
| align="center" | <br>[[Image:3.12-3.png|800px|frameless]]<br>
 
| align="center" | Set the pin and specified frequency for buzzer to play sound.
 
|-
 
 
| align="center" | 4
 
| align="center" | <br>[[Image:3.12-4.png|800px|frameless]]<br>
 
| align="center" | Stop playing sound
 
|-
 
|}
 
 
 
 
<br>
 
<br>
'''For example:''' <br>
+
'''3)''' If import the custom library successfully, you should see it on the Mixly blocks interface. Shown below.  
Connect the signal end of servo to Digital 0 of Uno, then upload the code below, servo will rotate 90 degrees. <br>
+
<br>[[File:Mixly 05.png|500px|frameless|thumb]]<br>
'''Note:''' Delay 100ms is the time required for servo to move.
 
<br>[[Image:3.12-5.png|800px|frameless]]<br>
 
  
 
<br>
 
<br>
  
 +
====Start with Mixly Project - Saying Hello World====
  
====Monitor Block====
+
'''1) Hookup Guide'''<br>
[[Image:Monitor.PNG|900px|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>
  
{| width="80%" cellspacing="0" border="1"
+
<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>
  
! align="center" scope="col" | No.
+
<br>
! align="center" scope="col" | BLOCK ICON
+
'''4) Check Arduino Code''' <br>
! align="center" scope="col" | DEFINITION
+
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>
| align="center" | 1 
+
<br>
| align="center" | <br>[[Image:3.13-1.png|800px|frameless]]<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!
| align="center" | Set the IIC LCD1602 address
+
 
|-
+
<br>
  
| align="center" | 2
+
===Project 2: LED Light===
| 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
+
'''Overview'''<br>
| align="center" | <br>[[Image:3.13-3.png|800px|frameless]]<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" | 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 
+
[[image:EASY plug LED.png|thumb|300px|right|Keyestudio EASY plug LED Module]]
| align="center" | <br>[[Image:3.13-5.png|800px|frameless]]<br>
+
'''Component Required'''<br>
| align="center" | Set the control pin and the number of RGB light.
+
* EASY plug control board*1
|-
+
* EASY plug LED Module *3
 +
* RJ11 cable*1
 +
* USB cable*1 
  
| align="center" | 6
+
<br>
| align="center" | <br>[[Image:3.13-6.png|800px|frameless]]<br>
+
'''Component Introduction:'''<br>
| align="center" | Set the RGB light pin, light number and brightness
+
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" | 7
+
* Interface: Easy plug
| align="center" | <br>[[Image:3.13-7.png|800px|frameless]]<br>
+
* PH2.54 socket
| align="center" | Set the control pin, light number and color. (click to select the color)
 
|-
 
 
| 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>
+
'''Connect It Up'''<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>
+
Connect the EASY Plug LED module to control board using an RJ11 cable.  
<br>[[Image:3.13 LCD16002.PNG|800px|frameless]]<br>
+
<br>[[File:ks0101.jpg|500px|frameless|thumb]]<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:0397 Result1.png|500px|frameless|thumb]]<br>
  
====Functions Block====
+
<br>
[[Image:Function.PNG|800px|frameless]]<br>
 
  
{| width="80%" cellspacing="0" border="1"
+
====Example 2: LED Blink====
|-
+
'''Upload the Code'''<br>
 +
Below is an example code for LED blinking.
 +
<br>[[File:ks0397 2.2.png|500px|frameless|thumb]]<br>
 +
<br>
 +
'''What You Should See'''
 +
<br>[[File:ks0397 2-1.png|500px|frameless|thumb]]<br>
 +
The LED will flash on for one second, then blink off for one second. <br>
 +
If it doesn’t, make sure you have assembled the circuit correctly and verified and uploaded the code to your board.
 +
<br>[[File:0397 Result1.png|500px|frameless|thumb]]<br>
  
! align="center" scope="col" | No.
+
<span style="color: red">'''Little Knowledge:'''</span> <br>
! align="center" scope="col" | BLOCK ICON
+
If you want to make the LED flash on and off more quickly or slowly, you can modify the Delay time here.<br>
! align="center" scope="col" | DEFINITION
+
<br>[[File:Little Knowledge2.png|500px|frameless|thumb]]<br>
|-
+
Thank you! Enjoy the following programming.
| 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>
 
  
 +
====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>
 
<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.
  
 +
<br>
 +
====Example 4: Brighten and Dim====
 +
'''Hookup Guide'''<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.
 +
<br>[[File:三灯.jpg|500px|frameless|thumb]]<br>
 +
<br>
 +
'''Upload the Code'''<br>
 +
Below is an example code for three LED modules experiment.
 +
<br>[[File:ks0397 2.4.1.png|500px|frameless|thumb]]<br>
 +
<br>[[File:ks0397 2.4.2.png|500px|frameless|thumb]]<br>
  
==Installing Arduino Software==
+
<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.  
+
'''What You Should See'''<br>
You can download it from the link below:  
+
The three LEDs are gradually brighter then gradually off one by one, circularly. <br>
https://www.arduino.cc/en/Main/OldSoftwareReleases#1.5.x
+
If it doesn’t, make sure you have assembled the circuit correctly and verified and uploaded the code to your board.
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>[[File:0397 Result2-4.png|500px|frameless|thumb]]<br>
<br>[[Image:KS0313-1.png|600px|frameless]]<br>
+
<br>[[File:0397 Result2-4-1.png|500px|frameless|thumb]]<br>
 +
<br>[[File:0397 Result2-4-2.png|500px|frameless|thumb]]<br>
  
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>
+
'''<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>
  
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>
+
===Project 3: Line Tracking===
 +
'''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.  
  
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>
+
'''Component Required:'''<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.
+
* EASY plug control board*1
For simple installed version, first click '''Windows Installer''', you will get the following page.<br>
+
* EASY plug Line Tracking Sensor *1
<br>[[Image:KS0313-4.png|600px|frameless]]<br>
+
* EASY plug LED Module *1
<br>[[Image:KS0313-5.png|600px|frameless]]<br>
+
* RJ11 cable*1
 +
* USB cable*1 
  
This way you just need to click JUST DOWNLOAD, then click the downloaded file to install it. <br>
+
<br>
For non-installed version, first click Windows ZIP file, you will also get the pop-up interface as the above figure.<br>
+
'''Component Introduction:'''  <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>
+
[[image:ks0119图.jpg|thumb|600px|right|Keyestudio EASY plug Line Tracking Sensor]]
 +
The Line Tracking Sensor can tell white from in black or black from white accurately. <br>
 +
The single line-tracking signal provides a stable output signal TTL for a more accurate and more stable line. <br>
 +
The working principle is simple, using infrared light's different reflectivity for different color, and converting the strength of the reflected signal into current signal.<br>  
 +
* Power supply: 5V
 +
* Operating current: <10mA
 +
* Operating temperature: 0℃~ 50℃
 +
* Output Level: TTL (Black for LOW output, White for HIGH output)
 +
* High quality connector
  
 
<br>
 
<br>
====Installing Arduino (Windows)====
+
'''Connect It Up'''<br>
Install Arduino with the exe. Installation package downloaded well.
+
Connect the EASY Plug Line Tracking sensor and LED module to control board using RJ11 cables.
<br>[[File:Arduino Setup 1.jpg|800px|frameless|thumb]]<br>
+
<br>[[File:循迹灯.png|500px|frameless|thumb]]<br>
  
Click“I Agree”to see the following interface.
+
<br>
<br>[[File:Arduino Setup 2.jpg|800px|frameless|thumb]]<br>
+
'''What You Should See'''<br>
 +
Done uploading the code to board, open the serial monitor and set the baud rate to 9600, then you can see the data is printed on the monitor, and will control LED on.
 +
<br>[[File:ks0397 3-1.png|500px|frameless|thumb]]<br>
 +
<br>[[File:ks0397 3-2.png|500px|frameless|thumb]]<br>
 +
<br>[[File:ks0397 3-3.png|500px|frameless|thumb]]<br>
  
Click “Next”. Pop up the interface below.
 
<br>[[File:Arduino Setup 3.jpg|800px|frameless|thumb]]<br>
 
 
You can press Browse… to choose an installation path or directly type in the directory you want.<br>
 
Then click “Install” to initiate installation.
 
<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====
 
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”.
+
== Import the Library ==
<br>[[Image:Driver 3.png|600px|frameless]]<br>
 
  
After that, select the option to browseand navigate to the “drivers” folder of Arduino installation.
+
Open Mixly 1.0 for keyestudio software, click“Import”then select“Local import”, as shown below:
<br>[[Image:KS0286-4.png|800px|frameless]]<br>
+
<br>[[Image:图片1jhfgjf-24.png|800px|frameless]]<br>
 +
Double-click the folder“KS_EasyPulg”and select“KS_EasyPulg”library file
 +
<br>[[Image:图片1jhfgjf-25.png|800px|frameless]]<br>
 +
<br>[[Image:图片1jhfgjf-26.png|800px|frameless]]<br>
 +
After importing it, you will see it in the blocks list. Also, the interface will show “import custom library successfully!”
 +
<br>[[Image:图片1jhfgjf-27.png|800px|frameless]]<br>
  
Click “Next” and you may get a security warning, if so, allow the software to be installed. Shown as below.  
+
===Project 5: Relay ===
<br>[[Image:Driver 5.png|600px|frameless]]<br>
+
'''Overview'''<br>
 +
In this project, we will show you how to control a relay module. This relay module uses a high-quality relay. A relay is basically an electrically controlled mechanical switch. It can be used to interactive projects.  
 +
<br>
  
Once the software has been installed, you will get a confirmation message. Installation completed, click “Close”.
+
'''Component Required:'''<br>
<br>[[Image:Driver 6.png|600px|frameless]]<br>
+
* EASY plug control board*1
 +
* EASY plug Single Relay Module *1 
 +
* RJ11 cable*1
 +
* USB cable*1 
 +
 
 +
<br>
 +
'''Component Introduction:'''  <br>
 +
[[image:ks0127图.jpg|thumb|600px|right|Keyestudio EASY plug Single Relay Module]]
  
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.  
+
This EASY Plug relay module uses a high-quality relay. A relay is basically an electrically controlled mechanical switch.<br>
<br>[[Image:Driver 7.png|600px|frameless]]<br>
+
It is one of the most important controlled elements, which is widely used to control the lighting, communications, remote sensing, electrical and other equipments.
 +
The Relay output state by a light-emitting diode, observing the relay ON and OFF status. <br>
 +
It can be controlled through the digital IO port, such as lamps, motors and other high current or high voltage devices.<br>
 +
* Type: Digital
 +
* Rated current: 10A (NO) 5A (NC)
 +
* Maximum switching voltage: 150VAC  24VDC
 +
* Digital interface
 +
* Control signal: TTL level
 +
* Rated load: 8A 150VAC (NO) 10A 24VDC (NO); 5A 250VAC (NO/NC) 5A 24VDC (NO/NC)
 +
* Maximum switching power: AC1200VA DC240W (NO); AC625VA DC120W (NC)
 +
* Contact action time: 10ms
  
 +
<br>
 +
'''Connect It Up'''<br>
 +
Connect the EASY Plug Single Relay module to control board using an RJ11 cable.
 +
<br>[[File:ks0127.jpg|500px|frameless|thumb]]<br>
 
<br>
 
<br>
  
 +
'''Upload the Code'''<br>
 +
Below is an example code.<br>
 +
<br>[[File:ks0397 5.png|500px|frameless|thumb]]<br>
  
==Let’s Get Started With Your Projects==
 
===Project 1: Hello World===
 
 
<br>
 
<br>
'''Overview'''<br>
+
'''What You Should See'''<br>
[[Image:Arduino_quickstart.jpg|200px|right|thumb|]]
+
Done uploading the code, you should be able to hear the relay contacts click. When the relay is off, the COM (common) terminal block will be connected to the NC (Normally Closed) terminal block.<br>
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>
+
When the relay is on, the COM (common) terminal block will be connected to the NO (Normally Open) terminal block.
Note that need to use a serial communication software, Arduino IDE.  
+
<br>[[File:ks0397 5-1.png|500px|frameless|thumb]]<br>
In the above part, you can check the detailed use of Arduino IDE.<br>
+
<br>[[File:ks0127 Result.jpg|500px|frameless|thumb]]<br>
  
 
<br>
 
<br>
'''Component Required:''' <br>  
+
 
 +
===Project 6: Crash===
 +
'''Overview'''<br>
 +
We use a crash sensor to detect whether happen collision or not. When an object crashes the metal switch of the sensor, it will output LOW level signal. When the switch is disconnected, it will keep HIGH level.
 +
 +
'''Component Required:'''<br>
 
* EASY plug control board*1
 
* EASY plug control board*1
* USB cable*1
+
* EASY plug Crash Sensor *1
 +
* EASY plug LED Module *1 
 +
* EASY plug Relay Module *1 
 +
* RJ11 cable*1
 +
* USB cable*1  
 +
 
 +
'''Component Introduction:'''  <br>
 +
[[image:ks0111图.jpg|thumb|600px|right|Keyestudio EASY plug Crash Sensor]] 
 +
 
 +
Crash sensor, also known as snap-action switch, is an electric switch that is actuated by very little physical force.  <br>
 +
It is a digital on-off input module necessary for elementary electronic.<br>
 +
By programming, it can be used for the light, sound device, key function of LCD display, 3D Printer position feedback, or other devices. <br>
 +
* Onboard status indicator LED
 +
* M3 mounting hole, convenient for fixation on other devices.
 +
* If collision happened, outputs LOW level signal; no collision, outputs HIGH level signal.
  
<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.
 
  
<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 Crash sensor to control board using an RJ11 cable.  
<br>[[File:0397Connect1.png|500px|frameless|thumb]]<br>
+
<br>[[File:Led碰撞.png|500px|frameless|thumb]]<br>
<br>
+
 
 +
 
 
'''Upload the Code'''<br>
 
'''Upload the Code'''<br>
Below is an example code for displaying the Hello World!
+
Below is an example code.
<pre>
+
<br>[[File:ks0397 6.1.png|500px|frameless|thumb]]<br>
int val;
+
<br>[[File:ks0397 6-1.png|500px|frameless|thumb]]<br>
int ledpin=13;
+
 
void setup()
+
'''What You Should See'''<br>
{
+
When an object crashes the metal switch of the sensor, the LED is turned off. If no crash happened, LED is turned on.
Serial.begin(9600);
+
<br>[[File:ks0397 6-3.png|500px|frameless|thumb]]<br>
pinMode(ledpin,OUTPUT);
+
<br>[[File:ks0397 6-4.png|500px|frameless|thumb]]<br>
}
+
 
void loop()
+
You should be able to see the value printing on the monitor.
{
+
<br>[[File:ks0397 6-2.png|500px|frameless|thumb]]<br>
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>
+
====Extension Experiment: ====
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>
+
<span style="color: brown"> <big>'''Switch Controlling Relay'''</big></span><br>
  
 +
'''Hookup Guide'''<br>
 +
Connect the EASY Plug Crash sensor and relay module to control board using an RJ11 cable.
 +
<br>[[File:继电器碰撞.jpg|500px|frameless|thumb]]<br>
 
<br>
 
<br>
'''Select your serial port'''<br>
+
 
Select the serial device of the Arduino board from the Tools | Serial Port menu. <br>
+
'''Upload the Code'''<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>
+
Below is an example code.
<br>[[File:serial port.jpg|600px|frameless|thumb]] [[File:serial port2.jpg|400px|frameless|thumb]]<br>
+
<br>[[File:ks0397 6.2.png|500px|frameless|thumb]]<br>
 +
 
 
<br>
 
<br>
Then click verify button to check the errors. If compiling successfully, the message "Done compiling" will appear in the status bar.
+
'''What You Should See'''<br>
<br>[[File:serial port3.png|700px|frameless|thumb]]<br>
+
<br>[[File:ks0397 6-5.png|500px|frameless|thumb]]<br>
<br>
+
If crash the limit switch, the LED on the relay module is turned on.  
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:ks0397 6-6.png|500px|frameless|thumb]]<br>
<br>[[File:serial port4.png|700px|frameless|thumb]]<br>
 
  
 
<br>
 
<br>
'''Open the Serial Monitor''' <br>
+
<span style="color: red">'''Troubleshooting:'''</span>  
After that, click the monitor button to open the serial monitor.
+
* '''Program Not Uploading?'''<br>
<br>[[File:Serial Monitor.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>
+
If it doesn’t, make sure you have assembled the circuit correctly and verified and uploaded the code to your board.  
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====
 
  
'''* Import the Library'''<br>
+
===Project 7: I Feel Pressure ===
'''1)''' Begin with the Mixly projects, the first step you should import the corresponding library. <br>
+
'''Overview'''<br>
Open the Mixly 0.998 software, click '''Import'''. Shown below.
+
How to measure the outside force? Use a pressure sensor.  
<br>[[File:Mixly 01.png|500px|frameless|thumb]]<br>
+
 
<br>
+
'''Component Required:'''<br>
'''2)''' Open the folder we provided, you can double-click to open the library '''KS_EasyPulg''' <br>
+
* EASY plug control board*1
<br>[[File:Mixly 02.png|500px|frameless|thumb]]<br>
+
* EASY plug thin-film pressure sensor *1
<br>[[File:Mixly 03.png|500px|frameless|thumb]]<br>
+
* EASY plug LED Module *1
<br>[[File:Mixly 04.png|500px|frameless|thumb]]<br>
+
* RJ11 cable*1
<br>
+
* USB cable*1 
'''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====
+
'''Component Introduction:'''<br>
 +
[[image:ks0371图.jpg|thumb|600px|right|EASY plug Thin-film Pressure Sensor]]
 +
This EASY plug pressure sensor adopts the flexible Nano pressure-sensitive material with an ultra-thin film pad. <br>
 +
It has the functions of water-proof and pressure detection. <br>
 +
The force sensors are ultra-thin and flexible printed circuits, which can be easily integrated into force measurement applications.<br>
  
'''1) Hookup Guide'''<br>
+
The harder you press, the lower the sensor's resistance. <br>
Connect the control board to your computer via a micro USB cable.  
+
When the sensor detects the outside pressure, the resistance of sensor will make a change. So we can use the circuit to convert the pressure signal that senses pressure change into the corresponding electric signal output. <br>
<br>[[File:0397Connect1.png|500px|frameless|thumb]]<br>
+
In this way, we can know the conditions of pressure changes by detecting the signal changes. <br>
<br>
+
You can connect the sensor to EASY plug Control board for communication using only a RJ11 cable.<br>
'''2) Open the Program''' <br>
+
* Working Voltage: DC 3.3V—5V
Click Open to open your first program Hello World. Follow the steps below.  
+
* Range: 0-0.5KG
<br>[[File:0397hello 1.png|500px|frameless|thumb]]<br>
+
* Thickness: <0.25mm
<br>[[File:0397hello 2.png|500px|frameless|thumb]]<br>
+
* Response Point: <20g
<br>[[File:0397hello 3.png|500px|frameless|thumb]]<br>
+
* Repeatability: <±5.8%(50% load)
<br>[[File:0397hello 4.png|500px|frameless|thumb]]<br>
+
* Accuracy: ±2.5%(85% range interval)
 +
* Durability: >100 thousand times
 +
* Initial Resistance: >100MΩ (no load)
 +
* Response Time: <1ms
 +
* Recovery Time: <15ms
 +
* Working Temperature: -20℃ to 60℃
 
<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>
+
'''Connect It Up'''<br>
<br>[[File:0397hello 6.png|500px|frameless|thumb]]<br>
+
Connect the EASY Plug pressure sensor to control board using an RJ11 cable.  
 +
<br>[[File:KS0371.jpg|500px|frameless|thumb]]<br>
 +
 
 
<br>
 
<br>
After that, select the proper '''Board''' and '''Port'''. Upload the code to your EASY Plug control board.
+
'''Upload the Code'''<br>
<br>[[File:0397hello 7.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 7.1.png|500px|frameless|thumb]]<br>
  
 
<br>
 
<br>
'''3) Displaying Hello World''' <br>
+
'''What You Should See'''<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.  
+
<br>[[File:ks0397 7-1.png|500px|frameless|thumb]]<br>
Congrats! You make it !
+
After uploading the code, open the serial monitor, and set the baud rate to 9600. <br>
<br>[[File:0397hello 8.png|500px|frameless|thumb]]<br>
+
When tightly press the sensor, you should see the value become larger. So the sensor works normally.<br>
 +
<br>[[File:ks0397 7-2.png|500px|frameless|thumb]]<br>
 +
 
  
 
<br>
 
<br>
'''4) Check Arduino Code''' <br>
+
====Extension Experiment ====
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>
 
<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!
+
<span style=color:brown><big>'''Pressure Controlling LED'''</big></span><br>
  
 +
'''Hookup Guide'''<br>
 +
Connect the EASY Plug pressure sensor and LED module to control board using RJ11 cables.
 +
<br>[[File:压力.jpg|500px|frameless|thumb]]<br>
 
<br>
 
<br>
===Project 2: LED Light===
 
  
'''Overview'''<br>
+
'''Upload the Code'''<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>
+
Below is an example code.
 
+
<br>[[File:ks0397 7.2.png|500px|frameless|thumb]]<br>
[[image:EASY plug LED.png|thumb|300px|right|Keyestudio EASY plug LED Module]]
 
'''Component Required'''<br>
 
* EASY plug control board*1
 
* EASY plug LED Module *3
 
* RJ11 cable*1
 
* USB cable*1 
 
  
 
<br>
 
<br>
'''Component Introduction:'''<br>
+
'''What You Should See'''<br>
The LED light modules have shiny colors, ideal for Arduino starters. It can be easily connected to IO/Sensor shield. <br>
+
After uploading the code, when tightly press the sensor with your finger, you should see the brightness of LED will change with the pressure intensity.
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>
+
<br>[[File:ks0397 7-3.png|500px|frameless|thumb]]<br>
* Sensor type: Digital
+
<br>[[File:ks0397 7-4.png|500px|frameless|thumb]]<br>
* Interface: Easy plug
 
* PH2.54 socket
 
  
<br>
 
'''Connect It Up'''<br>
 
Connect the EASY Plug LED module to control board using an RJ11 cable.
 
<br>[[File:ks0101.jpg|500px|frameless|thumb]]<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:0397 Result1.png|500px|frameless|thumb]]<br>
 
  
<br>
+
===Project 8: Magnetic Field ===
 +
'''Overview'''<br>
 +
This project will tell you how to detect whether there is a magnetic field nearby or not ? Use a reed switch module. 
  
====Example 2: LED Blink====
 
'''Upload the Code'''<br>
 
Below is an example code for LED blinking.
 
<br>[[File:ks0397 2.2.png|500px|frameless|thumb]]<br>
 
 
<br>
 
<br>
'''What You Should See'''
+
'''Component Required:'''<br>
<br>[[File:ks0397 2-1.png|500px|frameless|thumb]]<br>
+
* EASY plug control board*1
The LED will flash on for one second, then blink off for one second. <br>
+
* EASY plug Reed Switch Module *1
If it doesn’t, make sure you have assembled the circuit correctly and verified and uploaded the code to your board.
+
* EASY plug LED Module *1 
<br>[[File:0397 Result1.png|500px|frameless|thumb]]<br>
+
* RJ11 cable*1
 
+
* USB cable*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>
<br>[[File:Little Knowledge2.png|500px|frameless|thumb]]<br>
+
'''Component Introduction:'''   <br>
Thank you! Enjoy the following programming.
+
[[image:ks0118图.jpg|thumb|600px|right|Keyestudio EASY plug Reed Switch Module]]
  
 +
This is a small device called a reed switch on the module. <br>
 +
When the device is exposed to a magnetic field, the two ferrous materials inside the switch pull together and the switch closes. <br>
 +
When the magnetic field is removed, the reeds separate and the switch opens. This makes for a great non-contact switch. <br>
 +
You can mount reed switch on the door for alarming purpose or as switches.<br>
 +
* Interface: Easy plug
 +
* Working voltage: DC 3.3V-5V
 +
* Working current: ≥20mA
 +
* Working temperature: -10℃ to+50℃
 +
* Detection distance: ≤10mm
 
<br>
 
<br>
  
====Example 3: LED Breath====
+
'''Connect It Up'''<br>
Here do you know how to connect the LED module? Check the code.<br>
+
Connect the EASY Plug Reed switch module and LED module to control board using RJ11 cables.  
'''Test Code'''<br>
+
<br>[[File:干簧管灯.jpg|500px|frameless|thumb]]<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>
 
'''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.
 
  
<br>
 
====Example 4: Brighten and Dim====
 
'''Hookup Guide'''<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.
 
<br>[[File:三灯.jpg|500px|frameless|thumb]]<br>
 
<br>
 
 
'''Upload the Code'''<br>
 
'''Upload the Code'''<br>
Below is an example code for three LED modules experiment.
+
Below is an example code.
<br>[[File:ks0397 2.4.1.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 8.png|500px|frameless|thumb]]<br>
<br>[[File:ks0397 2.4.2.png|500px|frameless|thumb]]<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>
+
If you put a magnetic bead close to the reed module, once the reed module detects the magnetic field, LED will turn on.
If it doesn’t, make sure you have assembled the circuit correctly and verified and uploaded the code to your board.
+
<br>[[File:ks0397 8-1.png|500px|frameless|thumb]]<br>
<br>[[File:0397 Result2-4.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 8-2.png|500px|frameless|thumb]]<br>
<br>[[File:0397 Result2-4-1.png|500px|frameless|thumb]]<br>
 
<br>[[File:0397 Result2-4-2.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>
 
  
<br>
+
===Project 9: 4-digit LED display ===
===Project 3: Line Tracking===
 
 
'''Overview'''<br>
 
'''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.  
+
When you watch a ball game, you might often see the countdown. <br>
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.  
+
Here comes an EASY Plug 4-digit 0.36’’ LED display! Through this project, you will learn how to control the 4-digit LED display show the time counting.  
  
 +
<br>
 
'''Component Required:'''<br>
 
'''Component Required:'''<br>
 
* EASY plug control board*1
 
* EASY plug control board*1
* EASY plug Line Tracking Sensor *1  
+
* EASY plug 4-digit LED display*1  
* EASY plug LED Module *1  
+
* EASY plug button module*1  
 
* RJ11 cable*1
 
* RJ11 cable*1
* USB cable*1  
+
* USB cable*1  
 
+
 
<br>
 
<br>
'''Component Introduction:''' <br>
+
'''Component Introduction'''  
[[image:ks0119图.jpg|thumb|600px|right|Keyestudio EASY plug Line Tracking Sensor]]
+
[[image:Ks0369图.jpg|thumb|600px|right|Keyestudio EASY plug 4-Digit LED Display]]
The Line Tracking Sensor can tell white from in black or black from white accurately. <br>
+
 
The single line-tracking signal provides a stable output signal TTL for a more accurate and more stable line. <br>
+
This is a 4-digit 0.36’’ Common Anode LED display module, a 12-pin display module with score points. <br>
The working principle is simple, using infrared light's different reflectivity for different color, and converting the strength of the reflected signal into current signal.<br>  
+
The driver chip used in the matrices is TM1637, using only two signal cables to make the microcontroller control the 4-digit LED display.<br>
* Power supply: 5V
+
The four pins of LED display are GND、VCC、DIO、CLK. (GND is ground, VCC is for power supply, DIO is data IO pin, CLK is clock signal pin.) <br>
* Operating current: <10mA
+
The module pins are extended into Registered jack, so you can easily connect it to EASY Plug control board using a RJ11 cable.<br>
* Operating temperature: 0℃~ 50℃
+
* Operating Voltage: DC5V
* Output Level: TTL (Black for LOW output, White for HIGH output)
+
* Operating Temperature Range: -40℃~+85℃
* High quality connector
 
  
 
<br>
 
<br>
 
'''Connect It Up'''<br>
 
'''Connect It Up'''<br>
Connect the EASY Plug Line Tracking sensor and LED module to control board using RJ11 cables.
+
Connect the EASY Plug 4-digit LED display module to control board using RJ11 cable.  
<br>[[File:循迹灯.png|500px|frameless|thumb]]<br>
+
<br>[[File:KS0369.jpg|600px|frameless|thumb]]<br>
  
 
<br>
 
<br>
'''What You Should See'''<br>
+
'''Upload the Code'''<br>
Done uploading the code to board, open the serial monitor and set the baud rate to 9600, then you can see the data is printed on the monitor, and will control LED on.  
+
Below is an example code.
<br>[[File:ks0397 3-1.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 9.1.1.png|700px|frameless|thumb]]<br>
<br>[[File:ks0397 3-2.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 9.1.2.png|700px|frameless|thumb]]<br>
<br>[[File:ks0397 3-3.png|500px|frameless|thumb]]<br>
 
 
 
  
 
<br>
 
<br>
 
+
'''What You Should See'''<br>
===Project 4: Push Button ===
+
After uploading the code, you should see the 4-digit LED display show the number jumping. <br>
'''Overview'''<br>
+
On the left side, show 555; after one second, show 0125 on the right side; after one second, show 125; then after one second, the display brightness is 1, becoming rather darker. One second later, the display brightness is 7, becoming rather brighter. <br>
In this project, we’ll be looking at the one of the most common and simple inputs- a push button. It is an elegant way to control power to your project. Press once to turn on, then press again to turn off. Press to release pleasure!
+
After one second again, show the 12:89; then one second later, do not show the colon. After one second, the LED display is off; and one second later, start to repeat the display again.
 +
<br>[[File:ks0397 9-2.png|500px|frameless|thumb]]<br>
 +
<br>[[File:ks0397 9-3.png|500px|frameless|thumb]]<br>
 +
 
 
<br>
 
<br>
'''Component Required:'''<br>
+
<span style="color: red">'''Troubleshooting:'''</span> <br>
* EASY plug control board*1
+
* '''Compiling Fails ?'''<br>
* EASY plug Digital Push Button *1
+
This happens sometimes, the most likely case is a library file not added.  You should be sure all the libraries under the '''KS_EasyPulg''' are added to the libraries directory of Arduino-1.8.5. Shown below.<br>
* EASY plug LED Module *1 
+
<br>[[File:0397libraries 1.png|500px|frameless|thumb]]<br>
* RJ11 cable*1
+
<br>[[File:0397libraries 2.png|500px|frameless|thumb]]<br>
* USB cable*1 
+
<br>[[File:0397libraries 3.png|500px|frameless|thumb]]<br>
 +
 
 
<br>
 
<br>
'''Component Introduction'''<br>
+
* '''Program Not Uploading?'''<br>
[[image:ks0112图.jpg|thumb|600px|right|Keyestudio EASY plug Digital Push Button]]
+
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:ks0397 9-1.png|500px|frameless|thumb]]<br>
  
The EASY Plug Push-button module is a tidy little design that lets you control a DC power source using an everyday tactile button.<br>
+
<br>
This basic application module is widely applied to Arduino, Raspberry Pi platforms.<br>
+
====Extension Experiment 1====
When the button is pressed, it outputs HIGH level signal; if release the button, it outputs LOW level signal.<br>
+
<br>
You can simply connect to an IO port to have your first taste of Arduino.<br>
+
<span style=color:brown>'''Time Counting'''</span><br>
* Supply Voltage: 3.3V to 5V
 
* Large button and high-quality top cap
 
* Sensor type: Digital
 
 
 
 
 
'''Connect It Up'''<br>
 
Connect the EASY Plug push button sensor and LED module to control board using RJ11 cables.
 
<br>[[File:按键灯.jpg|500px|frameless|thumb]]<br>
 
  
 
<br>
 
<br>
====Example 1: Button Controlled Light====
+
'''Hookup Guide'''<br>
 +
Connect the EASY Plug 4-digit LED display module to control board using an RJ11 cable.
 +
<br>[[File:KS0369.jpg|700px|frameless|thumb]]<br>
  
'''Upload the Code'''<br>
+
<br>
 +
'''Test Code'''<br>
 
Below is an example code.
 
Below is an example code.
<br>[[File:ks0397 4.1.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 9.2.png|700px|frameless|thumb]]<br>
  
 +
<br>
 
'''What You Should See'''<br>
 
'''What You Should See'''<br>
Powered up and upload well the code, press down the button, LED module is turned on. While release the button, LED is off.
+
<br>[[File:ks0397 9-4.png|500px|frameless|thumb]]<br>
<br>[[File:ks0397 4-1.png|500px|frameless|thumb]]<br>
 
<br>[[File:ks0397 4-2.png|500px|frameless|thumb]]<br>
 
Open the monitor, it will print out the value read from the button.
 
<br>[[File:ks0397 4-3.png|500px|frameless|thumb]]<br>
 
<br>[[File:ks0397 4-4.png|500px|frameless|thumb]]<br>
 
  
 +
The 4-digit LED display starts to show the time counting. Seconds on the right, minutes on the left, and return to zero after 60 minutes.
 +
<br>[[File:ks0397 9-5.png|500px|frameless|thumb]]<br>
 +
 +
====Extension Experiment 2 ====
 +
<br>
 +
<span style=color:brown>'''Counting And Reset'''</span><br>
 +
<br>
 +
'''Hookup Guide'''<br>
 +
Connect the EASY Plug 4-digit LED display module and button module to control board using RJ11 cables.
 +
<br>[[File:数码管.jpg|500px|frameless|thumb]]<br>
 
<br>
 
<br>
====Example 2: Simulating Table Lamp====
 
  
'''Upload the Code'''<br>
+
'''Test Code'''<br>
 
Below is an example code.
 
Below is an example code.
<br>[[File:ks0397 4.2.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 9.3.1.png|500px|frameless|thumb]]<br>
 +
<br>[[File:ks0397 9.3.2.png|500px|frameless|thumb]]<br>
 +
<br>[[File:ks0397 9.3.3.png|700px|frameless|thumb]]<br>
  
 +
<br>
 
'''What You Should See'''<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>
+
The 4-digit LED display starts to show the time counting. If press the button, it will reset the counting.  
<br>[[File:ks0397 4-5.png|500px|frameless|thumb]]<br>
+
 
Open the monitor, you should be able to see how many times do you press the button.
 
<br>[[File:ks0397 4-4.png|500px|frameless|thumb]]<br>
 
  
 
<br>
 
<br>
  
===Project 5: Relay ===
+
===Project 10: Photo Interrupter ===
 
'''Overview'''<br>
 
'''Overview'''<br>
In this project, we will show you how to control a relay module. This relay module uses a high-quality relay. A relay is basically an electrically controlled mechanical switch. It can be used to interactive projects.  
+
In this project, you will learn about how to use a photo interrupter module to turn on the LED and print the analog value on the monitor.  
 +
 
 
<br>
 
<br>
 
 
'''Component Required:'''<br>
 
'''Component Required:'''<br>
 
* EASY plug control board*1
 
* EASY plug control board*1
* EASY plug Single Relay Module *1
+
* EASY plug Photo Interrupter Module *1
 +
* EASY plug LED Module *1
 +
* EASY plug 4-digit LED Display Module *1  
 
* RJ11 cable*1
 
* RJ11 cable*1
 
* USB cable*1   
 
* USB cable*1   
 
 
 
<br>
 
<br>
 +
 
'''Component Introduction:'''  <br>
 
'''Component Introduction:'''  <br>
[[image:ks0127图.jpg|thumb|600px|right|Keyestudio EASY plug Single Relay Module]]
+
[[image:ks0121图.jpg|thumb|600px|right|Keyestudio EASY plug Photo Interrupter Module]]
 
+
This is a high performance EASY Plug photo interrupter module. <br>
This EASY Plug relay module uses a high-quality relay. A relay is basically an electrically controlled mechanical switch.<br>
+
It integrates a photo-interrupter, which belongs to an optical switch of a photo-interrupting photoelectric switch.<br>
It is one of the most important controlled elements, which is widely used to control the lighting, communications, remote sensing, electrical and other equipments.
+
 
The Relay output state by a light-emitting diode, observing the relay ON and OFF status. <br>
+
The upright part on the module combines an infrared light emitting diode and shielded infrared detector.<br>
It can be controlled through the digital IO port, such as lamps, motors and other high current or high voltage devices.<br>
+
By emitting a beam of infrared light from one end to another end, the sensor can detect an object when it passes through the beam. <br>
* Type: Digital
+
Useful for many applications such as optical limit switches, pellet dispensing, general object detection, etc. <br>
* Rated current: 10A (NO) 5A (NC)
+
Note: this module needs to be used together with EASY plug control board.<br>
* Maximum switching voltage: 150VAC  24VDC
+
* Supply Voltage: 3.3V to 5V
* Digital interface
+
* Interface: Digital
* Control signal: TTL level
 
* Rated load: 8A 150VAC (NO) 10A 24VDC (NO); 5A 250VAC (NO/NC) 5A 24VDC (NO/NC)
 
* Maximum switching power: AC1200VA DC240W (NO); AC625VA DC120W (NC)
 
* Contact action time: 10ms
 
  
 
<br>
 
<br>
 
'''Connect It Up'''<br>
 
'''Connect It Up'''<br>
Connect the EASY Plug Single Relay module to control board using an RJ11 cable.  
+
Connect the EASY Plug Photo Interrupter module and LED module to control board using RJ11 cables.
<br>[[File:ks0127.jpg|500px|frameless|thumb]]<br>
+
<br>[[File:光折断灯.jpg|500px|frameless|thumb]]<br>
 
<br>
 
<br>
  
 
'''Upload the Code'''<br>
 
'''Upload the Code'''<br>
Below is an example code.<br>
+
Below is an example code.
<br>[[File:ks0397 5.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 10.1.png|500px|frameless|thumb]]<br>
  
 
<br>
 
<br>
 
'''What You Should See'''<br>
 
'''What You Should See'''<br>
Done uploading the code, you should be able to hear the relay contacts click. When the relay is off, the COM (common) terminal block will be connected to the NC (Normally Closed) terminal block.<br>
+
Done uploading the code, powered on, if pick up a piece of paper to cover the light on the groove part of module, you should see the LED is turned on. If no interruption, the LED is off.   <br>
When the relay is on, the COM (common) terminal block will be connected to the NO (Normally Open) terminal block.
+
<br>[[File:ks0397 10-1.png|500px|frameless|thumb]]<br>
<br>[[File:ks0397 5-1.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 10-2.png|500px|frameless|thumb]]<br>
<br>[[File:ks0127 Result.jpg|500px|frameless|thumb]]<br>
+
 
 +
 
 +
<br>
 +
====Extension Experiment====
  
 +
<span style=color:red><big>'''Adding 4-digit LED Display'''</big></span><br>
 
<br>
 
<br>
 +
'''Hookup Guide'''<br>
 +
Connect the EASY Plug crash sensor, 4-digit LED display and LED module to control board using RJ11 cables. <br>
 +
<br>[[File:光折断数码管灯.jpg|500px|frameless|thumb]]<br>
  
===Project 6: Crash===
+
<br>
'''Overview'''<br>
+
'''Upload the Code'''<br>
We use a crash sensor to detect whether happen collision or not. When an object crashes the metal switch of the sensor, it will output LOW level signal. When the switch is disconnected, it will keep HIGH level.  
+
Below is an example code.<br>
+
<br>[[File:ks0397 10.2.1.png|700px|frameless|thumb]]<br>
'''Component Required:'''<br>
+
<br>[[File:ks0397 10.2.2.png|700px|frameless|thumb]]<br>
* EASY plug control board*1
 
* EASY plug Crash Sensor *1
 
* EASY plug LED Module *1 
 
* EASY plug Relay Module *1 
 
* RJ11 cable*1
 
* USB cable*1 
 
 
 
'''Component Introduction:'''  <br>
 
[[image:ks0111图.jpg|thumb|600px|right|Keyestudio EASY plug Crash Sensor]]
 
  
Crash sensor, also known as snap-action switch, is an electric switch that is actuated by very little physical force.  <br>
+
<br>
It is a digital on-off input module necessary for elementary electronic.<br>
+
'''What You Should See'''<br>
By programming, it can be used for the light, sound device, key function of LCD display, 3D Printer position feedback, or other devices. <br>
+
<br>[[File:ks0397 10-3.png|500px|frameless|thumb]]<br>
* Onboard status indicator LED
+
Done uploading the code, if pick up a piece of paper to cover the light on the groove part, the LED is turned on. If no interruption, the LED is off.
* M3 mounting hole, convenient for fixation on other devices.
+
<br>[[File:ks0397 10-5.png|500px|frameless|thumb]]<br>
* If collision happened, outputs LOW level signal; no collision, outputs HIGH level signal.  
+
You should be able to see the number of covering the light is showed on the 4-digit LED display, or on the monitor.  
 +
<br>[[File:ks0397 10-4.png|500px|frameless|thumb]]<br>
  
 +
<br>
  
'''Connect It Up'''<br>
+
===Project 11: Hall Magnetic Detection===
Connect the EASY Plug Crash sensor to control board using an RJ11 cable.
+
'''Overview'''<br>
<br>[[File:继电器碰撞.jpg|500px|frameless|thumb]]<br>
+
What's the best way to detect the magnet? Use another magnet. But it's not sensitive enough. You have to feel it by yourself.<br>
 +
Here you can try to use a hall sensor. It has the characteristics of high sensitivity, fast response, good temperature performance and high reliability.
 +
<br>
 +
'''Component Required:'''<br>
 +
* EASY plug control board*1
 +
* EASY plug Hall Magnetic Sensor*1
 +
* EASY plug LED Module *1
 +
* EASY plug 4-digit LED Display Module *1 
 +
* RJ11 cable*1
 +
* USB cable*1 
 +
<br>
 +
 
 +
'''Component Introduction:'''<br>
 +
[[image:Ks0110图.jpg|thumb|800px|right|Keyestudio EASY plug Hall Magnetic Sensor]]  
 +
 
 +
The Hall sensor is based on Hall Effect. <br>
 +
It can detect whether there is a magnetic object nearby or not. And it correctly tells you through digital output. <br>
 +
This sensor uses the SFE Reed Switch - Magnetic Field Sensor. It can sense the magnetic materials within a detection range up to 75px. <br>
 +
The detection range and the strength of magnetic field are proportional. <br>
 +
It is useful for non-contact/waterproof type switches, position sensors, rotary/shaft encoders.
 +
* Sensing magnetic materials
 +
* Detection range: up to 75px
 +
* Output: Digital ON/OFF
 +
* Detection range and magnetic field strength are proportional
  
 +
<br>
 +
'''Connect It Up'''<br>
 +
Connect the EASY Plug Hall Magnetic Sensor and LED module to control board using RJ11 cables.
 +
<br>[[File:霍尔灯.jpg|500px|frameless|thumb]]<br>
  
 +
<br>
 
'''Upload the Code'''<br>
 
'''Upload the Code'''<br>
 
Below is an example code.
 
Below is an example code.
<br>[[File:ks0397 6.1.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 11.1.png|500px|frameless|thumb]]<br>
<br>[[File:ks0397 6-1.png|500px|frameless|thumb]]<br>
 
  
 +
<br>
 
'''What You Should See'''<br>
 
'''What You Should See'''<br>
When an object crashes the metal switch of the sensor, the LED is turned off. If no crash happened, LED is turned on.
+
<br>[[File:ks0397 11-1.png|500px|frameless|thumb]]<br>
<br>[[File:ks0397 6-3.png|500px|frameless|thumb]]<br>
+
When magnetic beads are approaching to the sensor, the LED will be turned on. Otherwise, the LED is off.
<br>[[File:ks0397 6-4.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 11-2.png|500px|frameless|thumb]]<br>
 +
<br>
  
You should be able to see the value printing on the monitor.
+
<span style="color: red">'''Little Knowledge:'''</span> <br>
<br>[[File:ks0397 6-2.png|500px|frameless|thumb]]<br>
+
If you want to change another way, that is, once magnetic field is detected by sensor, LED is turned off; if no detecting magnetic field, LED is on.  <br>
 +
Just need to change the LED state ON or OFF in the code, shown below.<br>
 +
<br>[[File:ks0397 11-2-.png|500px|frameless|thumb]]<br>
  
 
<br>
 
<br>
====Extension Experiment: ====
+
====Extension Experiment====
 +
 
 +
<span style="color: brown>'''Adding 4-digit LED Display'''</span><br>
  
'''Switch Controlling Relay'''<br>
 
 
'''Hookup Guide'''<br>
 
'''Hookup Guide'''<br>
Connect the EASY Plug Crash sensor and relay module to control board using an RJ11 cable.
+
Connect the EASY Plug hall sensor, 4-digit LED display and red LED module to control board using RJ11 cables.  
<br>[[File:继电器碰撞.jpg|500px|frameless|thumb]]<br>
+
<br>[[File:霍尔灯数码管.jpg|500px|frameless|thumb]]<br>
 +
 
 
<br>
 
<br>
 
 
'''Upload the Code'''<br>
 
'''Upload the Code'''<br>
 
Below is an example code.
 
Below is an example code.
<br>[[File:ks0397 6.2.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 11.2.1.png|700px|frameless|thumb]]<br>
 +
<br>[[File:ks0397 11.2.2.png|700px|frameless|thumb]]<br>
 +
<br>
  
<br>
 
 
'''What You Should See'''<br>
 
'''What You Should See'''<br>
<br>[[File:ks0397 6-5.png|500px|frameless|thumb]]<br>
+
When magnetic beads are approaching to the sensor, the LED will be turned on. Otherwise, the LED is off. <br>
If crash the limit switch, the LED on the relay module is turned on.
+
How many times the magnet approaches to the sensor? You should be able to see the result showed on the 4-digit LED display or serial monitor.<br>
<br>[[File:ks0397 6-6.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 11-5.png|500px|frameless|thumb]]<br>
 +
<br>[[File:ks0397 11-4.png|500px|frameless|thumb]]<br>
  
<br>
 
<span style="color: red">'''Troubleshooting:''''</span>
 
* '''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>
  
===Project 7: I Feel Pressure ===
+
===Project 12: Analog Temperature===
 
'''Overview'''<br>
 
'''Overview'''<br>
How to measure the outside force? Use a pressure sensor.  
+
In this circuit, you will learn how to integrate the temperature sensor with your EASY Plug control board, and display the analog temperature on the serial monitor.
  
'''Component Required:'''<br>
+
<br>
 +
'''Component Required'''<br>
 
* EASY plug control board*1
 
* EASY plug control board*1
* EASY plug thin-film pressure sensor *1
+
* EASY plug LM35 Temperature Sensor *1
* EASY plug LED Module *1
+
* EASY plug LED module *1
 +
* EASY plug 4-digit LED Display Module*1
 
* RJ11 cable*1
 
* RJ11 cable*1
* USB cable*1  
+
* USB cable*1
  
 
<br>
 
<br>
'''Component Introduction:'''<br>
+
'''Component Introduction'''<br>
[[image:ks0371图.jpg|thumb|600px|right|EASY plug Thin-film Pressure Sensor]]
+
[[image:ks0123图.jpg|thumb|600px|right|Keyestudio EASY plug LM35 Temperature Sensor ]]  
This EASY plug pressure sensor adopts the flexible Nano pressure-sensitive material with an ultra-thin film pad. <br>
+
 
It has the functions of water-proof and pressure detection. <br>
+
It is based on semiconductor LM35 temperature sensor.  A temperature sensor is exactly what it sounds like - a sensor used to measure ambient temperature. <br>
The force sensors are ultra-thin and flexible printed circuits, which can be easily integrated into force measurement applications.<br>
+
It is effective in the range between 0 degree Celsius and 100 degree Celsius. Sensitivity is 10mV per degree Celsius. The output voltage is proportional to the temperature.
 +
* Power supply: 5V
 +
* Sensitivity: 10mV per degree Celsius
 +
* Function range: 0℃ to 100℃
  
The harder you press, the lower the sensor's resistance. <br>
 
When the sensor detects the outside pressure, the resistance of sensor will make a change. So we can use the circuit to convert the pressure signal that senses pressure change into the corresponding electric signal output. <br>
 
In this way, we can know the conditions of pressure changes by detecting the signal changes. <br>
 
You can connect the sensor to EASY plug Control board for communication using only a RJ11 cable.<br>
 
* Working Voltage: DC 3.3V—5V
 
* Range: 0-0.5KG
 
* Thickness: <0.25mm
 
* Response Point: <20g
 
* Repeatability: <±5.8%(50% load)
 
* Accuracy: ±2.5%(85% range interval)
 
* Durability: >100 thousand times
 
* Initial Resistance: >100MΩ (no load)
 
* Response Time: <1ms
 
* Recovery Time: <15ms
 
* Working Temperature: -20℃ to 60℃
 
 
<br>
 
<br>
 
 
'''Connect It Up'''<br>
 
'''Connect It Up'''<br>
Connect the EASY Plug pressure sensor to control board using an RJ11 cable.  
+
Connect the EASY Plug LM35 temperature to control board using an RJ11 cable.  
<br>[[File:KS0371.jpg|500px|frameless|thumb]]<br>
+
<br>[[File:ks0123.jpg|500px|frameless|thumb]]<br>
  
 
<br>
 
<br>
 
'''Upload the Code'''<br>
 
'''Upload the Code'''<br>
<br>[[File:ks0397 7.1.png|500px|frameless|thumb]]<br>
+
Below is an example code.
 +
<br>[[File:ks0397 12.1.png|500px|frameless|thumb]]<br>
  
 
<br>
 
<br>
 
'''What You Should See'''<br>
 
'''What You Should See'''<br>
<br>[[File:ks0397 7-1.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 12-1.png|500px|frameless|thumb]]<br>
After uploading the code, open the serial monitor, and set the baud rate to 9600. When tightly press the sensor, you should see the value become larger. So the sensor works normally.<br>
+
Done uploading the code, open the serial monitor and set the baud rate to 9600, you should see the analog temperature value.
<br>[[File:ks0397 7-2.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 12-2.png|500px|frameless|thumb]]<br>
 +
<br>
 +
<br>
 +
====Extension Experiment 1====
 +
<br>
 +
<span style=color:brown> '''Temperature Controlled Light''' </span><br>
  
 +
Complete the above experiment, you can get the analog temp. value. Want to try some different experiments. <br>
 +
For instance, when the temperature reaches the setting value, turn on an LED. Let’s get started right now!<br>
  
<br>
 
====Extension Experiment ====
 
 
'''Pressure Controlling LED'''<br>
 
 
'''Hookup Guide'''<br>
 
'''Hookup Guide'''<br>
Connect the EASY Plug pressure sensor and LED module to control board using RJ11 cables.  
+
Connect the EASY Plug LM35 sensor and LED module to control board using RJ11 cables.  
<br>[[File:压力.jpg|500px|frameless|thumb]]<br>
+
<br>[[File:LM35 灯.jpg|500px|frameless|thumb]]<br>
 
<br>
 
<br>
  
'''Upload the Code'''<br>
+
'''Example Code'''<br>
 
Below is an example code.
 
Below is an example code.
<br>[[File:ks0397 7.2.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 12.2.png|500px|frameless|thumb]]<br>
  
 
<br>
 
<br>
 
'''What You Should See'''<br>
 
'''What You Should See'''<br>
After uploading the code, when tightly press the sensor with your finger, you should see the brightness of LED will change with the pressure intensity.
+
Done uploading the code, when the temperature detected by LM35 sensor is greater than 19℃, external LED will be turned on.  
<br>[[File:ks0397 7-3.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 12-4.png|500px|frameless|thumb]]<br>
<br>[[File:ks0397 7-4.png|500px|frameless|thumb]]<br>
 
 
 
  
 
<br>
 
<br>
 +
<span style="color: red">'''Little Knowledge:'''</span> <br>
 +
As we all known, different regions might exists different climate. So if the setting temp. value is too low or too high, cannot turn on the LED, you can change the value in the code shown below. <br>
 +
<br>[[File:ks0397 12-5.png|500px|frameless|thumb]]<br>
  
===Project 8: Magnetic Field ===
 
'''Overview'''<br>
 
This project will tell you how to detect whether there is a magnetic field nearby or not ? Use a reed switch module. 
 
  
 
<br>
 
<br>
'''Component Required:'''<br>
+
====Extension Experiment 2====
* EASY plug control board*1
+
 
* EASY plug Reed Switch Module *1
+
<span style=color:brown> '''Adding 4-digit LED Display'''</span> <br>
* EASY plug LED Module *1 
+
 
* RJ11 cable*1
+
Next, how about adding a 4-digit LED display to show the temperature value. Let’s get started right now!
* USB cable*1 
+
 
 
 
 
<br>
 
<br>
'''Component Introduction:'''   <br>
+
'''Hookup Guide'''<br>
[[image:ks0118图.jpg|thumb|600px|right|Keyestudio EASY plug Reed Switch Module]]
+
Connect the EASY Plug LM35 sensor and 4-digit LED module to control board using RJ11 cables.
 +
<br>[[File:LM35 数码管.jpg|500px|frameless|thumb]]<br>
  
This is a small device called a reed switch on the module. <br>
 
When the device is exposed to a magnetic field, the two ferrous materials inside the switch pull together and the switch closes. <br>
 
When the magnetic field is removed, the reeds separate and the switch opens. This makes for a great non-contact switch. <br>
 
You can mount reed switch on the door for alarming purpose or as switches.<br>
 
* Interface: Easy plug
 
* Working voltage: DC 3.3V-5V
 
* Working current: ≥20mA
 
* Working temperature: -10℃ to+50℃
 
* Detection distance: ≤10mm
 
 
<br>
 
<br>
 +
'''Example Code'''<br>
 +
Below is an example code.<br>
 +
<br>[[File:ks0397 12.3.png|700px|frameless|thumb]]<br>
  
'''Connect It Up'''<br>
+
<br>
Connect the EASY Plug Reed switch module and LED module to control board using RJ11 cables.
+
'''What You Should See'''<br>
<br>[[File:干簧管灯.jpg|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 12-6.png|500px|frameless|thumb]]<br>
  
 
+
Upload success, you should be able to see the temperature value is showed on the 4-digit LED display.  
'''Upload the Code'''<br>
+
<br>[[File:ks0397 12-7.png|500px|frameless|thumb]]<br>
Below is an example code.
 
<br>[[File:ks0397 8.png|500px|frameless|thumb]]<br>
 
 
 
 
 
'''What You Should See'''<br>
 
If you put a magnetic bead close to the reed module, once the reed module detects the magnetic field, LED will turn on.
 
<br>[[File:ks0397 8-1.png|500px|frameless|thumb]]<br>
 
<br>[[File:ks0397 8-2.png|500px|frameless|thumb]]<br>
 
  
 
<br>
 
<br>
  
===Project 9: 4-digit LED display ===
+
===Project 13: Tilt Switch===
 
'''Overview'''<br>
 
'''Overview'''<br>
When you watch a ball game, you might often see the countdown. <br>
+
This lesson we are going to test the tilt sensor. Simply connect to EASY Plug control board to make amazing interactive projects.  
Here comes an EASY Plug 4-digit 0.36’’ LED display! Through this project, you will learn how to control the 4-digit LED display show the time counting.  
+
 
 
<br>
 
<br>
 
'''Component Required:'''<br>
 
'''Component Required:'''<br>
 
* EASY plug control board*1
 
* EASY plug control board*1
* EASY plug 4-digit LED display*1  
+
* EASY plug Tilt Sensor Module *1
* EASY plug button module*
+
* EASY plug LED Module *
 
* RJ11 cable*1
 
* RJ11 cable*1
* USB cable*1    
+
* USB cable*1
 +
 
 
<br>
 
<br>
'''Component Introduction''' <br>
+
'''Component Introduction:'''<br>
[[image:Ks0369图.jpg|thumb|600px|right|Keyestudio EASY plug 4-Digit LED Display]]
+
[[image:ks0115图.jpg|thumb|600px|right|Keyestudio EASY plug Tilt Sensor Module ]]  
 
+
The tilt-switch twig is the equivalent of a button, and is used as a digital input. Inside the tilt switch is a ball that make contact with the pins when the case is upright. Tilt the case over and the balls don't touch, thus not making a connection. When the switch is level it is open, and when tilted, the switch closes.<br>
This is a 4-digit 0.36’’ Common Anode LED display module, a 12-pin display module with score points. <br>
+
It can be used for orientation detection, alarm device or others. <br>
The driver chip used in the matrices is TM1637, using only two signal cables to make the microcontroller control the 4-digit LED display.<br>
+
Here is the principle of tilt sensor to illustrate how it works:<br>
The four pins of LED display are GND、VCC、DIO、CLK. (GND is ground, VCC is for power supply, DIO is data IO pin, CLK is clock signal pin.) <br>
+
<br>[[File:ks0115 works.jpg|500px|frameless|thumb]]<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>
+
* Interface: Easy plug
* Operating Voltage: DC5V
+
* Supply Voltage: 3.3V to 5V
* Operating Temperature Range: -40℃~+85℃
+
* Sensor type: Digital
 
 
  
 +
<br>
 
'''Connect It Up'''<br>
 
'''Connect It Up'''<br>
Connect the EASY Plug 4-digit LED display module and button module to control board using RJ11 cables.  
+
Connect the EASY Plug Tilt sensor and LED module to control board using RJ11 cables.  
<br>[[File:KS0369.jpg|600px|frameless|thumb]]<br>
+
<br>[[File:倾斜灯.jpg|500px|frameless|thumb]]<br>
 +
<br>
  
 
+
'''Upload the Code'''<br><br>
'''Upload the Code'''<br>
 
 
Below is an example code.
 
Below is an example code.
<br>[[File:ks0397 9.1.1.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 13.1.png|500px|frameless|thumb]]<br>
<br>[[File:ks0397 9.1.2.png|500px|frameless|thumb]]<br>
 
 
 
  
 +
<br>
 
'''What You Should See'''<br>
 
'''What You Should See'''<br>
After uploading the code, you should see the 4-digit LED display show the number jumping. <br>
+
Done uploading the code, if tilt the sensor, you should see the led state ON or OFF.
On the left side, show 555; after one second, show 0125 on the right side; after one second, show 125; then after one second, the display brightness is 1, becoming rather darker. One second later, the display brightness is 7, becoming rather brighter. <br>
+
<br>[[File:ks0397 13-1.png|500px|frameless|thumb]]<br>
After one second again, show the 12:89; then one second later, do not show the colon. After one second, the LED display is off; and one second later, start to repeat the display again.
+
<br>[[File:ks0397 13-2.png|500px|frameless|thumb]]<br>
<br>[[File:ks0397 9-2.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 13-3.png|500px|frameless|thumb]]<br>
<br>[[File:ks0397 9-3.png|500px|frameless|thumb]]<br>
 
  
 +
<br>
  
<span style="color: red">'''Troubleshooting:''''</span> <br>
+
====Extension Experiment====
* '''Compiling Fails ?'''<br>
 
This happens sometimes, the most likely case is a library file not added.  You should be sure all the libraries under the '''KS_EasyPulg''' are added to the libraries directory of Arduino-1.8.5. Shown below.<br>
 
<br>[[File:0397libraries 1.png|500px|frameless|thumb]]<br>
 
<br>[[File:0397libraries 2.png|500px|frameless|thumb]]<br>
 
<br>[[File:0397libraries 3.png|500px|frameless|thumb]]<br>
 
  
 +
<span style=color:brown><big>'''Controlling Two Lights'''</big> </span><br>
 +
Next, how to use tilt sensor to control two lights on and off. Let’s get started right now!
  
* '''Program Not Uploading?'''<br>
+
'''Hookup Guide'''<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>
+
Connect the EASY Plug tilt sensor and two LED modules to control board using an RJ11 cable.  
<br>[[File:ks0397 9-1.png|500px|frameless|thumb]]<br>
+
<br>[[File:倾斜两灯.png|500px|frameless|thumb]]<br>
 
 
 
<br>
 
<br>
====Extension Experiment 1:====
 
  
'''Time Counting'''<br>
+
'''Upload the Code'''<br>
'''Hookup Guide'''<br>
+
Below is an example code.<br>
Connect the EASY Plug 4-digit LED display module to control board using an RJ11 cable.
+
<br>[[File:ks0397 13.2.png|500px|frameless|thumb]]<br>
<br>[[File:KS0369.jpg|600px|frameless|thumb]]<br>
 
<br>
 
 
 
'''Test Code'''<br>
 
Below is an example code.
 
<br>[[File:ks0397 9.2.png|500px|frameless|thumb]]<br>
 
  
 
<br>
 
<br>
 
'''What You Should See'''<br>
 
'''What You Should See'''<br>
<br>[[File:ks0397 9-4.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 13-4.jpg|500px|frameless|thumb]]<br>
 
 
The 4-digit LED display starts to show the time counting. Seconds on the right, minutes on the left, and return to zero after 60 minutes.
 
<br>[[File:ks0397 9-5.png|500px|frameless|thumb]]<br>
 
  
 +
Upload success, if tilt the sensor to one side, you should see one led is turned on; if tilt toward another side, another led is turn on.
 +
<br>[[File:ks0397 13-6.png|500px|frameless|thumb]]<br>
 +
<br>[[File:ks0397 13-5.png|500px|frameless|thumb]]<br>
  
====Extension Experiment 2 ====
 
<br>
 
'''Counting And Reset'''<br>
 
'''Hookup Guide'''<br>
 
Connect the EASY Plug 4-digit LED display module and button module to control board using RJ11 cables.
 
<br>[[File:数码管.jpg|500px|frameless|thumb]]<br>
 
 
<br>
 
<br>
  
'''Test Code'''<br>
+
===Project 14: LCD Display ===
Below is an example code.
+
'''Overview'''<br>
<br>[[File:ks0397 9.3.1.png|500px|frameless|thumb]]<br>
+
In this project, you will learn how to use an LCD module. An LCD, or liquid crystal display, is a simple screen that can display commands, bits of information, or readings from your sensor - all depending on how you program your board.<br>
<br>[[File:ks0397 9.3.2.png|500px|frameless|thumb]]<br>
 
<br>[[File:ks0397 9.3.3.png|500px|frameless|thumb]]<br>
 
  
 
<br>
 
<br>
'''What You Should See'''<br>
+
'''Component Required'''<br>
The 4-digit LED display starts to show the time counting. If press the button, it will reset the counting.
+
* EASY plug control board*1
 
+
* EASY plug 1602 LCD Module *1
 +
* EASY plug Tilt sensor *1
 +
* EASY plug LED Module *2
 +
* RJ11 cable*1
 +
* USB cable*1 
 +
 
 +
<br>
 +
'''Component Introduction'''  <br>
 +
[[image:ks0137图.jpg|thumb|600px|right|Keyestudio EASY plug 1602 LCD Module]]
  
 +
This is a basic 16 character by 2 line LCD display with white text on blue background.<br>
 +
It comes with EASY Plug connector, you can use one line for simple connection.<br>
 +
* Compatible with Arduino LiquidCrystal Library<br>
 +
* White text on blue background
 +
* 16 characters wide, 2 rows
 +
* I2C Address: 0x27
 +
* Back Light: Blue
 +
* Text Color: White
 +
* Supply Voltage: 5V
 +
* Adjusting contrast by a potentiometer
 
<br>
 
<br>
  
===Project 10: Photo Interrupter ===
+
'''Connect It Up'''<br>
'''Overview'''<br>
+
Connect the EASY Plug 1602 LCD module to control board using an RJ11 cable.
In this project, you will learn about how to use a photo interrupter module to turn on the LED and print the analog value on the monitor.  
+
<br>[[File:ks0137.jpg|500px|frameless|thumb]]<br>
  
 
<br>
 
<br>
'''Component Required:'''<br>
+
'''Upload the Code'''<br>
* EASY plug control board*1
+
Below is an example code.<br>
* EASY plug Photo Interrupter Module *1
+
<br>[[File:ks0397 14.1.png|500px|frameless|thumb]]<br>
* EASY plug LED Module *1
+
 
* EASY plug 4-digit LED Display Module *1  
+
<br>
* RJ11 cable*1
+
'''What You Should See'''<br>
* USB cable*1 
+
<br>[[File:ks0397 14-1.png|500px|frameless|thumb]]<br>
 +
<br>
 +
Initially, you should see the words “hello, word!” and “keyestudio!” pop up on your LCD.<br>
 +
Remember you can adjust the contrast using the potentiometer on the module back if you can’t make out the words clearly.<br>
 +
<br>[[File:ks0397 14-7.png|500px|frameless|thumb]]<br>
 
<br>
 
<br>
 
+
<br>
'''Component Introduction:''' <br>
+
<span style="color: red">'''Little Knowledge:'''</span> <br>
[[image:ks0121图.jpg|thumb|600px|right|Keyestudio EASY plug Photo Interrupter Module]]
+
* If you want to change the characters showed on the LCD screen, you can modify it in the code shown below.
This is a high performance EASY Plug photo interrupter module. <br>
+
<br>[[File:ks0397 14-5.png|500px|frameless|thumb]]<br>
It integrates a photo-interrupter, which belongs to an optical switch of a photo-interrupting photoelectric switch.<br>
+
<br>  
 
+
* Remember you can adjust the contrast by rotating a blue potentiometer  on the LCD back if you can’t make out the words clearly.
The upright part on the module combines an infrared light emitting diode and shielded infrared detector.<br>
+
<br>[[File:ks0397 14-6.png|500px|frameless|thumb]]<br>
By emitting a beam of infrared light from one end to another end, the sensor can detect an object when it passes through the beam. <br>
 
Useful for many applications such as optical limit switches, pellet dispensing, general object detection, etc. <br>
 
Note: this module needs to be used together with EASY plug control board.<br>
 
* Supply Voltage: 3.3V to 5V
 
* Interface: Digital
 
  
 
<br>
 
<br>
'''Connect It Up'''<br>
+
====Extension Experiment====
Connect the EASY Plug Photo Interrupter module and LED module to control board using RJ11 cables.
+
<br>
<br>[[File:光折断灯.jpg|500px|frameless|thumb]]<br>
+
<span style=color:brown>'''Tilt Controlled Counting''' </span><br>
 +
Next, let’s get started with a little bit more complicated experiment. <br>
 +
For instance, use a tilt sensor to control the 1602 LCD show the counting. Let’s get started right now!
 +
<br>
 +
 
 +
'''Hookup Guide'''<br>
 +
Connect the EASY Plug LCD module, two LED modules and a tilt sensor to control board using RJ11 cables.  
 +
<br>[[File:倾斜灯LCD.jpg|500px|frameless|thumb]]<br>
 
<br>
 
<br>
  
'''Upload the Code'''<br>
+
'''Test Code'''<br>
 
Below is an example code.
 
Below is an example code.
<br>[[File:ks0397 10.1.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 14.2.png|500px|frameless|thumb]]<br>
 
+
<br>  
<br>
 
 
'''What You Should See'''<br>
 
'''What You Should See'''<br>
Done uploading the code, powered on, if pick up a piece of paper to cover the light on the groove part of module, you should see the LED is turned on. If no interruption, the LED is off.   <br>
+
Done uploading the code, if tilt the sensor, the red LED is turned on, and you should see the number showed on the first line of 1602 LCD will plus 1 per second, and '''++''' is displayed on the second line.<br>
<br>[[File:ks0397 10-1.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 14-2.png|500px|frameless|thumb]]<br>
<br>[[File:ks0397 10-2.png|500px|frameless|thumb]]<br>
+
<br>
 +
If tilt the sensor to another side, the white LED is turned on, and you should see the number showed on the first line of 1602 LCD will subtract 1, and -- is displayed on the second line.<br>
 +
<br>[[File:ks0397 14-3.png|500px|frameless|thumb]]<br>
  
<br>
+
<br>  
 
+
<span style="color: red">'''Little Knowledge:'''</span> <br>
====Extension Experiment====
+
* Remember you can adjust the contrast by rotating a blue potentiometer  on the LCD back if you can’t make out the words clearly.<br>
'''Adding 4-digit LED Display'''<br>
+
<br>[[File:ks0397 14-6.png|500px|frameless|thumb]]<br>
'''Hookup Guide'''<br>
+
<br>  
Connect the EASY Plug crash sensor, 4-digit LED display and LED module to control board using RJ11 cables. <br>
+
* But if you want to show other characters, you can also change it in the code shown below.
<br>[[File:光折断数码管灯.jpg|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 14-4.png|500px|frameless|thumb]]<br>
  
<br>
 
'''Upload the Code'''<br>
 
Below is an example code.<br>
 
<br>[[File:ks0397 10.2.1.png|500px|frameless|thumb]]<br>
 
<br>[[File:ks0397 10.2.2.png|500px|frameless|thumb]]<br>
 
 
<br>
 
'''What You Should See'''<br>
 
<br>[[File:ks0397 10-3.png|500px|frameless|thumb]]<br>
 
Done uploading the code, if pick up a piece of paper to cover the light on the groove part, the LED is turned on. If no interruption, the LED is off.
 
<br>[[File:ks0397 10-5.png|500px|frameless|thumb]]<br>
 
You should be able to see the number of covering the light is showed on the 4-digit LED display, or on the monitor.
 
<br>[[File:ks0397 10-4.png|500px|frameless|thumb]]<br>
 
  
 
<br>
 
<br>
  
===Project 11: Hall Magnetic Detection===  
+
===Project 15: Sound===
 
'''Overview'''<br>
 
'''Overview'''<br>
What's the best way to detect the magnet? Use another magnet. But it's not sensitive enough. You have to feel it by yourself.<br>
+
When we walk through the corridor to make a sound, the corridor light will automatically light up, after that, quiet down, the lights are off. Why? Actually inside the lighting circuit, it has installed a sound sensor. When detects the sound, light is turned on, or else LED off.<br>
Here you can try to use a hall sensor. It has the characteristics of high sensitivity, fast response, good temperature performance and high reliability.  
+
In this lesson, we will connect a sound sensor to EASY Plug control board, detecting the outside sound and printing out the analog value.
 
<br>
 
<br>
'''Component Required:'''<br>
+
 
 +
'''Component Required''' <br>
 
* EASY plug control board*1
 
* EASY plug control board*1
* EASY plug Hall Magnetic Sensor*1  
+
* EASY plug Analog Sound Sensor *1
* EASY plug LED Module *1  
+
* EASY plug 1602 LCD Module *1
* EASY plug 4-digit LED Display Module *1 
 
 
* RJ11 cable*1
 
* RJ11 cable*1
* USB cable*1  
+
* USB cable*1
 +
 
 +
[[image:ks0105图.jpg|thumb|600px|right|Keyestudio EASY plug Analog Sound Sensor]]
 +
'''Component Introduction'''<br>
 +
It is typically used in detecting the loudness in ambient environment. You can use it to make interactive circuits such as a voice-operated switch.<br>
 +
The sound sensitivity can be adjusted by the potentiometer.<br>
 +
The sensor comes with a fixed hole, easy for fixation on other devices. <br>
 +
* Sensor type: Analog
 +
* Supply Voltage: 3.3V to 5V
 +
* Operating current:<10mA
 +
* Output signal:analog signal
 
<br>
 
<br>
  
'''Component Introduction:'''<br>
+
'''Connect It Up'''<br>
[[image:Ks0110图.jpg|thumb|800px|right|Keyestudio EASY plug Hall Magnetic Sensor]]  
+
Connect the EASY Plug analog sound sensor to control board using an RJ11 cable.
 +
<br>[[File:Ks0105.jpg|500px|frameless|thumb]]<br>
  
The Hall sensor is based on Hall Effect. <br>
+
<br>
It can detect whether there is a magnetic object nearby or not. And it correctly tells you through digital output. <br>
+
'''Upload the Code'''<br>
This sensor uses the SFE Reed Switch - Magnetic Field Sensor. It can sense the magnetic materials within a detection range up to 75px. <br>
+
Below is an example code.
The detection range and the strength of magnetic field are proportional. <br>
+
<br>[[File:ks0397 15.1.png|500px|frameless|thumb]]<br>
It is useful for non-contact/waterproof type switches, position sensors, rotary/shaft encoders.
+
<br>
* Sensing magnetic materials
 
* Detection range: up to 75px
 
* Output: Digital ON/OFF
 
* Detection range and magnetic field strength are proportional
 
  
 +
'''What You Should See'''<br>
 +
After uploading the code, open the serial monitor and set the baud rate to 9600, you should see the analog value is showed on the monitor.
 +
<br>[[File:ks0397 15-1.png|500px|frameless|thumb]]<br>
 +
<br>[[File:ks0397 15-2.png|500px|frameless|thumb]]<br>
 
<br>
 
<br>
 +
 +
====Extension Experiment====
 +
 +
<span style=color:brown>'''Adding LCD Display''' </span><br>
 +
 
'''Connect It Up'''<br>
 
'''Connect It Up'''<br>
Connect the EASY Plug Hall Magnetic Sensor and LED module to control board using RJ11 cables.  
+
Connect the EASY Plug sound sensor and LCD module to control board using RJ11 cables.  
<br>[[File:霍尔灯.jpg|500px|frameless|thumb]]<br>
+
<br>[[File:声音LCD.jpg|500px|frameless|thumb]]<br>
  
 
<br>
 
<br>
 
'''Upload the Code'''<br>
 
'''Upload the Code'''<br>
 
Below is an example code.
 
Below is an example code.
<br>[[File:ks0397 11.1.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 15.2.png|500px|frameless|thumb]]<br>
 +
<br>
  
<br>
 
 
'''What You Should See'''<br>
 
'''What You Should See'''<br>
<br>[[File:ks0397 11-1.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 15-3.png|500px|frameless|thumb]]<br>
When magnetic beads are approaching to the sensor, the LED will be turned on. Otherwise, the LED is off.
+
Upload the code successfully, when the sensor detects the outside sound, the LCD screen will show the sound volume, and its unit is decibel (dB).  
<br>[[File:ks0397 11-2.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 15-4.png|500px|frameless|thumb]]<br>
<br>
 
  
<span style="color: red">'''Little Knowledge:''''</span> <br>
 
If you want to change another way, that is, once magnetic field is detected by sensor, LED is turned off; if no detecting magnetic field, LED is on.  <br>
 
Just need to change the LED state ON or OFF in the code, shown below.<br>
 
<br>[[File:ks0397 11-2-.png|500px|frameless|thumb]]<br>
 
  
<br>
+
<span style="color: red">'''Little Knowledge:'''</span> <br>
====Extension Experiment====
+
* Remember you can adjust the contrast by rotating a blue potentiometer on the LCD back if you can’t make out the words clearly.
 +
<br>[[File:ks0397 14-6.png|500px|frameless|thumb]]<br>
  
'''Adding 4-digit LED Display'''<br>
 
 
'''Hookup Guide'''<br>
 
Connect the EASY Plug hall sensor, 4-digit LED display and red LED module to control board using RJ11 cables.
 
<br>[[File:霍尔灯数码管.jpg|500px|frameless|thumb]]<br>
 
 
<br>
 
'''Upload the Code'''<br>
 
Below is an example code.
 
<br>[[File:ks0397 11.2.1.png|500px|frameless|thumb]]<br>
 
<br>[[File:ks0397 11.2.2.png|500px|frameless|thumb]]<br>
 
 
<br>
 
<br>
  
'''What You Should See'''<br>
+
===Project 16: It Rains===
When magnetic beads are approaching to the sensor, the LED will be turned on. Otherwise, the LED is off. <br>
 
How many times the magnet approaches to the sensor? You should be able to see the result showed on the 4-digit LED display or serial monitor.<br>
 
<br>[[File:ks0397 11-5.png|500px|frameless|thumb]]<br>
 
<br>[[File:ks0397 11-4.png|500px|frameless|thumb]]<br>
 
 
 
 
 
 
<br>
 
<br>
 
===Project 12: Analog Temperature===
 
 
'''Overview'''<br>
 
'''Overview'''<br>
In this circuit, you will learn how to integrate the temperature sensor with your EASY Plug control board, and display the analog temperature on the serial monitor.
+
This experiment we are going to detect the water drop using keyestudio EASY Plug steam sensor. It is an analog sensor that can be used to make simple rain detectors and level switches.  
  
 
<br>
 
<br>
 
'''Component Required'''<br>
 
'''Component Required'''<br>
 
* EASY plug control board*1
 
* EASY plug control board*1
* EASY plug LM35 Temperature Sensor *1
+
* EASY plug Steam Sensor *1
* EASY plug LED module *1
+
* EASY plug 1602 LCD Module *1
* EASY plug 4-digit LED Display Module*1
 
 
* RJ11 cable*1
 
* RJ11 cable*1
 
* USB cable*1
 
* USB cable*1
 
 
<br>
 
<br>
'''Component Introduction'''<br>
+
[[image:Ks0246图.jpg|thumb|600px|right|Keyestudio EASY plug Steam Sensor ]]
[[image:ks0123图.jpg|thumb|600px|right|Keyestudio EASY plug LM35 Temperature Sensor ]]  
+
'''Component Introduction''' <br>
 
+
Vapor Sensor is an analog sensor and can make a simple rainwater detector and liquid level switch. When humidity on the surface of the sensor goes up, the output voltage will increase.<br>
It is based on semiconductor LM35 temperature sensor. A temperature sensor is exactly what it sounds like - a sensor used to measure ambient temperature. <br>
+
<span style="color: red">''' Warning:''' The connector is not waterproof, please be careful not to put the connector directly in water. </span><br>
It is effective in the range between 0 degree Celsius and 100 degree Celsius. Sensitivity is 10mV per degree Celsius. The output voltage is proportional to the temperature.
+
The module can be connected to the analog input interface with only one line, which is very easy and convenient. <br>
* Power supply: 5V
+
* Working Voltage: 5V
* Sensitivity: 10mV per degree Celsius
+
* Working Current: <20mA
* Function range: 0℃ to 100℃
+
* Working Temperature: -10℃~+70℃
 +
* Interface Type: Analog Signal Output
  
 
<br>
 
<br>
 
'''Connect It Up'''<br>
 
'''Connect It Up'''<br>
Connect the EASY Plug LM35 temperature to control board using an RJ11 cable.  
+
Connect the EASY Plug Steam Sensor to control board using an RJ11 cable.  
<br>[[File:ks0123.jpg|500px|frameless|thumb]]<br>
+
<br>[[File:KS0246.jpg|500px|frameless|thumb]]<br>
  
<br>
 
 
'''Upload the Code'''<br>
 
'''Upload the Code'''<br>
 
Below is an example code.
 
Below is an example code.
<br>[[File:ks0397 12.1.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 16.1.png|500px|frameless|thumb]]<br>
 
 
  
 +
<br>
 
'''What You Should See'''<br>
 
'''What You Should See'''<br>
<br>[[File:ks0397 12-1.png|500px|frameless|thumb]]<br>
+
When detect the different degree of humidity, the sensor outputs different value. If the sensor’s sensing area detects a water drop, the analog value will be displayed on monitor window.
Done uploading the code, open the serial monitor and set the baud rate to 9600, you should see the analog temperature value. 
+
<br>[[File:ks0397 16-1.png|500px|frameless|thumb]]<br>
<br>[[File:ks0397 12-2.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 16-2.png|500px|frameless|thumb]]<br>
 +
<br>
 +
<br>
 +
====Extension Experiment====
 +
<br>
 +
<span style=color:brown><big>'''Adding LCD Display'''</big></span><br>
 
<br>
 
<br>
 +
'''Hookup Guide'''<br>
 +
Connect the EASY Plug steam sensor and LCD module to control board using RJ11 cables.
 +
<br>[[File:声音LCD.jpg|500px|frameless|thumb]]<br>
  
====Extension Experiment 1====
 
 
'''Temperature Controlled Light''' <br>
 
Complete the above experiment, you can get the analog temp. value. Want to try some different experiments. <br>
 
For instance, when the temperature reaches the setting value, turn on an LED. Let’s get started right now!<br>
 
 
'''Hookup Guide'''<br>
 
Connect the EASY Plug LM35 sensor and LED module to control board using RJ11 cables.
 
<br>[[File:LM35 灯.jpg|500px|frameless|thumb]]<br>
 
 
<br>
 
<br>
 
+
'''Test Code'''<br>
'''Example Code'''<br>
 
 
Below is an example code.
 
Below is an example code.
<br>[[File:ks0397 12.2.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 16.2.png|500px|frameless|thumb]]<br>
  
 
<br>
 
<br>
 
'''What You Should See'''<br>
 
'''What You Should See'''<br>
Done uploading the code, when the temperature detected by LM35 sensor is greater than 19℃, external LED will be turned on.  
+
<br>[[File:ks0397 16-3.png|500px|frameless|thumb]]<br>
<br>[[File:ks0397 12-4.png|500px|frameless|thumb]]<br>
+
Upload the code successfully, if the sensor detects a drop of water, the data will be showed on the LCD screen.  
 +
<br>[[File:ks0397 16-4.png|500px|frameless|thumb]]<br>
  
 
<br>
 
<br>
<span style="color: red">'''Little Knowledge:''''</span> <br>
+
<span style="color: red">'''Little Knowledge:'''</span> <br>
As we all known, different regions might exists different climate. So if the setting temp. value is too low or too high, cannot turn on the LED, you can change the value in the code shown below. <br>
+
* Remember you can adjust the contrast by rotating a blue potentiometer on the LCD back if you can’t make out the words clearly.
<br>[[File:ks0397 12-5.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 14-6.png|500px|frameless|thumb]]<br>
  
 
<br>
 
<br>
  
====Extension Experiment 2====  
+
===Project 17: Alcohol in the Air===
 +
'''Overview'''<br>
 +
In this project, you will learn how to use the alcohol sensor and control board to detect the alcohol content in the air.
 +
<br>
  
'''Adding 4-digit LED Display''' <br>
+
'''Component Required'''<br>
Next, how about adding a 4-digit LED display to show the temperature value. Let’s get started right now!
+
* EASY plug control board*1
 +
* EASY plug Alcohol Sensor *1
 +
* EASY plug 1602 LCD Module *1
 +
* RJ11 cable*1
 +
* USB cable*1
  
 
<br>
 
<br>
'''Hookup Guide'''<br>
+
'''Component Introduction'''
Connect the EASY Plug LM35 sensor and 4-digit LED module to control board using RJ11 cables.
+
[[image:ks0132图.jpg|thumb|500px|right|Keyestudio EASY plug Analog Alcohol Sensor]]
<br>[[File:LM35 数码管.jpg|500px|frameless|thumb]]<br>
+
This analog gas sensor - MQ3 is suitable for detecting alcohol. It can be used in a Breath analyzer. Also it has high sensitivity to alcohol and low sensitivity to Benzine. <br>
 +
The sensitivity can be adjusted by a blue potentiometer on the sensor.<br>
 +
* Power supply: 5V
 +
* Sensor type: Digital and Analog
 +
* Quick response and High sensitivity
 +
* Simple drive circuit
 +
* Stable and long service life
  
 
<br>
 
<br>
'''Example Code'''<br>
+
'''Connect It Up'''<br>
Below is an example code.<br>
+
Connect the EASY Plug analog alcohol sensor to control board using an RJ11 cable
<br>[[File:ks0397 12.3.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0132.jpg|500px|frameless|thumb]]<br>
 +
 
 +
<br>
 +
'''Upload the Code'''<br>
 +
<br>[[File:ks0397 17.1.png|500px|frameless|thumb]]<br>
  
 
<br>
 
<br>
 
'''What You Should See'''<br>
 
'''What You Should See'''<br>
<br>[[File:ks0397 12-6.png|500px|frameless|thumb]]<br>
+
Done uploading the code, open the serial monitor and set the baud rate to 9600. If the sensor detects the alcohol in the air, you should see the value change. 
Upload success, you should be able to see the temperature value is showed on the 4-digit LED display.
+
<br>[[File:ks0397 17-1.png|500px|frameless|thumb]]<br>
<br>[[File:ks0397 12-7.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 17-2.png|500px|frameless|thumb]]<br>
 +
<br>
  
 +
====Extension Experiment====
 +
<br>
 +
<span style=color:brown>'''Adding LCD Display'''</span><br>
 
<br>
 
<br>
 +
'''Hookup Guide'''<br>
 +
Connect the EASY Plug alcohol sensor and LCD module to control board using RJ11 cables. <br>
 +
<br>[[File:气体LCD.jpg|500px|frameless|thumb]]<br>
  
===Project 13: Tilt Switch===
+
<br>
'''Overview'''<br>
+
'''Test Code'''<br>
This lesson we are going to test the tilt sensor. Simply connect to EASY Plug control board to make amazing interactive projects.  
+
Below is an example code.
 +
<br>[[File:ks0397 17.2.png|500px|frameless|thumb]]<br>
  
 
<br>
 
<br>
'''Component Required:'''<br>
+
'''What You Should See'''<br>
* EASY plug control board*1
+
<br>[[File:ks0397 17-3.png|500px|frameless|thumb]]<br>
* EASY plug Tilt Sensor Module *1
 
* EASY plug LED Module *2 
 
* RJ11 cable*1
 
* USB cable*1
 
 
 
 
<br>
 
<br>
'''Component Introduction:'''<br>
+
Upload success, you should be able to see the alcohol value is showed on the LCD screen. 
[[image:ks0115图.jpg|thumb|600px|right|Keyestudio EASY plug Tilt Sensor Module ]]  
+
<br>[[File:ks0397 17-4.png|500px|frameless|thumb]]<br>
The tilt-switch twig is the equivalent of a button, and is used as a digital input. Inside the tilt switch is a ball that make contact with the pins when the case is upright. Tilt the case over and the balls don't touch, thus not making a connection. When the switch is level it is open, and when tilted, the switch closes.<br>
+
If you can’t see the data clearly, you should rotate the potentiometer on the back of LCD display to adjust the backlight.
It can be used for orientation detection, alarm device or others.  <br>
+
<br>[[File:ks0397 14-6.png|500px|frameless|thumb]]<br>
Here is the principle of tilt sensor to illustrate how it works:<br>
 
<br>[[File:ks0115 works.jpg|500px|frameless|thumb]]<br>
 
* Interface: Easy plug
 
* Supply Voltage: 3.3V to 5V
 
* Sensor type: Digital
 
  
<br>
 
'''Connect It Up'''<br>
 
Connect the EASY Plug Tilt sensor and LED module to control board using RJ11 cables.
 
<br>[[File:倾斜灯.jpg|500px|frameless|thumb]]<br>
 
<br>
 
  
'''Upload the Code'''<br><br>
 
Below is an example code.
 
<br>[[File:ks0397 13.1.png|500px|frameless|thumb]]<br>
 
  
 
<br>
 
<br>
'''What You Should See'''<br>
 
Done uploading the code, if tilt the sensor, you should see the led state ON or OFF. 
 
<br>[[File:ks0397 13-1.png|500px|frameless|thumb]]<br>
 
<br>[[File:ks0397 13-2.png|500px|frameless|thumb]]<br>
 
<br>[[File:ks0397 13-3.png|500px|frameless|thumb]]<br>
 
  
<br>
+
===Project 18: Water Level===
 +
 
 +
'''Overview'''<br>
 +
This lesson we are going to detect the water level using keyestudio water level sensor, showing you the value on the monitor or LCD screen.
  
====Extension Experiment====
+
'''Component Required'''<br>
 
+
* EASY plug control board*1
'''Controlling Two Lights''' <br>  
+
* EASY plug Water Level Sensor *1
Next, how to use tilt sensor to control two lights on and off. Let’s get started right now!
+
* EASY plug 1602 LCD Module *1
 +
* RJ11 cable*1
 +
* USB cable*1 
  
'''Hookup Guide'''<br>
 
Connect the EASY Plug tilt sensor and two LED modules to control board using an RJ11 cable.
 
<br>[[File:倾斜两灯.png|500px|frameless|thumb]]<br>
 
 
<br>
 
<br>
 +
'''Component Introduction'''<br>
 +
[[image:ks0107图.jpg|thumb|600px|right|Keyestudio EASY plug Water Sensor]]
 +
 +
This sensor is easy-to-use, portable and particularly designed to identify and detect water level and water drop. <br>
 +
It can measure the volume of water drop and water quantity through an array of traces of exposed parallel line. <br>
 +
This sensor is small and equipped with the following features:<br>
 +
'''i)''' smooth conversion between water quantity and analog quantity;<br>
 +
'''ii)''' strong flexibility, outputting analog value;<br>
 +
'''iii)''' low power consumption and high sensitivity;<br>
 +
'''iv)''' directly connected to microprocessor or other logic circuits, suitable for a variety of development boards and controllers such as Arduino controller, STC single-chip microcomputer, AVR single-chip microcomputer, etc.<br>
  
'''Upload the Code'''<br>
 
Below is an example code.<br>
 
<br>[[File:ks0397 13.2.png|500px|frameless|thumb]]<br>
 
 
 
<br>
 
<br>
'''What You Should See'''<br>
+
'''Specifications'''<br>
<br>[[File:ks0397 13-4.jpg|500px|frameless|thumb]]<br>
+
* Operating voltage: DC5V
Upload success, if tilt the sensor to one side, you should see one led is turned on; if tilt toward another side, another led is turn on.
+
* Operating current: <20mA
<br>[[File:ks0397 13-6.png|500px|frameless|thumb]]<br>
+
* Sensor type: Analog
<br>[[File:ks0397 13-5.png|500px|frameless|thumb]]<br>
+
* Detection area: 40mm x16mm
 +
* Production process: FR4 double-side tinned
 +
* Operating temperature: 10%~90% without condensation
  
 
<br>
 
<br>
 +
'''Connect It Up'''<br>
 +
Connect the EASY Plug water level sensor to control board using an RJ11 cable.
 +
<br>[[File:ks0107.jpg|500px|frameless|thumb]]<br>
  
===Project 14: LCD Display ===
+
<br>
'''Overview'''<br>
+
'''Upload the Code'''<br>
In this project, you will learn how to use an LCD module. An LCD, or liquid crystal display, is a simple screen that can display commands, bits of information, or readings from your sensor - all depending on how you program your board.<br>
+
Below is an example code.
 +
<br>[[File:ks0397 18.1.png|500px|frameless|thumb]]<br>
  
 
<br>
 
<br>
'''Component Required'''<br>
+
'''What You Should See'''<br>
* EASY plug control board*1
+
<br>[[File:ks0397 18-1.png|500px|frameless|thumb]]<br>
* EASY plug 1602 LCD Module *1
+
Hook it up and upload well the code, you will see the led light on the water sensor light up, then open the serial monitor, you will see the analog value.<br>
* EASY plug Tilt sensor *1
+
When place the sensing area of sensor into the water, you can see the data change. The deeper the sensor’s sensing area into water, the greater the value.
* EASY plug LED Module *2
+
<br>[[File:ks0107 Result.jpg|500px|frameless|thumb]] <br>
* RJ11 cable*1
+
<br>[[File:ks0397 18-2.png|500px|frameless|thumb]]<br>
* USB cable*1 
 
 
 
'''Component Introduction'''  <br>
 
[[image:ks0137图.jpg|thumb|600px|right|Keyestudio EASY plug 1602 LCD Module]]
 
  
This is a basic 16 character by 2 line LCD display with white text on blue background.<br>
 
It comes with EASY Plug connector, you can use one line for simple connection.<br>
 
* Compatible with Arduino LiquidCrystal Library<br>
 
* White text on blue background
 
* 16 characters wide, 2 rows
 
* I2C Address: 0x27
 
* Back Light: Blue
 
* Text Color: White
 
* Supply Voltage: 5V
 
* Adjusting contrast by a potentiometer
 
 
<br>
 
<br>
 +
====Extension Experiment====
  
'''Connect It Up'''<br>
+
<span style=color:brown>'''Adding LCD Display'''</span><br>
Connect the EASY Plug 1602 LCD module to control board using an RJ11 cable.  
+
 
<br>[[File:ks0137.jpg|500px|frameless|thumb]]<br>
+
'''Hookup Guide'''<br>
 +
Connect the EASY Plug water level sensor and LED module to control board using an RJ11 cable. <br>
 +
<br>[[File:water.jpg|500px|frameless|thumb]]<br>
  
 
<br>
 
<br>
'''Upload the Code'''<br>
+
'''Test Code'''<br>
Below is an example code.<br>
+
Below is an example code.
<br>[[File:ks0397 14.1.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 18.2.png|500px|frameless|thumb]]<br>
  
 
<br>
 
<br>
 
'''What You Should See'''<br>
 
'''What You Should See'''<br>
<br>[[File:ks0397 14-1.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 18-3.png|500px|frameless|thumb]]<br>
Initially, you should see the words “hello, word!” and “keyestudio!” pop up on your LCD.<br>
+
Upload success, you should be able to see the analog value is showed on the LCD screen.
Remember you can adjust the contrast using the potentiometer on the module back if you can’t make out the words clearly.<br>
+
<br>[[File:ks0397 18-4.png|500px|frameless|thumb]]<br>
<br>[[File:ks0397 14-7.png|500px|frameless|thumb]]<br>
+
 
<br>
 
  
<span style="color: red">'''Little Knowledge:''''</span> <br>
+
<span style="color: red">'''Little Knowledge:'''</span> <br>
* If you want to change the characters showed on the LCD screen, you can modify it in the code shown below.
+
* Remember you can adjust the contrast by rotating a blue potentiometer on the LCD back if you can’t make out the words clearly.
<br>[[File:ks0397 14-5.png|500px|frameless|thumb]]<br>
 
* Remember you can adjust the contrast by rotating a blue potentiometer on the LCD back if you can’t make out the words clearly.
 
 
<br>[[File:ks0397 14-6.png|500px|frameless|thumb]]<br>
 
<br>[[File:ks0397 14-6.png|500px|frameless|thumb]]<br>
  
 
<br>
 
<br>
====Extension Experiment====
 
  
'''Tilt Controlled Counting'''<br>
+
===Project 19: Potentiometer===
Next, let’s get started with a little bit more complicated experiment. <br>
+
'''Overview'''<br>
For instance, use a tilt sensor to control the 1602 LCD show the counting. Let’s get started right now!
+
In this circuit you’ll work with a potentiometer sensor. You will learn how to simply test this potentiometer sensor to get the analog value.
<br>
+
 
 +
'''Component Required'''<br>
 +
* EASY plug control board*1
 +
* EASY plug Potentiometer Sensor *1
 +
* EASY plug 1602 LCD Module *1
 +
* EASY plug LED Module *1
 +
* RJ11 cable*1
 +
* USB cable*1
 +
<br>
 +
'''Component Introduction'''<br>
 +
[[image:ks0109图.jpg|thumb|600px|right|Keyestudio EASY plug Analog Rotation Sensor]] 
 +
The sensor is based on a potentiometer. A potentiometer is also known as a variable resistor. It is a perfect demonstration of a variable voltage divider circuit. Its voltage can be subdivided into 1023, easy to be connected to Arduino with our sensor shield. <br>
 +
Combined with other sensors, you are able to make interesting projects by reading the analog value from the IO port.<br>
 +
* Interface: Easy plug
 +
* Supply Voltage: 3.3V to 5V
 +
* Sensor type: Analog
  
'''Hookup Guide'''<br>
 
Connect the EASY Plug LCD module, two LED modules and a tilt sensor to control board using RJ11 cables.
 
<br>[[File:倾斜灯LCD.jpg|500px|frameless|thumb]]<br>
 
 
<br>
 
<br>
 +
'''Connect It Up'''<br>
 +
Connect the EASY Plug potentiometer sensor to control board using an RJ11 cable.
 +
<br>[[File:ks0109.jpg|500px|frameless|thumb]]<br>
  
'''Test Code'''<br>
+
<br>
 +
'''Upload the Code'''<br>
 
Below is an example code.
 
Below is an example code.
<br>[[File:ks0397 14.2.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 19.1.png|500px|frameless|thumb]]<br>
  
 +
<br>
 
'''What You Should See'''<br>
 
'''What You Should See'''<br>
Done uploading the code, if tilt the sensor, the red LED is turned on, and you should see the number showed on the first line of 1602 LCD will plus 1 per second, and '''++''' is displayed on the second line.<br>
+
After uploading the code, open the serial monitor and set the baud rate to 9600, you should see the analog value is showed on the monitor.
<br>[[File:ks0397 14-2.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 19-1.png|500px|frameless|thumb]]<br>
 +
If rotate the potentiometer, the printed analog value will change within the range of 0-1023.
 +
<br>[[File:ks0397 19-2.png|500px|frameless|thumb]]<br>
  
If tilt the sensor to another side, the white LED is turned on, and you should see the number showed on the first line of 1602 LCD will subtract 1, and -- is displayed on the second line.<br>
+
<br>
<br>[[File:ks0397 14-3.png|500px|frameless|thumb]]<br>
+
====Extension Experiment====
  
<span style="color: red">'''Little Knowledge:''''</span> <br>
+
<span style=color:brown>'''Controlling Light Brightness''' </span><br>
* Remember you can adjust the contrast by rotating a blue potentiometer  on the LCD back if you can’t make out the words clearly.<br>
 
<br>[[File:ks0397 14-6.png|500px|frameless|thumb]]<br>
 
 
 
* But if you want to show other characters, you can also change it in the code shown below.
 
<br>[[File:ks0397 14-4.png|500px|frameless|thumb]]<br>
 
  
 +
Complete the above experiment, want to try a different experiment? <br>
 +
Next, you will learn how to display the potentiometer value on the 1602 LCD screen and to control the brightness of LED using a potentiometer sensor. <br>
 +
Let’s get started right now!
  
 +
<br>
 +
'''Hookup Guide'''<br>
 +
Connect the EASY Plug potentiometer sensor, a red LED module and 1602 LCD module to control board using RJ11 cables.
 +
<br>[[File:电位器LCD灯.jpg|500px|frameless|thumb]]<br>
 
<br>
 
<br>
  
===Project 15: Sound===
+
'''Test Code'''<br>
'''Overview'''<br>
+
Below is an example code.<br>
When we walk through the corridor to make a sound, the corridor light will automatically light up, after that, quiet down, the lights are off. Why? Actually inside the lighting circuit, it has installed a sound sensor. When detects the sound, light is turned on, or else LED off.<br>
+
<br>[[File:ks0397 18.2.png|500px|frameless|thumb]]<br>
In this lesson, we will connect a sound sensor to EASY Plug control board, detecting the outside sound and printing out the analog value.
 
 
<br>
 
<br>
  
'''Component Required''' <br>
+
'''What You Should See'''<br>
* EASY plug control board*1
+
After uploading the code, rotate the potentiometer knob, you can see the converted value by potentiometer within 0~255 on the 1602 LCD screen, controlling the brightness of LED module.
* EASY plug Analog Sound Sensor *1
+
<br>[[File:ks0397 17-3.png|500px|frameless|thumb]]<br>
* EASY plug 1602 LCD Module *1
+
 
* RJ11 cable*1
+
 
* USB cable*1
+
<span style="color: red">'''Little Knowledge:'''</span> <br>
 +
* Remember you can adjust the contrast by rotating a blue potentiometer on the LCD back if you can’t make out the words clearly.
 +
<br>[[File:ks0397 14-6.png|500px|frameless|thumb]]<br>
  
[[image:ks0105图.jpg|thumb|600px|right|Keyestudio EASY plug Analog Sound Sensor]]
 
'''Component Introduction'''<br>
 
It is typically used in detecting the loudness in ambient environment. You can use it to make interactive circuits such as a voice-operated switch.<br>
 
The sound sensitivity can be adjusted by the potentiometer.<br>
 
The sensor comes with a fixed hole, easy for fixation on other devices. <br>
 
* Sensor type: Analog
 
* Supply Voltage: 3.3V to 5V
 
* Operating current:<10mA
 
* Output signal:analog signal
 
 
<br>
 
<br>
  
'''Connect It Up'''<br>
+
===Project 20: Temperature and Humidity ===
Connect the EASY Plug analog sound sensor to control board using an RJ11 cable.
+
'''Overview'''<br>
<br>[[File:Ks0105.jpg|500px|frameless|thumb]]<br>
+
How to test the temperature and humidity in the current environment? Use a DHT11 sensor. Simply connect to the EASY Plug control board.
  
 
<br>
 
<br>
'''Upload the Code'''<br>
+
'''Component Required'''<br>
Below is an example code.
+
* EASY plug control board*1
<br>[[File:ks0397 15.1.png|500px|frameless|thumb]]<br>
+
* EASY plug DHT11 Sensor *1
<br>
+
* EASY plug 1602 LCD module *1 
 
+
* RJ11 cable*1
'''What You Should See'''<br>
+
* USB cable*1  
After uploading the code, open the serial monitor and set the baud rate to 9600, you should see the analog value is showed on the monitor.
 
<br>[[File:ks0397 15-1.png|500px|frameless|thumb]]<br>
 
<br>[[File:ks0397 15-2.png|500px|frameless|thumb]]<br>
 
 
<br>
 
<br>
  
====Extension Experiment====
+
'''Component Introduction'''
 
+
[[image:ks0129图.jpg|thumb|600px|right|Keyestudio EASY plug DHT11 Temperature and Humidity Sensor]]
<span style=color:brown>'''Adding LCD Display''' </span><br>
+
The DHT11 is a basic, ultra low-cost digital temperature and humidity sensor. <br>
 +
It uses a capacitive humidity sensor and a thermistor to measure the surrounding air, and provides a pre-calibrated digital signal output. <br>
 +
This DHT11 sensor has fast response, anti-interference ability, excellent reliability and long-term stability.<br>
 +
* Supply Voltage: 5V
 +
* Relative Humidity and temperature measurement
 +
* Good for 20-90% humidity readings with 5% accuracy
 +
* Good for 0-50°C temperature readings ±2°C accuracy
 +
* Interface: Digital
 +
* Low Cost
 +
<br>
  
 
'''Connect It Up'''<br>
 
'''Connect It Up'''<br>
Connect the EASY Plug sound sensor and LCD module to control board using RJ11 cables.  
+
Connect the EASY Plug temperature and humidity module to control board using an RJ11 cable.  
<br>[[File:声音LCD.jpg|500px|frameless|thumb]]<br>
+
<br>[[File:ks0129.jpg|500px|frameless|thumb]]<br>
  
 
<br>
 
<br>
 
'''Upload the Code'''<br>
 
'''Upload the Code'''<br>
 
Below is an example code.
 
Below is an example code.
<br>[[File:ks0397 15.2.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 20.1.png|500px|frameless|thumb]]<br>
 +
 
 
<br>
 
<br>
 
 
'''What You Should See'''<br>
 
'''What You Should See'''<br>
<br>[[File:ks0397 15-3.png|500px|frameless|thumb]]<br>
+
Open the Serial monitor, you should be able to see the temperature and humidity data. <br>
Upload the code successfully, when the sensor detects the outside sound, the LCD screen will show the sound volume, and its unit is decibel (dB).  
+
<br>[[File:图片1sdsdssd-1.png|500px|frameless|thumb]]<br>
<br>[[File:ks0397 15-4.png|500px|frameless|thumb]]<br>
+
<br>
 +
<span style="color: red">'''Little Knowledge:'''</span> <br>
 +
* If the data is scrolling very fast, you can’t make out the data clearly, so you can modify the Delay time in the code to check it easily.
 +
<br>[[File:ks0397 20-5.png|500px|frameless|thumb]]<br>
  
 +
<br>
 +
====Extension Experiment====
 +
<br>
 +
<span style=color:brown>'''Make a Hygrothermograph'''</span><br>
 +
<br>
 +
'''Hookup Guide'''<br>
 +
Connect the EASY Plug DHT11 sensor and 1602 LCD module to control board using RJ11 cables.
 +
<br>[[File:温湿度2.jpg|500px|frameless|thumb]]<br>
  
<span style="color: red">'''Little Knowledge:'''</span> <br>
+
<br>
* Remember you can adjust the contrast by rotating a blue potentiometer on the LCD back if you can’t make out the words clearly.
+
'''Test Code'''<br>
<br>[[File:ks0397 14-6.png|500px|frameless|thumb]]<br>
+
Below is an example code.
 +
<br>[[File:ks0397 20.1.png|500px|frameless|thumb]]<br>
  
 
<br>
 
<br>
 +
'''What You Should See'''<br>
 +
<br>[[File:ks0397 20-3.png|500px|frameless|thumb]]<br>
 +
<br>
 +
Upload success, you should be able to see the temperature and humidity data are showed on the LCD screen.
 +
<br>[[File:图片1sdsdssd.png|500px|frameless|thumb]]<br>
  
===Project 16: It Rains===
 
'''Overview'''<br>
 
This experiment we are going to detect the water drop using keyestudio EASY Plug steam sensor. It is an analog sensor that can be used to make simple rain detectors and level switches.
 
 
<br>
 
<br>
 +
 +
===Project 21: Matrix Display ===
 +
'''Overview'''<br>
 +
This lesson you will learn how to use an 8x8 LED matrix to show different images.
  
 
'''Component Required'''<br>
 
'''Component Required'''<br>
 
* EASY plug control board*1
 
* EASY plug control board*1
* EASY plug Steam Sensor *1
+
* EASY plug I2C 8x8 LED Matrix *1  
* EASY plug 1602 LCD Module *1
+
* EASY plug button module*1
 
* RJ11 cable*1
 
* RJ11 cable*1
* USB cable*1
+
* USB cable*1  
 +
<br>
  
[[image:Ks0246图.jpg|thumb|600px|right|Keyestudio EASY plug Steam Sensor ]]
 
 
'''Component Introduction''' <br>
 
'''Component Introduction''' <br>
Vapor Sensor is an analog sensor and can make a simple rainwater detector and liquid level switch. When humidity on the surface of the sensor goes up, the output voltage will increase.<br>
+
[[File:88-2.png|500px|right|frameless|thumb]]
<span style="color: red">''' Warning:''' The connector is not waterproof, please be careful not to put the connector directly in water. </span><br>
+
What's better than a single LED? Lots of LEDs! A fun way to make a small display is to use an 8x8 matrix. <br>
The module can be connected to the analog input interface with only one line, which is very easy and convenient. <br>
+
This module uses HT16K33 chip to drive an 8x8 dot matrix. Just need to use the I2C communication port of microcontroller to control the dot matrix, which can save more port resources of microcontroller.<br>
* Working Voltage: 5V
+
The four pin of this module is integrated into a crystal plug. All you need to do is connect the module to control board for communication using an RJ11 cable.<br>
* Working Current: <20mA
+
* Interface: Easy plug
* Working Temperature: -10℃~+70℃
+
* Supply voltage: 4.5V-5.5V
* Interface Type: Analog Signal Output
 
  
 
<br>
 
<br>
 
'''Connect It Up'''<br>
 
'''Connect It Up'''<br>
Connect the EASY Plug Steam Sensor to control board using an RJ11 cable.  
+
Connect the EASY Plug 8x8 LED Matrix module to control board using an RJ11 cable.  
<br>[[File:KS0246.jpg|500px|frameless|thumb]]<br>
+
<br>[[File:88-3.png|500px|frameless|thumb]]<br>
  
 +
<br>
 
'''Upload the Code'''<br>
 
'''Upload the Code'''<br>
 
Below is an example code.
 
Below is an example code.
<br>[[File:ks0397 16.1.png|500px|frameless|thumb]]<br>
+
<br>[[File:88-4.png|500px|frameless|thumb]]<br>
  
 
<br>
 
<br>
 
'''What You Should See'''<br>
 
'''What You Should See'''<br>
When detect the different degree of humidity, the sensor outputs different value. If the sensor’s sensing area detects a water drop, the analog value will be displayed on monitor window.
+
Upload the code successfully, it will light up a dot light on the matrix.
<br>[[File:ks0397 16-1.png|500px|frameless|thumb]]<br>
+
<br>[[File:88-5.png|500px|frameless|thumb]]<br>
<br>[[File:ks0397 16-2.png|500px|frameless|thumb]]<br>
+
 
 +
<br>
 +
====Extension Experiment 1====
 
<br>
 
<br>
 +
<span style=color:brown><big>'''Showing 0~5'''</big></span><br>
 +
You can upload the code below to show the number 0~5.
 +
<br>[[File:ks0397 21.2.1.png|500px|frameless|thumb]]<br>
 +
<br>[[File:ks0397 21.2.2.png|500px|frameless|thumb]]<br>
 +
<br>[[File:ks0397 21.2.3.png|500px|frameless|thumb]]<br>
  
====Extension Experiment====
+
<br>
 
+
'''What You Should See'''<br>
'''Adding LCD Display'''<br>
+
Upload the code successfully, the matrix will show the number from 0 to 5.
 +
<br>[[File:88-6.png|500px|frameless|thumb]]<br>
 +
<br>
  
 +
====Extension Experiment 2====
 +
<br>
 +
<span style=color:brown><big>'''Button Controlled Heart'''</big></span><br>
 +
<br>
 
'''Hookup Guide'''<br>
 
'''Hookup Guide'''<br>
Connect the EASY Plug steam sensor and LCD module to control board using RJ11 cables.  
+
Connect the EASY Plug 8x8 LED Matrix module and button module to control board using RJ11 cables.  
<br>[[File:声音LCD.jpg|500px|frameless|thumb]]<br>
+
<br>[[File:88-7.png|500px|frameless|thumb]]<br>
  
 
<br>
 
<br>
 
'''Test Code'''<br>
 
'''Test Code'''<br>
Below is an example code.
+
Below is an example code.<br>
<br>[[File:ks0397 16.2.png|500px|frameless|thumb]]<br>
+
<br>[[File:8-13.png|500px|frameless|thumb]]<br>
 +
 
  
 
<br>
 
<br>
 
'''What You Should See'''<br>
 
'''What You Should See'''<br>
<br>[[File:ks0397 16-3.png|500px|frameless|thumb]]<br>
+
<br>[[File:88-9.png|500px|frameless|thumb]]<br>
Upload the code successfully, if the sensor detects a drop of water, the data will be showed on the LCD screen.  
+
<br>
<br>[[File:ks0397 16-4.png|500px|frameless|thumb]]<br>
+
Upload the code successfully, press the button, you can control the matrix show a big heart image or a small one. It seems like a beating heart.
 +
<br>[[File:88-8.png|500px|frameless|thumb]]<br>
  
<span style="color: red">'''Little Knowledge:''''</span> <br>
 
* Remember you can adjust the contrast by rotating a blue potentiometer on the LCD back if you can’t make out the words clearly.
 
<br>[[File:ks0397 14-6.png|500px|frameless|thumb]]<br>
 
  
 
<br>
 
<br>
  
===Project 17: Alcohol in the Air===
+
===Project 22: Acceleration===
 +
 
 
'''Overview'''<br>
 
'''Overview'''<br>
In this project, you will learn how to use the alcohol sensor and control board to detect the alcohol content in the air.  
+
This lesson you will learn about how to use a Triple Axis Acceleration module ADXL345 for tilt sensing.
 +
 
<br>
 
<br>
 
 
'''Component Required'''<br>
 
'''Component Required'''<br>
 
* EASY plug control board*1
 
* EASY plug control board*1
* EASY plug Alcohol Sensor *1
+
* EASY plug ADXL345 Acceleration Module *1
* EASY plug 1602 LCD Module *1
+
* EASY plug LED module *3
 
* RJ11 cable*1
 
* RJ11 cable*1
* USB cable*1
+
* USB cable*1  
 +
 
 +
<br>
 +
'''Component Introduction'''  <br>
 +
[[image:ks0128图.jpg|thumb|600px|right|Keyestudio EASY plug ADXL345 Acceleration Module]]
 +
The ADXL345 module is a low power, 3-axis MEMS accelerometer with high resolution (13-bit) and measurement at up to ±16g (gravitational force). <br>
 +
Digital output data is formatted as 16-bit twos complement, and is accessible through either a SPI or I2C digital interface.<br>
 +
The ADXL345 is well suited to measures the static acceleration of gravity in tilt-sensing applications, as well as dynamic acceleration resulting from motion or shock.<br>
 +
* Working Voltage: 2.0-3.6V 
 +
* Ultra Low Power @2.5v: 40uA /working mode; 0.1uA / standby mode
 +
* Communication interface: I2C / SPI
 +
* Tap/Double Tap Detection ; Free-Fall Detection
  
 +
<br>
 +
'''Connect It Up'''<br>
 +
Connect the EASY Plug ADXL345 Acceleration module to control board using an RJ11 cable.
 +
<br>[[File:ks0128.jpg|500px|frameless|thumb]]<br>
  
'''Component Introduction'''<br>
+
<br>
[[image:ks0132图.jpg|thumb|500px|right|Keyestudio EASY plug Analog Alcohol Sensor]]<br>
+
'''Upload the Code'''<br>
This analog gas sensor - MQ3 is suitable for detecting alcohol. It can be used in a Breath analyzer. Also it has high sensitivity to alcohol and low sensitivity to Benzine. <br>
+
Upload the code to your board to check the 3-axis acceleration data and the module's tilt information.
The sensitivity can be adjusted by a blue potentiometer on the sensor.<br>
+
<br>[[File:ks0397 22.1.png|500px|frameless|thumb]]<br>
* Power supply: 5V
 
* Sensor type: Digital and Analog
 
* Quick response and High sensitivity
 
* Simple drive circuit
 
* Stable and long service life
 
  
 
<br>
 
<br>
'''Connect It Up'''<br>
+
'''What You Should See'''<br>
Connect the EASY Plug analog alcohol sensor to control board using an RJ11 cable
+
Open the Serial monitor to see the 3-axis acceleration data. See changes as you sway the Accelerometer.
<br>[[File:ks0132.jpg|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 22-2.png|500px|frameless|thumb]]<br>
  
 
<br>
 
<br>
'''Upload the Code'''<br>
+
<span style="color: red">'''Little Knowledge:'''</span> <br>
<br>[[File:ks0397 17.1.png|500px|frameless|thumb]]<br>
+
If you think the monitor’s result is too fast to see the data clearly, you can drag a Delay block to add into the source code. Shown below. <br>
 +
After that, upload the code again and open the monitor, you should be able to see the display data clearly.  <br>
 +
<br>[[File:ks0397 22-3.png|500px|frameless|thumb]]<br>
 +
 
  
 
<br>
 
<br>
'''What You Should See'''<br>
 
Done uploading the code, open the serial monitor and set the baud rate to 9600. If the sensor detects the alcohol in the air, you should see the value change. 
 
<br>[[File:ks0397 17-1.png|500px|frameless|thumb]]<br>
 
<br>[[File:ks0397 17-2.png|500px|frameless|thumb]]<br>
 
<br>
 
 
 
====Extension Experiment====
 
====Extension Experiment====
 
+
<br>
'''Adding LCD Display'''<br>
+
<span style=color:brown>'''Controlling Three LEDs''' </span><br>
 
+
<br>
 
'''Hookup Guide'''<br>
 
'''Hookup Guide'''<br>
Connect the EASY Plug alcohol sensor and LCD module to control board using RJ11 cables. <br>
+
Connect the EASY Plug ADXL345 Acceleration module and three LED modules to control board using RJ11 cables.  
<br>[[File:气体LCD.jpg|500px|frameless|thumb]]<br>
+
<br>[[File:三轴灯.jpg|500px|frameless|thumb]]<br>
  
 
<br>
 
<br>
 
'''Test Code'''<br>
 
'''Test Code'''<br>
Below is an example code.
+
Upload the test code below to your board to check the 3-axis acceleration data and the module's tilt information.
<br>[[File:ks0397 17.2.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 22.2.png|700px|frameless|thumb]]<br>
 +
 
 
<br>
 
<br>
 
 
'''What You Should See'''<br>
 
'''What You Should See'''<br>
<br>[[File:ks0397 17-3.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 22-4.png|500px|frameless|thumb]]<br>
Upload success, you should be able to see the alcohol value is showed on the LCD screen.
+
<br>
<br>[[File:ks0397 17-4.png|500px|frameless|thumb]]<br>
+
Upload success, open the serial monitor, it prints out the value of X,Y,Z axis. Each axis controls a light. If the measured value is greater than 200, LED lights up.  
If you can’t see the data clearly, you should rotate the potentiometer on the back of LCD display to adjust the backlight.
+
<br>[[File:ks0397 22-6.png|500px|frameless|thumb]]<br>
<br>[[File:ks0397 14-6.png|500px|frameless|thumb]]<br>
+
<br>[[File:ks0397 22-7.png|500px|frameless|thumb]]<br>
 
+
<br>[[File:ks0397 22-8.png|500px|frameless|thumb]]<br>
  
  
 
<br>
 
<br>
  
===Project 18: Water Level===
+
==Resources==
  
'''Overview'''<br>
 
This lesson we are going to detect the water level using keyestudio water level sensor, showing you the value on the monitor or LCD screen.
 
  
'''Component Required'''<br>
+
* '''Keyestudio Official Website:''' http://www.keyestudio.com/<br>
* EASY plug control board*1
+
 
* EASY plug Water Level Sensor *1
+
* '''Keyestudio WIKI Website:''' http://wiki.keyestudio.com/<br>
* EASY plug 1602 LCD Module *1
+
 
* RJ11 cable*1
 
* USB cable*1 
 
  
<br>
 
'''Component Introduction'''<br>
 
[[image:ks0107图.jpg|thumb|600px|right|Keyestudio EASY plug Water Sensor]]
 
  
This sensor is easy-to-use, portable and particularly designed to identify and detect water level and water drop. <br>
+
<big>
It can measure the volume of water drop and water quantity through an array of traces of exposed parallel line. <br>
+
* '''KS0397 Downlaod Link:'''
This sensor is small and equipped with the following features:<br>
+
https://fs.keyestudio.com/KS0397</big>
'''i)''' smooth conversion between water quantity and analog quantity;<br>
 
'''ii)''' strong flexibility, outputting analog value;<br>
 
'''iii)''' low power consumption and high sensitivity;<br>
 
'''iv)''' directly connected to microprocessor or other logic circuits, suitable for a variety of development boards and controllers such as Arduino controller, STC single-chip microcomputer, AVR single-chip microcomputer, etc.<br>
 
  
<br>
 
'''Specifications'''<br>
 
* Operating voltage: DC5V
 
* Operating current: <20mA
 
* Sensor type: Analog
 
* Detection area: 40mm x16mm
 
* Production process: FR4 double-side tinned
 
* Operating temperature: 10%~90% without condensation
 
  
 
<br>
 
<br>
'''Connect It Up'''<br>
 
Connect the EASY Plug water level sensor to control board using an RJ11 cable.
 
<br>[[File:ks0107.jpg|500px|frameless|thumb]]<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>
 +
 
<br>
 
<br>
'''Upload the Code'''<br>
 
Below is an example code.
 
<br>[[File:ks0397 18.1.png|500px|frameless|thumb]]<br>
 
  
<br>
+
==About keyestudio==
'''What You Should See'''<br>
+
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>
<br>[[File:ks0397 18-1.png|500px|frameless|thumb]]<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>
Hook it up and upload well the code, you will see the led light on the water sensor light up, then open the serial monitor, you will see the analog value.<br>
+
All of our products comply with international quality standards and are greatly appreciated in a variety of different markets throughout the world.<br>
When place the sensing area of sensor into the water, you can see the data change. The deeper the sensor’s sensing area into water, the greater the value.
 
<br>[[File:ks0107 Result.jpg|500px|frameless|thumb]] <br>
 
<br>[[File:ks0397 18-2.png|500px|frameless|thumb]]<br>
 
  
<br>
+
For more details of our products, you can check it from the links below.<br>
====Extension Experiment====
+
Official website: http://www.keyestudio.com/<br>
 
+
US Amazon storefront: http://www.amazon.com/shops/A26TCVWBQE4D9T<br>
<span style=color:brown>'''Adding LCD Display'''</span><br>
+
CA Amazon storefront: http://www.amazon.ca/shops/A26TCVWBQE4D9T<br>
 
+
UK Amazon storefront:http://www.amazon.co.uk/shops/A39F7KX4U3W9JH<br>
'''Hookup Guide'''<br>
+
DE Amazon storefront: http://www.amazon.de/shops/A39F7KX4U3W9JH<br>
Connect the EASY Plug water level sensor and LED module to control board using an RJ11 cable. <br>
+
FR Amazon storefront: http://www.amazon.de/shops/A39F7KX4U3W9JH<br>
<br>[[File:water.jpg|500px|frameless|thumb]]<br>
+
ES Amazon storefront: http://www.amazon.de/shops/A39F7KX4U3W9JH<br>
 
+
IT Amazon storefront: http://www.amazon.de/shops/A39F7KX4U3W9JH<br>
<br>
+
US Amazon storefront: http://www.amazon.com/shops/APU90DTITU5DG<br>
'''Test Code'''<br>
+
CA Amazon storefront: http://www.amazon.ca/shops/APU90DTITU5DG<br>
Below is an example code.
+
JP Amazon storefront: http://www.amazon.jp/shops/AE9VWCCXQIC6J<br>
<br>[[File:ks0397 18.2.png|500px|frameless|thumb]]<br>
 
  
 
<br>
 
<br>
'''What You Should See'''<br>
 
<br>[[File:ks0397 18-3.png|500px|frameless|thumb]]<br>
 
Upload success, you should be able to see the analog value is showed on the LCD screen. 
 
<br>[[File:ks0397 18-4.png|500px|frameless|thumb]]<br>
 
 
 
<span style="color: red">'''Little Knowledge:'''</span> <br>
 
* Remember you can adjust the contrast by rotating a blue potentiometer on the LCD back if you can’t make out the words clearly.
 
<br>[[File:ks0397 14-6.png|500px|frameless|thumb]]<br>
 
  
 
<br>
 
<br>
  
===Project 19: Potentiometer===
+
==Customer Service==
'''Overview'''<br>
+
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>  
In this circuit you’ll work with a potentiometer sensor. You will learn how to simply test this potentiometer sensor to get the analog value. 
+
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>
'''Component Required'''<br>
+
Thank you in advance.<br>
* EASY plug control board*1
 
* EASY plug Potentiometer Sensor *1
 
* EASY plug 1602 LCD Module *1
 
* EASY plug LED Module *1
 
* RJ11 cable*1
 
* USB cable*1
 
<br>
 
'''Component Introduction'''<br>
 
[[image:ks0109图.jpg|thumb|600px|right|Keyestudio EASY plug Analog Rotation Sensor]] 
 
The sensor is based on a potentiometer. A potentiometer is also known as a variable resistor. It is a perfect demonstration of a variable voltage divider circuit. Its voltage can be subdivided into 1023, easy to be connected to Arduino with our sensor shield. <br>
 
Combined with other sensors, you are able to make interesting projects by reading the analog value from the IO port.<br>
 
* Interface: Easy plug
 
* Supply Voltage: 3.3V to 5V
 
* Sensor type: Analog
 
 
 
<br>
 
'''Connect It Up'''<br>
 
Connect the EASY Plug potentiometer sensor to control board using an RJ11 cable.
 
<br>[[File:ks0109.jpg|500px|frameless|thumb]]<br>
 
 
 
<br>
 
'''Upload the Code'''<br>
 
Below is an example code.
 
<br>[[File:ks0397 19.1.png|500px|frameless|thumb]]<br>
 
 
 
<br>
 
'''What You Should See'''<br>
 
After uploading the code, open the serial monitor and set the baud rate to 9600, you should see the analog value is showed on the monitor.
 
<br>[[File:ks0397 19-1.png|500px|frameless|thumb]]<br>
 
If rotate the potentiometer, the printed analog value will change within the range of 0-1023.
 
<br>[[File:ks0397 19-2.png|500px|frameless|thumb]]<br>
 
 
 
<br>
 
====Extension Experiment====
 
 
 
<span style=color:brown>'''Controlling Light Brightness''' </span><br>
 
 
 
Complete the above experiment, want to try a different experiment? <br>
 
Next, you will learn how to display the potentiometer value on the 1602 LCD screen and to control the brightness of LED using a potentiometer sensor. <br>
 
Let’s get started right now!
 
 
 
<br>
 
'''Hookup Guide'''<br>
 
Connect the EASY Plug potentiometer sensor, a red LED module and 1602 LCD module to control board using RJ11 cables.
 
<br>[[File:电位器LCD灯.jpg|500px|frameless|thumb]]<br>
 
<br>
 
 
 
'''Test Code'''<br>
 
Below is an example code.<br>
 
<br>[[File:ks0397 18.2.png|500px|frameless|thumb]]<br>
 
<br>
 
 
 
'''What You Should See'''<br>
 
After uploading the code, rotate the potentiometer knob, you can see the converted value by potentiometer within 0~255 on the 1602 LCD screen, controlling the brightness of LED module.
 
<br>[[File:ks0397 17-3.png|500px|frameless|thumb]]<br>
 
 
 
 
 
<span style="color: red">'''Little Knowledge:''''</span> <br>
 
* Remember you can adjust the contrast by rotating a blue potentiometer on the LCD back if you can’t make out the words clearly.
 
<br>[[File:ks0397 14-6.png|500px|frameless|thumb]]<br>
 
 
 
<br>
 
 
 
===Project 20: Temperature and Humidity ===
 
'''Overview'''<br>
 
How to test the temperature and humidity in the current environment? Use a DHT11 sensor. Simply connect to the EASY Plug control board.
 
 
 
<br>
 
'''Component Required'''<br>
 
* EASY plug control board*1
 
* EASY plug DHT11 Sensor *1
 
* EASY plug 1602 LCD module *1 
 
* RJ11 cable*1
 
* USB cable*1 
 
<br>
 
 
 
'''Component Introduction'''<br>
 
[[image:ks0129图.jpg|thumb|600px|right|Keyestudio EASY plug DHT11 Temperature and Humidity Sensor]]<br>
 
The DHT11 is a basic, ultra low-cost digital temperature and humidity sensor. <br>
 
It uses a capacitive humidity sensor and a thermistor to measure the surrounding air, and provides a pre-calibrated digital signal output. <br>
 
This DHT11 sensor has fast response, anti-interference ability, excellent reliability and long-term stability.<br>
 
* Supply Voltage: 5V
 
* Relative Humidity and temperature measurement
 
* Good for 20-90% humidity readings with 5% accuracy
 
* Good for 0-50°C temperature readings ±2°C accuracy
 
* Interface: Digital
 
* Low Cost
 
<br>
 
 
 
'''Connect It Up'''<br>
 
Connect the EASY Plug temperature and humidity module to control board using an RJ11 cable.
 
<br>[[File:ks0129.jpg|500px|frameless|thumb]]<br>
 
 
 
<br>
 
'''Upload the Code'''<br>
 
Below is an example code.
 
<br>[[File:ks0397 20.1.png|500px|frameless|thumb]]<br>
 
 
 
<br>
 
'''What You Should See'''<br>
 
Open the Serial monitor, you should be able to see the temperature and humidity data. <br>
 
<br>[[File:ks0397 20-2.png|500px|frameless|thumb]]<br>
 
 
 
<span style="color: red">'''Little Knowledge:''''</span> <br>
 
* If the data is scrolling very fast, you can’t make out the data clearly, so you can modify the Delay time in the code to check it easily.
 
<br>[[File:ks0397 20-5.png|500px|frameless|thumb]]<br>
 
 
 
<br>
 
====Extension Experiment====
 
 
 
'''Make a Hygrothermograph'''<br>
 
 
 
'''Hookup Guide'''<br>
 
Connect the EASY Plug DHT11 sensor and 1602 LCD module to control board using RJ11 cables.
 
<br>[[File:温湿度2.jpg|500px|frameless|thumb]]<br>
 
 
 
<br>
 
'''Test Code'''<br>
 
Below is an example code.
 
<br>[[File:ks0397 20.1.png|500px|frameless|thumb]]<br>
 
 
 
<br>
 
'''What You Should See'''<br>
 
<br>[[File:ks0397 20-3.png|500px|frameless|thumb]]<br>
 
Upload success, you should be able to see the temperature and humidity data are showed on the LCD screen.
 
<br>[[File:ks0397 20-4.png|500px|frameless|thumb]]<br>
 
 
 
<br>
 
 
 
===Project 21: Matrix Display ===
 
'''Overview'''<br>
 
This lesson you will learn how to use an 8x8 LED matrix to show different images.
 
 
 
'''Component Required'''<br>
 
* EASY plug control board*1
 
* EASY plug I2C 8x8 LED Matrix *1
 
* EASY plug button module*1
 
* RJ11 cable*1
 
* USB cable*1 
 
<br>
 
 
 
'''Component Introduction''' <br>
 
[[File:Ks0139-2.png|500px|right|frameless|thumb]]
 
What's better than a single LED? Lots of LEDs! A fun way to make a small display is to use an 8x8 matrix. <br>
 
This module uses HT16K33 chip to drive an 8x8 dot matrix. Just need to use the I2C communication port of microcontroller to control the dot matrix, which can save more port resources of microcontroller.<br>
 
The four pin of this module is integrated into a crystal plug. All you need to do is connect the module to control board for communication using an RJ11 cable.<br>
 
* Interface: Easy plug
 
* Supply voltage: 4.5V-5.5V
 
 
 
 
 
'''Connect It Up'''<br>
 
Connect the EASY Plug 8x8 LED Matrix module to control board using an RJ11 cable.
 
<br>[[File:图片1-0139.png|500px|frameless|thumb]]<br>
 
 
 
 
 
'''Upload the Code'''<br>
 
Below is an example code.
 
<br>[[File:ks0397 21.1.png|500px|frameless|thumb]]<br>
 
 
 
 
 
'''What You Should See'''<br>
 
Upload the code successfully, it will light up a dot light on the matrix. 
 
<br>[[File:ks0397 21-1.png|500px|frameless|thumb]]<br>
 
 
 
<br>
 
====Extension Experiment 1====
 
 
 
'''Showing 0~5'''<br>
 
You can upload the code below to show the number 0~5.
 
<br>[[File:ks0397 21.2.1.png|500px|frameless|thumb]]<br>
 
<br>[[File:ks0397 21.2.2.png|500px|frameless|thumb]]<br>
 
<br>[[File:ks0397 21.2.3.png|500px|frameless|thumb]]<br>
 
 
 
 
 
'''What You Should See'''<br>
 
Upload the code successfully, the matrix will show the number from 0 to 5.
 
<br>[[File:ks0397 21-3.png|500px|frameless|thumb]]<br>
 
<br>[[File:ks0397 21-4.png|500px|frameless|thumb]]<br>
 
<br>[[File:ks0397 21-5.png|500px|frameless|thumb]]<br>
 
<br>
 
 
 
====Extension Experiment 2====
 
 
 
'''Button Controlled Heart'''<br>
 
<br>
 
'''Hookup Guide'''<br>
 
Connect the EASY Plug 8x8 LED Matrix module and button module to control board using RJ11 cables.
 
<br>[[File:8x8点阵按键.jpg|500px|frameless|thumb]]<br>
 
 
 
 
 
'''Test Code'''<br>
 
Below is an example code.<br>
 
<br>[[File:ks0397 21.3.1.png|500px|frameless|thumb]]<br>
 
<br>[[File:ks0397 21.3.2.png|500px|frameless|thumb]]<br>
 
 
 
 
 
'''What You Should See'''<br>
 
<br>[[File:ks0397 21-6.png|500px|frameless|thumb]]<br>
 
Upload the code successfully, press the button, you can control the matrix show a big heart image or a small one. It seems like a beating heart.
 
<br>[[File:ks0397 21-7.png|500px|frameless|thumb]]<br>
 
<br>[[File:ks0397 21-8.png|500px|frameless|thumb]]<br>
 
 
 
<br>
 
 
 
===Project 22: Acceleration=== 
 
'''Overview'''<br>
 
This lesson you will learn about how to use a Triple Axis Acceleration module ADXL345 for tilt sensing.
 
 
 
 
'''Component Required'''<br>
 
* EASY plug control board*1
 
* EASY plug ADXL345 Acceleration Module *1
 
* EASY plug LED module *3
 
* RJ11 cable*1
 
* USB cable*1 
 
 
 
 
 
'''Component Introduction'''  <br>
 
[[image:ks0128图.jpg|thumb|600px|right|Keyestudio EASY plug ADXL345 Acceleration Module]]
 
 
 
The ADXL345 module is a low power, 3-axis MEMS accelerometer with high resolution (13-bit) and measurement at up to ±16g (gravitational force). <br>
 
Digital output data is formatted as 16-bit twos complement, and is accessible through either a SPI or I2C digital interface.<br>
 
The ADXL345 is well suited to measures the static acceleration of gravity in tilt-sensing applications, as well as dynamic acceleration resulting from motion or shock.
 
* Working Voltage: 2.0-3.6V 
 
* Ultra Low Power @2.5v: 40uA /working mode; 0.1uA / standby mode
 
* Communication interface: I2C / SPI
 
* Tap/Double Tap Detection ; Free-Fall Detection
 
 
 
 
 
'''Connect It Up'''<br>
 
Connect the EASY Plug ADXL345 Acceleration module to control board using an RJ11 cable.
 
<br>[[File:ks0128.jpg|500px|frameless|thumb]]<br>
 
<br>
 
 
 
'''Upload the Code'''<br>
 
Upload the code to your board to check the 3-axis acceleration data and the module's tilt information.
 
<br>[[File:ks0397 22.1.png|500px|frameless|thumb]]<br>
 
 
 
 
 
'''What You Should See'''<br>
 
Open the Serial monitor to see the 3-axis acceleration data. See changes as you sway the Accelerometer.
 
<br>[[File:ks0397 22-2.png|500px|frameless|thumb]]<br>
 
 
 
<span style="color: red">'''Little Knowledge:''''</span> <br>
 
If you think the monitor’s result is too fast to see the data clearly, you can drag a Delay block to add into the source code. Shown below. <br>
 
After that, upload the code again and open the monitor, you should be able to see the display data clearly.  <br>
 
<br>[[File:ks0397 22-3.png|500px|frameless|thumb]]<br>
 
<br>
 
 
 
====Extension Experiment====
 
 
 
'''Controlling Three LEDs'''  <br>
 
'''Hookup Guide'''<br>
 
Connect the EASY Plug ADXL345 Acceleration module and three LED modules to control board using RJ11 cables.
 
<br>[[File:三轴灯.jpg|500px|frameless|thumb]]<br>
 
 
 
<br>
 
'''Test Code'''<br>
 
Upload the test code below to your board to check the 3-axis acceleration data and the module's tilt information.
 
<br>[[File:ks0397 22.2.png|500px|frameless|thumb]]<br>
 
 
 
<br>
 
'''What You Should See'''<br>
 
<br>[[File:ks0397 22-4.png|500px|frameless|thumb]]<br>
 
Upload success, open the serial monitor, it prints out the value of X,Y,Z axis. Each axis controls a light. If the measured value is greater than 200, LED lights up.
 
<br>[[File:ks0397 22-6.png|500px|frameless|thumb]]<br>
 
<br>[[File:ks0397 22-7.png|500px|frameless|thumb]]<br>
 
<br>[[File:ks0397 22-8.png|500px|frameless|thumb]]<br>
 
 
 
 
 
<br>
 
 
 
==Resources==
 
 
 
* '''Keyestudio Official Website:''' http://www.keyestudio.com/<br>
 
 
 
* '''Keyestudio WIKI Website:''' http://wiki.keyestudio.com/<br>
 
 
 
*'''Download all the information here:''' <br>
 
https://drive.google.com/open?id=1vwi83EYa3dYORHdme2KI57MHu38WbaBA
 
 
 
* '''User Guide Download:''' <br>
 
https://drive.google.com/open?id=1caqF-mPWz0KVEl8TyAAsUt3krOnvZCrO
 
 
 
* '''Mixly Code for All Projects:''' <br>
 
https://drive.google.com/open?id=1lTg8q_mYh1ebc8TV766oea4F_RLP16_P
 
 
 
* '''Download the KS_EasyPulg Library:''' <br>
 
https://drive.google.com/open?id=1-DB-jrtbR3HbdRIohXbN-UK0nm5MwjxR
 
 
 
* '''Arduino Software:''' <br>
 
https://www.arduino.cc/en/Main/OldSoftwareReleases#1.5.x
 
 
 
*'''Download the Mixly software WIN:''' <br>
 
https://drive.google.com/open?id=1CtP1bvZB-o4M5SfvIOOwFz-488gWsFTJ
 
 
 
*'''Download the Mixly software MAC:''' <br>
 
https://drive.google.com/open?id=1S0N_q73Dcyp85DjnbYm6MocZm3penOqU
 
 
 
<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>
 
 
<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]
+
==Buy From==
 +
*[https://www.keyestudio.com/2019-new-keyestudio-easy-plug-super-starter-kit-for-arduino-stem-edu-p0523-p0523.html  Official Website ]
  
<br>
+
*[https://www.amazon.com/dp/B07Q8FQ9R7  Available on amazon]
  
==Customer Service==
+
* [https://keyestudio.aliexpress.com/store/new-arrivals/1452162.html?spm=2114.12010612.0.0.a94f484ewotBOX&tracelog=newarrivals_tab  Get one set from aliexpress ]
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 '''keyestudio@126.com''' <br>
 
Thank you in advance.<br>
 

Latest revision as of 01:31, 11 October 2021

Keyestudio Super Starter Kit for Arduino STEM EDU

Contents

Kit Description

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


Kit List

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


800px

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.

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.

Keyestudio EASY plug LED Module

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.
If it doesn’t, make sure you have assembled the circuit correctly and verified and uploaded the code to your board.
thumb

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

thumb
Thank you! Enjoy the following programming.


Example 3: LED Breath

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

thumb

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: Line Tracking

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

Component Required:

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


Component Introduction:

Keyestudio EASY plug Line Tracking Sensor

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

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


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


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

thumb

thumb



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

Project 5: Relay

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

Component Required:

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


Component Introduction:

Keyestudio EASY plug Single Relay Module

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

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


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

Upload the Code
Below is an example code.

thumb


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

thumb


Project 6: Crash

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

Component Required:

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

Component Introduction:

Keyestudio EASY plug Crash Sensor

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

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


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


Upload the Code
Below is an example code.
thumb

thumb

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

thumb

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


Extension Experiment:

Switch Controlling Relay

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

Upload the Code
Below is an example code.
thumb


What You Should See

thumb
If crash the limit switch, the LED on the relay module is turned on.
thumb


Troubleshooting:

  • Program Not Uploading?

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


Project 7: I Feel Pressure

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

Component Required:

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


Component Introduction:

EASY plug Thin-film Pressure Sensor

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

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

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


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


Upload the Code

thumb


What You Should See

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

thumb



Extension Experiment


Pressure Controlling LED

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

Upload the Code
Below is an example code.
thumb


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

thumb



Project 8: Magnetic Field

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


Component Required:

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


Component Introduction:

Keyestudio EASY plug Reed Switch Module

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

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


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


Upload the Code
Below is an example code.
thumb


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

thumb


Project 9: 4-digit LED display

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


Component Required:

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


Component Introduction

Keyestudio EASY plug 4-Digit LED Display

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

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


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


Upload the Code
Below is an example code.
thumb

thumb


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

thumb


Troubleshooting:

  • Compiling Fails ?

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

thumb

thumb

thumb


  • Program Not Uploading?

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

thumb


Extension Experiment 1


Time Counting


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


Test Code
Below is an example code.
thumb


What You Should See

thumb

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

Extension Experiment 2


Counting And Reset

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

Test Code
Below is an example code.
thumb

thumb

thumb


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



Project 10: Photo Interrupter

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


Component Required:

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


Component Introduction:

Keyestudio EASY plug Photo Interrupter Module

This is a high performance EASY Plug photo interrupter module.
It integrates a photo-interrupter, which belongs to an optical switch of a photo-interrupting photoelectric switch.

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

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


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

Upload the Code
Below is an example code.
thumb


What You Should See
Done uploading the code, powered on, if pick up a piece of paper to cover the light on the groove part of module, you should see the LED is turned on. If no interruption, the LED is off.

thumb

thumb



Extension Experiment

Adding 4-digit LED Display

Hookup Guide
Connect the EASY Plug crash sensor, 4-digit LED display and LED module to control board using RJ11 cables.

thumb


Upload the Code
Below is an example code.

thumb

thumb


What You Should See

thumb
Done uploading the code, if pick up a piece of paper to cover the light on the groove part, the LED is turned on. If no interruption, the LED is off.
thumb
You should be able to see the number of covering the light is showed on the 4-digit LED display, or on the monitor.
thumb


Project 11: Hall Magnetic Detection

Overview
What's the best way to detect the magnet? Use another magnet. But it's not sensitive enough. You have to feel it by yourself.
Here you can try to use a hall sensor. It has the characteristics of high sensitivity, fast response, good temperature performance and high reliability.
Component Required:

  • EASY plug control board*1
  • EASY plug Hall Magnetic Sensor*1
  • EASY plug LED Module *1
  • EASY plug 4-digit LED Display Module *1
  • RJ11 cable*1
  • USB cable*1


Component Introduction:

Keyestudio EASY plug Hall Magnetic Sensor

The Hall sensor is based on Hall Effect.
It can detect whether there is a magnetic object nearby or not. And it correctly tells you through digital output.
This sensor uses the SFE Reed Switch - Magnetic Field Sensor. It can sense the magnetic materials within a detection range up to 75px.
The detection range and the strength of magnetic field are proportional.
It is useful for non-contact/waterproof type switches, position sensors, rotary/shaft encoders.

  • Sensing magnetic materials
  • Detection range: up to 75px
  • Output: Digital ON/OFF
  • Detection range and magnetic field strength are proportional


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


Upload the Code
Below is an example code.
thumb


What You Should See

thumb
When magnetic beads are approaching to the sensor, the LED will be turned on. Otherwise, the LED is off.
thumb

Little Knowledge:
If you want to change another way, that is, once magnetic field is detected by sensor, LED is turned off; if no detecting magnetic field, LED is on.
Just need to change the LED state ON or OFF in the code, shown below.

thumb


Extension Experiment

Adding 4-digit LED Display

Hookup Guide
Connect the EASY Plug hall sensor, 4-digit LED display and red LED module to control board using RJ11 cables.
thumb


Upload the Code
Below is an example code.
thumb

thumb

What You Should See
When magnetic beads are approaching to the sensor, the LED will be turned on. Otherwise, the LED is off.
How many times the magnet approaches to the sensor? You should be able to see the result showed on the 4-digit LED display or serial monitor.

thumb

thumb



Project 12: Analog Temperature

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


Component Required

  • EASY plug control board*1
  • EASY plug LM35 Temperature Sensor *1
  • EASY plug LED module *1
  • EASY plug 4-digit LED Display Module*1
  • RJ11 cable*1
  • USB cable*1


Component Introduction

Keyestudio EASY plug LM35 Temperature Sensor

It is based on semiconductor LM35 temperature sensor. A temperature sensor is exactly what it sounds like - a sensor used to measure ambient temperature.
It is effective in the range between 0 degree Celsius and 100 degree Celsius. Sensitivity is 10mV per degree Celsius. The output voltage is proportional to the temperature.

  • Power supply: 5V
  • Sensitivity: 10mV per degree Celsius
  • Function range: 0℃ to 100℃


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


Upload the Code
Below is an example code.
thumb


What You Should See

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


Extension Experiment 1


Temperature Controlled Light

Complete the above experiment, you can get the analog temp. value. Want to try some different experiments.
For instance, when the temperature reaches the setting value, turn on an LED. Let’s get started right now!

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

Example Code
Below is an example code.
thumb


What You Should See
Done uploading the code, when the temperature detected by LM35 sensor is greater than 19℃, external LED will be turned on.
thumb


Little Knowledge:
As we all known, different regions might exists different climate. So if the setting temp. value is too low or too high, cannot turn on the LED, you can change the value in the code shown below.

thumb



Extension Experiment 2

Adding 4-digit LED Display

Next, how about adding a 4-digit LED display to show the temperature value. Let’s get started right now!


Hookup Guide
Connect the EASY Plug LM35 sensor and 4-digit LED module to control board using RJ11 cables.
thumb


Example Code
Below is an example code.

thumb


What You Should See

thumb

Upload success, you should be able to see the temperature value is showed on the 4-digit LED display.
thumb


Project 13: Tilt Switch

Overview
This lesson we are going to test the tilt sensor. Simply connect to EASY Plug control board to make amazing interactive projects.


Component Required:

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


Component Introduction:

Keyestudio EASY plug Tilt Sensor Module

The tilt-switch twig is the equivalent of a button, and is used as a digital input. Inside the tilt switch is a ball that make contact with the pins when the case is upright. Tilt the case over and the balls don't touch, thus not making a connection. When the switch is level it is open, and when tilted, the switch closes.
It can be used for orientation detection, alarm device or others.
Here is the principle of tilt sensor to illustrate how it works:

thumb

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


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

Upload the Code

Below is an example code.
thumb


What You Should See
Done uploading the code, if tilt the sensor, you should see the led state ON or OFF.
thumb

thumb

thumb


Extension Experiment

Controlling Two Lights
Next, how to use tilt sensor to control two lights on and off. Let’s get started right now!

Hookup Guide
Connect the EASY Plug tilt sensor and two LED modules to control board using an RJ11 cable.
thumb

Upload the Code
Below is an example code.

thumb


What You Should See

thumb

Upload success, if tilt the sensor to one side, you should see one led is turned on; if tilt toward another side, another led is turn on.
thumb

thumb


Project 14: LCD Display

Overview
In this project, you will learn how to use an LCD module. An LCD, or liquid crystal display, is a simple screen that can display commands, bits of information, or readings from your sensor - all depending on how you program your board.


Component Required

  • EASY plug control board*1
  • EASY plug 1602 LCD Module *1
  • EASY plug Tilt sensor *1
  • EASY plug LED Module *2
  • RJ11 cable*1
  • USB cable*1


Component Introduction

Keyestudio EASY plug 1602 LCD Module

This is a basic 16 character by 2 line LCD display with white text on blue background.
It comes with EASY Plug connector, you can use one line for simple connection.

  • Compatible with Arduino LiquidCrystal Library
  • White text on blue background
  • 16 characters wide, 2 rows
  • I2C Address: 0x27
  • Back Light: Blue
  • Text Color: White
  • Supply Voltage: 5V
  • Adjusting contrast by a potentiometer


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


Upload the Code
Below is an example code.

thumb


What You Should See

thumb

Initially, you should see the words “hello, word!” and “keyestudio!” pop up on your LCD.
Remember you can adjust the contrast using the potentiometer on the module back if you can’t make out the words clearly.

thumb


Little Knowledge:

  • If you want to change the characters showed on the LCD screen, you can modify it in the code shown below.


thumb

  • Remember you can adjust the contrast by rotating a blue potentiometer on the LCD back if you can’t make out the words clearly.


thumb


Extension Experiment


Tilt Controlled Counting
Next, let’s get started with a little bit more complicated experiment.
For instance, use a tilt sensor to control the 1602 LCD show the counting. Let’s get started right now!

Hookup Guide
Connect the EASY Plug LCD module, two LED modules and a tilt sensor to control board using RJ11 cables.
thumb

Test Code
Below is an example code.
thumb

What You Should See
Done uploading the code, if tilt the sensor, the red LED is turned on, and you should see the number showed on the first line of 1602 LCD will plus 1 per second, and ++ is displayed on the second line.

thumb

If tilt the sensor to another side, the white LED is turned on, and you should see the number showed on the first line of 1602 LCD will subtract 1, and -- is displayed on the second line.

thumb


Little Knowledge:

  • Remember you can adjust the contrast by rotating a blue potentiometer on the LCD back if you can’t make out the words clearly.


thumb

  • But if you want to show other characters, you can also change it in the code shown below.


thumb



Project 15: Sound

Overview
When we walk through the corridor to make a sound, the corridor light will automatically light up, after that, quiet down, the lights are off. Why? Actually inside the lighting circuit, it has installed a sound sensor. When detects the sound, light is turned on, or else LED off.
In this lesson, we will connect a sound sensor to EASY Plug control board, detecting the outside sound and printing out the analog value.

Component Required

  • EASY plug control board*1
  • EASY plug Analog Sound Sensor *1
  • EASY plug 1602 LCD Module *1
  • RJ11 cable*1
  • USB cable*1
Keyestudio EASY plug Analog Sound Sensor

Component Introduction
It is typically used in detecting the loudness in ambient environment. You can use it to make interactive circuits such as a voice-operated switch.
The sound sensitivity can be adjusted by the potentiometer.
The sensor comes with a fixed hole, easy for fixation on other devices.

  • Sensor type: Analog
  • Supply Voltage: 3.3V to 5V
  • Operating current:<10mA
  • Output signal:analog signal


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


Upload the Code
Below is an example code.
thumb

What You Should See
After uploading the code, open the serial monitor and set the baud rate to 9600, you should see the analog value is showed on the monitor.
thumb

thumb

Extension Experiment

Adding LCD Display

Connect It Up
Connect the EASY Plug sound sensor and LCD module to control board using RJ11 cables.
thumb


Upload the Code
Below is an example code.
thumb

What You Should See

thumb
Upload the code successfully, when the sensor detects the outside sound, the LCD screen will show the sound volume, and its unit is decibel (dB).
thumb


Little Knowledge:

  • Remember you can adjust the contrast by rotating a blue potentiometer on the LCD back if you can’t make out the words clearly.


thumb


Project 16: It Rains


Overview
This experiment we are going to detect the water drop using keyestudio EASY Plug steam sensor. It is an analog sensor that can be used to make simple rain detectors and level switches.


Component Required

  • EASY plug control board*1
  • EASY plug Steam Sensor *1
  • EASY plug 1602 LCD Module *1
  • RJ11 cable*1
  • USB cable*1


Keyestudio EASY plug Steam Sensor

Component Introduction
Vapor Sensor is an analog sensor and can make a simple rainwater detector and liquid level switch. When humidity on the surface of the sensor goes up, the output voltage will increase.
Warning: The connector is not waterproof, please be careful not to put the connector directly in water.
The module can be connected to the analog input interface with only one line, which is very easy and convenient.

  • Working Voltage: 5V
  • Working Current: <20mA
  • Working Temperature: -10℃~+70℃
  • Interface Type: Analog Signal Output


Connect It Up
Connect the EASY Plug Steam Sensor to control board using an RJ11 cable.
thumb

Upload the Code
Below is an example code.
thumb


What You Should See
When detect the different degree of humidity, the sensor outputs different value. If the sensor’s sensing area detects a water drop, the analog value will be displayed on monitor window.
thumb

thumb


Extension Experiment


Adding LCD Display

Hookup Guide
Connect the EASY Plug steam sensor and LCD module to control board using RJ11 cables.
thumb


Test Code
Below is an example code.
thumb


What You Should See

thumb
Upload the code successfully, if the sensor detects a drop of water, the data will be showed on the LCD screen.
thumb


Little Knowledge:

  • Remember you can adjust the contrast by rotating a blue potentiometer on the LCD back if you can’t make out the words clearly.


thumb


Project 17: Alcohol in the Air

Overview
In this project, you will learn how to use the alcohol sensor and control board to detect the alcohol content in the air.

Component Required

  • EASY plug control board*1
  • EASY plug Alcohol Sensor *1
  • EASY plug 1602 LCD Module *1
  • RJ11 cable*1
  • USB cable*1


Component Introduction

Keyestudio EASY plug Analog Alcohol Sensor

This analog gas sensor - MQ3 is suitable for detecting alcohol. It can be used in a Breath analyzer. Also it has high sensitivity to alcohol and low sensitivity to Benzine.
The sensitivity can be adjusted by a blue potentiometer on the sensor.

  • Power supply: 5V
  • Sensor type: Digital and Analog
  • Quick response and High sensitivity
  • Simple drive circuit
  • Stable and long service life


Connect It Up
Connect the EASY Plug analog alcohol sensor 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. If the sensor detects the alcohol in the air, you should see the value change.
thumb

thumb

Extension Experiment


Adding LCD Display

Hookup Guide
Connect the EASY Plug alcohol sensor and LCD module to control board using RJ11 cables.

thumb


Test Code
Below is an example code.
thumb


What You Should See

thumb

Upload success, you should be able to see the alcohol value is showed on the LCD screen.
thumb
If you can’t see the data clearly, you should rotate the potentiometer on the back of LCD display to adjust the backlight.
thumb



Project 18: Water Level

Overview
This lesson we are going to detect the water level using keyestudio water level sensor, showing you the value on the monitor or LCD screen.

Component Required

  • EASY plug control board*1
  • EASY plug Water Level Sensor *1
  • EASY plug 1602 LCD Module *1
  • RJ11 cable*1
  • USB cable*1


Component Introduction

Keyestudio EASY plug Water Sensor

This sensor is easy-to-use, portable and particularly designed to identify and detect water level and water drop.
It can measure the volume of water drop and water quantity through an array of traces of exposed parallel line.
This sensor is small and equipped with the following features:
i) smooth conversion between water quantity and analog quantity;
ii) strong flexibility, outputting analog value;
iii) low power consumption and high sensitivity;
iv) directly connected to microprocessor or other logic circuits, suitable for a variety of development boards and controllers such as Arduino controller, STC single-chip microcomputer, AVR single-chip microcomputer, etc.


Specifications

  • Operating voltage: DC5V
  • Operating current: <20mA
  • Sensor type: Analog
  • Detection area: 40mm x16mm
  • Production process: FR4 double-side tinned
  • Operating temperature: 10%~90% without condensation


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


Upload the Code
Below is an example code.
thumb


What You Should See

thumb
Hook it up and upload well the code, you will see the led light on the water sensor light up, then open the serial monitor, you will see the analog value.
When place the sensing area of sensor into the water, you can see the data change. The deeper the sensor’s sensing area into water, the greater the value.
thumb

thumb


Extension Experiment

Adding LCD Display

Hookup Guide
Connect the EASY Plug water level sensor and LED module to control board using an RJ11 cable.

thumb


Test Code
Below is an example code.
thumb


What You Should See

thumb
Upload success, you should be able to see the analog value is showed on the LCD screen.
thumb


Little Knowledge:

  • Remember you can adjust the contrast by rotating a blue potentiometer on the LCD back if you can’t make out the words clearly.


thumb


Project 19: Potentiometer

Overview
In this circuit you’ll work with a potentiometer sensor. You will learn how to simply test this potentiometer sensor to get the analog value.

Component Required

  • EASY plug control board*1
  • EASY plug Potentiometer Sensor *1
  • EASY plug 1602 LCD Module *1
  • EASY plug LED Module *1
  • RJ11 cable*1
  • USB cable*1


Component Introduction

Keyestudio EASY plug Analog Rotation Sensor

The sensor is based on a potentiometer. A potentiometer is also known as a variable resistor. It is a perfect demonstration of a variable voltage divider circuit. Its voltage can be subdivided into 1023, easy to be connected to Arduino with our sensor shield.
Combined with other sensors, you are able to make interesting projects by reading the analog value from the IO port.

  • Interface: Easy plug
  • Supply Voltage: 3.3V to 5V
  • Sensor type: Analog


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


Upload the Code
Below is an example code.
thumb


What You Should See
After uploading the code, open the serial monitor and set the baud rate to 9600, you should see the analog value is showed on the monitor.
thumb
If rotate the potentiometer, the printed analog value will change within the range of 0-1023.
thumb


Extension Experiment

Controlling Light Brightness

Complete the above experiment, want to try a different experiment?
Next, you will learn how to display the potentiometer value on the 1602 LCD screen and to control the brightness of LED using a potentiometer sensor.
Let’s get started right now!


Hookup Guide
Connect the EASY Plug potentiometer sensor, a red LED module and 1602 LCD module to control board using RJ11 cables.
thumb

Test Code
Below is an example code.

thumb

What You Should See
After uploading the code, rotate the potentiometer knob, you can see the converted value by potentiometer within 0~255 on the 1602 LCD screen, controlling the brightness of LED module.
thumb


Little Knowledge:

  • Remember you can adjust the contrast by rotating a blue potentiometer on the LCD back if you can’t make out the words clearly.


thumb


Project 20: Temperature and Humidity

Overview
How to test the temperature and humidity in the current environment? Use a DHT11 sensor. Simply connect to the EASY Plug control board.


Component Required

  • EASY plug control board*1
  • EASY plug DHT11 Sensor *1
  • EASY plug 1602 LCD module *1
  • RJ11 cable*1
  • USB cable*1


Component Introduction

Keyestudio EASY plug DHT11 Temperature and Humidity Sensor

The DHT11 is a basic, ultra low-cost digital temperature and humidity sensor.
It uses a capacitive humidity sensor and a thermistor to measure the surrounding air, and provides a pre-calibrated digital signal output.
This DHT11 sensor has fast response, anti-interference ability, excellent reliability and long-term stability.

  • Supply Voltage: 5V
  • Relative Humidity and temperature measurement
  • Good for 20-90% humidity readings with 5% accuracy
  • Good for 0-50°C temperature readings ±2°C accuracy
  • Interface: Digital
  • Low Cost


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


Upload the Code
Below is an example code.
thumb


What You Should See
Open the Serial monitor, you should be able to see the temperature and humidity data.

thumb

Little Knowledge:

  • If the data is scrolling very fast, you can’t make out the data clearly, so you can modify the Delay time in the code to check it easily.


thumb


Extension Experiment


Make a Hygrothermograph

Hookup Guide
Connect the EASY Plug DHT11 sensor and 1602 LCD module to control board using RJ11 cables.
thumb


Test Code
Below is an example code.
thumb


What You Should See

thumb

Upload success, you should be able to see the temperature and humidity data are showed on the LCD screen.
thumb


Project 21: Matrix Display

Overview
This lesson you will learn how to use an 8x8 LED matrix to show different images.

Component Required

  • EASY plug control board*1
  • EASY plug I2C 8x8 LED Matrix *1
  • EASY plug button module*1
  • RJ11 cable*1
  • USB cable*1


Component Introduction

thumb

What's better than a single LED? Lots of LEDs! A fun way to make a small display is to use an 8x8 matrix.
This module uses HT16K33 chip to drive an 8x8 dot matrix. Just need to use the I2C communication port of microcontroller to control the dot matrix, which can save more port resources of microcontroller.
The four pin of this module is integrated into a crystal plug. All you need to do is connect the module to control board for communication using an RJ11 cable.

  • Interface: Easy plug
  • Supply voltage: 4.5V-5.5V


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


Upload the Code
Below is an example code.
thumb


What You Should See
Upload the code successfully, it will light up a dot light on the matrix.
thumb


Extension Experiment 1


Showing 0~5
You can upload the code below to show the number 0~5.
thumb

thumb

thumb


What You Should See
Upload the code successfully, the matrix will show the number from 0 to 5.
thumb

Extension Experiment 2


Button Controlled Heart

Hookup Guide
Connect the EASY Plug 8x8 LED Matrix module and button module to control board using RJ11 cables.
thumb


Test Code
Below is an example code.

thumb



What You Should See

thumb

Upload the code successfully, press the button, you can control the matrix show a big heart image or a small one. It seems like a beating heart.
thumb



Project 22: Acceleration

Overview
This lesson you will learn about how to use a Triple Axis Acceleration module ADXL345 for tilt sensing.


Component Required

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


Component Introduction

Keyestudio EASY plug ADXL345 Acceleration Module

The ADXL345 module is a low power, 3-axis MEMS accelerometer with high resolution (13-bit) and measurement at up to ±16g (gravitational force).
Digital output data is formatted as 16-bit twos complement, and is accessible through either a SPI or I2C digital interface.
The ADXL345 is well suited to measures the static acceleration of gravity in tilt-sensing applications, as well as dynamic acceleration resulting from motion or shock.

  • Working Voltage: 2.0-3.6V
  • Ultra Low Power @2.5v: 40uA /working mode; 0.1uA / standby mode
  • Communication interface: I2C / SPI
  • Tap/Double Tap Detection ; Free-Fall Detection


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


Upload the Code
Upload the code to your board to check the 3-axis acceleration data and the module's tilt information.
thumb


What You Should See
Open the Serial monitor to see the 3-axis acceleration data. See changes as you sway the Accelerometer.
thumb


Little Knowledge:
If you think the monitor’s result is too fast to see the data clearly, you can drag a Delay block to add into the source code. Shown below.
After that, upload the code again and open the monitor, you should be able to see the display data clearly.

thumb



Extension Experiment


Controlling Three LEDs

Hookup Guide
Connect the EASY Plug ADXL345 Acceleration module and three LED modules to control board using RJ11 cables.
thumb


Test Code
Upload the test code below to your board to check the 3-axis acceleration data and the module's tilt information.
thumb


What You Should See

thumb

Upload success, open the serial monitor, it prints out the value of X,Y,Z axis. Each axis controls a light. If the measured value is greater than 200, LED lights up.
thumb

thumb

thumb



Resources


  • KS0397 Downlaod Link:
https://fs.keyestudio.com/KS0397



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