Getting Started with Mixly: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
 
(83 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
[[File:Mixly-icon.png|900px|right|thumb| Mixly ]]


== Introduction for Mixly ==
== Introduction for Mixly ==
Line 7: Line 7:


'''The figure below shows the functional comparison between Ardublock and Mixly.'''<br>
'''The figure below shows the functional comparison between Ardublock and Mixly.'''<br>
<br>[[Image:Mixly- table.png|800px|frameless]]<br>
[[Image:Mixly- table.png|800px|frameless]]<br>
It can be said that Mixly is the most versatile and smoothest Arduino graphical programming software, which can replace the Arduino programming tool IDE.
It can be said that Mixly is the most versatile and smoothest Arduino graphical programming software, which can replace the Arduino programming tool IDE.


==Design Concept and User Groups==
==Design Concept and User Groups==
=== Design Concept===
=== Design Concept===
'''(1) Usability''' <br>
'''(1) Usability''' <br>
Line 34: Line 36:
It also allows users directly use Mixly's graphical programming function to generate common modules (such as LED digital display, buzzer broadcast, etc. Users are able to make this part of the module only using Mixly). <br>
It also allows users directly use Mixly's graphical programming function to generate common modules (such as LED digital display, buzzer broadcast, etc. Users are able to make this part of the module only using Mixly). <br>
Both of the two kinds of modules mentioned above can be imported into the Mixly system through the "Import" function, thereby realizing the user's own value in the popularity of Mixly software.<br>
Both of the two kinds of modules mentioned above can be imported into the Mixly system through the "Import" function, thereby realizing the user's own value in the popularity of Mixly software.<br>


===User Groups===
===User Groups===
From the above design concept, it can be seen that Mixly is suitable for primary and secondary school students to cultivate programming thinking. It is also available for quick programming when creating a work. Of course, it is good for those lovely friends who don't want to learn text programming, but want to do some small works with intelligent control.
From the above design concept, it can be seen that Mixly is suitable for primary and secondary school students to cultivate programming thinking. It is also available for quick programming when creating a work. Of course, it is good for those lovely friends who don't want to learn text programming, but want to do some small works with intelligent control.
   
   
==Interface Functions of Mixly==
<br>
 
==Mixly Interface Functions ==
 
=== System Functions ===
=== System Functions ===
Look at the main interface of Mixly, it includes five parts, that is, Blocks selection, code edit, text code (hidden), system function and message prompt area. Shown below.
Look at the main interface of Mixly, it includes five parts, that is, Blocks selection, code edit, text code (hidden), system function and message prompt area. Shown below.
<br>[[Image:3.1-1.png|800px|frameless]]<br>
<br>[[Image:3.1-1.png|800px|frameless]]<br>


<br>
'''Some common functions:''' <br>
'''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).
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>[[Image:3.1-2.png|800px|frameless]]<br>
<br>


===In/Out Block===
===In/Out Block===
<br>[[Image:3.2-1.png|800px|frameless]]<br>
[[Image:3.2-1.png|800px|frameless]]<br>


{| width="80%" cellspacing="0" border="1"
{| width="80%" cellspacing="0" border="1"
Line 58: Line 66:
|-
|-
| align="center" | 1   
| align="center" | 1   
| align="center" | <br>[[Image:3.2-2.png|500px|frameless]]<br>
| align="center" | <br>[[Image:3.2-2.png|400px|frameless]]<br>
| align="center" | Returns HIGH or LOW voltage
| align="center" | Returns HIGH or LOW voltage
|-
|-


| align="center" | 2   
| align="center" | 2   
| align="center" | <br>[[Image:3.2-3.png|500px|frameless]]<br>
| align="center" | <br>[[Image:3.2-3.png|400px|frameless]]<br>
| align="center" | Write digital value to a specific Port.<br>
| align="center" | Write digital value to a specific Port.<br>
Digital Output: set the HIGH or LOW output for IO pins
Digital Output: set the HIGH or LOW output for IO pins
Line 69: Line 77:


| align="center" | 3  
| align="center" | 3  
| align="center" | <br>[[Image:3.2-4.png|500px|frameless]]<br>
| align="center" | <br>[[Image:3.2-4.png|400px|frameless]]<br>
| align="center" | Returns a digital value of a specific Port.<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
Digital IO Read Pin, generally used to read the HIGH or LOW level detected by Digital sensor
Line 75: Line 83:
   
   
| align="center" | 4  
| align="center" | 4  
| align="center" | <br>[[Image:3.2-5.png|500px|frameless]]<br>
| 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>  
| 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).
Analog Output: set the Analog value output by Analog IO pins (0~255).
Line 81: Line 89:


| align="center" | 5   
| align="center" | 5   
| align="center" | <br>[[Image:3.2-6.png|500px|frameless]]<br>
| align="center" | <br>[[Image:3.2-6.png|400px|frameless]]<br>
| align="center" | Returns value between 0 and 1023 of a specific Port.  <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.  
Analog IO Read Pin, generally used to read the Analog value detected by Analog sensor.  
Line 87: Line 95:


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


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


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


{| width="80%" cellspacing="0" border="1"
{| width="80%" cellspacing="0" border="1"
|-
|-
! align="center" scope="col" | No.
! align="center" scope="col" | No.
! align="center" scope="col" | BLOCK ICON
! align="center" scope="col" | BLOCK ICON
Line 139: Line 148:
|-
|-
| align="center" | 1   
| align="center" | 1   
| align="center" | <br>[[Image:3.3-1.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.3-1.png|600px|frameless]]<br>
| align="center" | Initialization (run only once)
| align="center" | Initialization (run only once)
|-
|-


| align="center" | 2   
| align="center" | 2   
| align="center" | <br>[[Image:3.3-2.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" | End the program, means the program will stop running when use this block.
|-
|-


| align="center" | 3  
| align="center" | 3  
| align="center" | <br>[[Image:3.3-3.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>
| 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.)
(pause the program for the amount of time (in milliseconds) specified as parameter. There are 1000 milliseconds in a second.)
Line 155: Line 164:
   
   
| align="center" | 4  
| align="center" | 4  
| align="center" | <br>[[Image:3.3-4.png|800px|frameless]]<br>
| 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>
| 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.)
You can click the blue gear icon to select the '''else if''' block or '''else''' block.)
Line 161: Line 170:


| align="center" | 5   
| align="center" | 5   
| align="center" | <br>[[Image:3.3-5.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.3-5.png|600px|frameless]]<br>
| align="center" | '''switch''' function. You can click the blue gear icon to select the '''case''' block or '''default''' block. (used to evaluate several programs then execute the corresponding function matched with program.)
| align="center" | '''switch''' function. You can click the blue gear icon to select the '''case''' block or '''default''' block. (used to evaluate several programs then execute the corresponding function matched with program.)
|-
|-


| align="center" | 6  
| align="center" | 6  
| align="center" | <br>[[Image:3.3-6.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" | Equal to [https://www.arduino.cc/reference/en/language/structure/control-structure/for/ '''for''' statement].
|-
|-
   
   
| align="center" | 7  
| align="center" | 7  
| align="center" | <br>[[Image:3.3-7.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.3-7.png|600px|frameless]]<br>
| align="center" | A '''while''' loop statement.  
| align="center" | A '''while''' loop statement.  
|-
|-
   
   
| align="center" | 8   
| align="center" | 8   
| align="center" | <br>[[Image:3.3-8.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.3-8.png|600px|frameless]]<br>
| align="center" | '''break''' function, used to exit from the containing loop.
| align="center" | '''break''' function, used to exit from the containing loop.
|-
|-
   
   
| align="center" | 9   
| align="center" | 9   
| align="center" | <br>[[Image:3.3-9.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.3-9.png|600px|frameless]]<br>
| align="center" | '''millis()''' function, returns the system running time since the program started.
| align="center" | '''millis()''' function, returns the system running time since the program started.
(The unit can be '''ms''' (milliseconds) or '''μs'''(microsecond)).
(The unit can be '''ms''' (milliseconds) or '''μs'''(microsecond)).
Line 187: Line 196:
   
   
| align="center" | 10
| align="center" | 10
| align="center" | <br>[[Image:3.3-10png|800px|frameless]]<br>
| 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" | Timer interrupt function, that is, set a trigger interrupt for the amount of time (in milliseconds) specified as parameter.
|-
|-
   
   
| align="center" | 11
| align="center" | 11
| align="center" | <br>[[Image:3.3-11.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.3-11.png|400px|frameless]]<br>
| align="center" | Timer interrupt start block
| align="center" | Timer interrupt start block
|-
|-
   
   
| align="center" | 12
| align="center" | 12
| align="center" | <br>[[Image:3.3-12.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.3-12.png|400px|frameless]]<br>
| align="center" | Timer interrupt stop block
| align="center" | Timer interrupt stop block
|-
| align="center" | 13
| align="center" | <br>[[Image:000---13.png|400px|frameless]]<br>
| align="center" | Set different simple timer, execute the corresponding program every interval time
|-
| align="center" | 14
| align="center" | <br>[[Image:000---14.png|400px|frameless]]<br>
| align="center" |Register a delayed  function, and put the code to be executed in this function
|-
| align="center" | 15
| align="center" | <br>[[Image:000---15.png|400px|frameless]]<br>
| align="center" | Execute the delayed function, interval time is 1000ms,1 time
|-
| align="center" | 16
| align="center" | <br>[[Image:000---16.png|400px|frameless]]<br>
| align="center" | Allow to input and output the running of pins interrupt
|-
| align="center" | 17
| align="center" | <br>[[Image:000---17.png|400px|frameless]]<br>
| align="center" | Ban to input and output the running of pins interrupt
|-
| align="center" | 18
| align="center" | <br>[[Image:000---18.png|400px|frameless]]<br>
| align="center" | SCoop block is used to execute multithreading tasks,up to 8 tasks
|-
| align="center" | 19
| align="center" | <br>[[Image:000---19.png|400px|frameless]]<br>
| align="center" | Execute multithreading tasks
|-
| align="center" |20
| align="center" | <br>[[Image:000---20.png|400px|frameless]]<br>
| align="center" | Only used for SCoop delay block
|-
|-
|}
|}


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


'''For example'''<br>
<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>


=== Math Block===
=== Math Block===
<br>[[Image:3.4.png|800px|frameless]]<br>
[[Image:3.4.png|900px|frameless]]<br>


{| width="80%" cellspacing="0" border="1"
{| width="80%" cellspacing="0" border="1"
|-
|-
! align="center" scope="col" | No.
! align="center" scope="col" | No.
! align="center" scope="col" | BLOCK ICON
! align="center" scope="col" | BLOCK ICON
Line 218: Line 269:
|-
|-
| align="center" | 1   
| align="center" | 1   
| align="center" | <br>[[Image:3.4-1.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.4-1.png|300px|frameless]]<br>
| align="center" | A number
| align="center" | A number
|-
|-


| align="center" | 2   
| align="center" | 2   
| align="center" | <br>[[Image:3.4-2.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.4-2.png|300px|frameless]]<br>
| align="center" | Click to select the Arithmetic Operators: <br>
| align="center" | Click to select the Arithmetic Operators: <br>
[https://www.arduino.cc/reference/en/language/structure/arithmetic-operators/subtraction/ '''+(addition); -(subtraction)'''];  
[https://www.arduino.cc/reference/en/language/structure/arithmetic-operators/addition/ '''+(addition)'''];  
[https://www.arduino.cc/reference/en/language/structure/arithmetic-operators/multiplication/ '''x (Multiplication); ÷ (division)'''];
[https://www.arduino.cc/reference/en/language/structure/arithmetic-operators/subtraction/ '''-(subtraction)'''];  
[https://www.arduino.cc/reference/en/language/structure/bitwise-operators/bitwisexor/ '''% (remainder); ^ (bitwise xor)''']
[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  
| align="center" | 3  
| align="center" | <br>[[Image:3.4-3.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.4-3.png|300px|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" | 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" | 4  
| align="center" | <br>[[Image:3.4-4.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.4-4.png|200px|frameless]]<br>
| align="center" | Click to select the [https://www.arduino.cc/reference/en/language/functions/trigonometry/sin/ '''sin''']; [https://www.arduino.cc/reference/en/language/functions/trigonometry/cos/ '''cos''']; '''tan; asin; acos; atan; ln; log10; e^; 10^;''' [https://www.arduino.cc/reference/en/language/structure/compound-operators/increment/ '''++ (increment)'''] ;  
| 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)''']
[https://www.arduino.cc/reference/en/language/structure/compound-operators/decrement/ '''-- (decrement)''']
Line 242: Line 294:


| align="center" | 5   
| align="center" | 5   
| align="center" | <br>[[Image:3.4-5.png|800px|frameless]]<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>
| align="center" | Click to select the '''Round; Ceil; Floor; abs; sq; sqrt''' <br>
'''Round:''' Returns the integer part a number using around.<br>
'''Round:''' Returns the integer part a number using around.<br>
Line 253: Line 305:


| align="center" | 6  
| align="center" | 6  
| align="center" | <br>[[Image:3.4-6.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>
| align="center" | If select the '''max''', returns the larger number; <br>
if select the '''min''', returns the smaller number.
if select the '''min''', returns the smaller number.
Line 260: Line 312:
   
   
| align="center" | 7  
| align="center" | 7  
| align="center" | <br>[[Image:3.4-7.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.4-7.png|400px|frameless]]<br>
| align="center" | Initialize the random seed
| align="center" | Initialize the random seed
|-
|-
   
   
| align="center" | 8   
| align="center" | 8   
| align="center" | <br>[[Image:3.4-8.png|800px|frameless]]<br>
| 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" | Return a random integer between the two specified limits, inclusive.
|-
|-
   
   
| align="center" | 9   
| align="center" | 9   
| align="center" | <br>[[Image:3.4-9.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.4-9.png|400px|frameless]]<br>
| align="center" | Constrain a number to be between the specified limits (inclusive).  <br>
| align="center" | Constrain a number to be between the specified limits (inclusive).  <br>
(generally used to constrain an analog value read from sensor)
(generally used to constrain an analog value read from sensor)
Line 276: Line 328:
   
   
| align="center" | 10
| align="center" | 10
| align="center" | <br>[[Image:3.4-10png|800px|frameless]]<br>
| 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>
| 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)).
(For instance, potentiometer-controlled servo, map the range of potentiometer (0, 1023) to the angle of servo (0, 180)).
Line 282: Line 334:
|}
|}


<br>


===Text Block===
===Text Block===
<br>[[Image:3.5.png|800px|frameless]]<br>
[[Image:3.5.png|900px|frameless]]<br>


{| width="80%" cellspacing="0" border="1"
{| width="80%" cellspacing="0" border="1"
Line 350: Line 403:
| align="center" |Returns a decimal value of the first string subtracts  the second string.
| align="center" |Returns a decimal value of the first string subtracts  the second string.
|-
|-
| align="center" | 12
| align="center" | <br>[[Image:111-12.png|800px|frameless]]<br>
| align="center" |obtain the character string from x to y(eg:acquire the character string from 0 to 3)
|-
| align="center" | 13
| align="center" | <br>[[Image:111-13.png|800px|frameless]]<br>
| align="center" |Simplify the decimals in compliance with designated bits(eg:make decimal 6.66 simplify according to designated 2 bits
|-
| align="center" | 14
| align="center" | <br>[[Image:111-14.png|800px|frameless]]<br>
| align="center" |Transfer the all lower-case letters of designated character strings into capital letters or capital ones into lower-case letters
|-
| align="center" | 15
| align="center" | <br>[[Image:111-15.png|800px|frameless]]<br>
| align="center" |Replace the designated characters or character strings(the first character string is original, the second is to be replaced , the third one is character string which replaces.
|-
| align="center" | 11
| align="center" | <br>[[Image:111-16.png|800px|frameless]]<br>
| align="center" |Eliminate the non-visual characters in the character strings
|-
| align="center" | 11
| align="center" | <br>[[Image:111-17.png|800px|frameless]]<br>
| align="center" |Whether the first character string starts or end with the second character string, if it is, return 1; otherwise, return 0.(the first character string needs to be determined, the second one is character string which determines
|-
| align="center" | 11
| align="center" | <br>[[Image:111-18.png|800px|frameless]]<br>
| align="center" |Transfer data type into character strings/ characters/bites/integers/long integers/decimals/words
|-
|}
|}


<br>


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


{| width="80%" cellspacing="0" border="1"
{| width="80%" cellspacing="0" border="1"
Line 364: Line 458:
|-
|-
| align="center" | 1   
| align="center" | 1   
| align="center" | <br>[[Image:3.6-1.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.6-1.png|300px|frameless]]<br>
| align="center" | Create a list with any number of items
| align="center" | Create a list with any number of items
|-
|-
Line 374: Line 468:


| align="center" | 3  
| align="center" | 3  
| align="center" | <br>[[Image:3.6-3.png|800px|frameless]]<br>
| 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" | Creats a list from a text. (int mylist [ ]={0,0,0};)
|-
|-
   
   
| align="center" | 4  
| align="center" | 4  
| align="center" | <br>[[Image:3.6-4.png|800px|frameless]]<br>
| 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" | Returns the value of at the specified position in a list.
|-
|-
Line 388: Line 482:
Set the first item in mylist to another item.
Set the first item in mylist to another item.
|-
|-
| align="center" | 6 
| align="center" | <br>[[Image:22--6.png|500px|frameless]]<br>
| align="center" | Initialize two-dimensional array, select the data type including integers, long integers, decimals, character strings, bites, char and characters
|-
| align="center" | 7 
| align="center" | <br>[[Image:22--7.png|500px|frameless]]<br>
| align="center" | Define value on M row and N column
|-
| align="center" | 8
| align="center" | <br>[[Image:22--8.png|500px|frameless]]<br>
| align="center" | Obtain the content from array on M row and N column
|-
|}
|}


<br>


===Logic Block===
===Logic Block===
<br>[[Image:3.7.png|800px|frameless]]<br>
[[Image:3.7.png|900px|frameless]]<br>


{| width="80%" cellspacing="0" border="1"
{| width="80%" cellspacing="0" border="1"
Line 402: Line 518:
|-
|-
| align="center" | 1   
| align="center" | 1   
| align="center" | <br>[[Image:3.7-1.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.7-1.png|400px|frameless]]<br>
| align="center" | '''logic comparision'''<br>
| align="center" | '''logic comparision'''<br>
'''=:''' Return true if both inputs equal each other.<br>
'''=:''' Return true if both inputs equal each other.<br>
Line 413: Line 529:


| align="center" | 2   
| align="center" | 2   
| align="center" | <br>[[Image:3.7-2.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.7-2.png|400px|frameless]]<br>
| align="center" | '''and:'''Return true if both inputs are true;
| align="center" | '''and:'''Return true if both inputs are true;
'''or:''' Return true if at least one of the inputs is true
'''or:''' Return true if at least one of the inputs is true
Line 419: Line 535:


| align="center" | 3  
| align="center" | 3  
| align="center" | <br>[[Image:3.7-3.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" | Returns true if the input is false. Returns false if the input is true.  
|-
|-
   
   
| align="center" | 4  
| align="center" | 4  
| align="center" | <br>[[Image:3.7-4.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.7-4.png|600px|frameless]]<br>
| align="center" | Returns either true or false.
| align="center" | Returns either true or false.
|-
|-


| align="center" | 5   
| align="center" | 5   
| align="center" | <br>[[Image:3.7-5.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.7-5.png|600px|frameless]]<br>
| align="center" | Returns null
| align="center" | Returns null
|-
|-


| align="center" | 6   
| align="center" | 6   
| align="center" | <br>[[Image:3.7-6.png|800px|frameless]]<br>
| 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.
| align="center" | If the first number is true, the second number is returned, otherwise the third number.
|-
|-
|}
|}
<br>




===Variable Block===
===Variable Block===
<br>[[Image:3.8.png|800px|frameless]]<br>
[[Image:3.8.png|900px|frameless]]<br>


{| width="80%" cellspacing="0" border="1"
{| width="80%" cellspacing="0" border="1"
Line 457: Line 575:


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


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


<br>


===SerialPort Block===
===SerialPort Block===
<br>[[Image:3.9.png|800px|frameless]]<br>
[[Image:3.9.png|900px|frameless]]<br>


{| width="80%" cellspacing="0" border="1"
{| width="80%" cellspacing="0" border="1"
Line 478: Line 599:
|-
|-
| align="center" | 1   
| align="center" | 1   
| align="center" | <br>[[Image:3.9-1.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.9-1.png|600px|frameless]]<br>
| align="center" | Set the serial buad rate to 9600
| align="center" | Set the serial buad rate to 9600
|-
|-


| align="center" | 2   
| align="center" | 2   
| align="center" | <br>[[Image:3.9-2.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.9-2.png|400px|frameless]]<br>
| align="center" | Write the specified number, text or other value.
| align="center" | Write the specified number, text or other value.
|-
|-


| align="center" | 3  
| align="center" | 3  
| align="center" | <br>[[Image:3.9-3.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.9-3.png|400px|frameless]]<br>
| align="center" | Print the specified number, text or other value on monitor.
| align="center" | Print the specified number, text or other value on monitor.
|-
|-
   
   
| align="center" | 4  
| align="center" | 4  
| align="center" | <br>[[Image:3.9-4.png|800px|frameless]]<br>
| 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" | Print the specified number, text or other value on newline of monitor.
|-
|-


| align="center" | 5   
| align="center" | 5   
| align="center" | <br>[[Image:3.9-5.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.9-5.png|600px|frameless]]<br>
| align="center" | Print the specified number in hexademical format on newline of monitor.
| align="center" | Print the specified number in hexademical format on newline of monitor.
|-
|-


| align="center" | 6  
| align="center" | 6  
| align="center" | <br>[[Image:3.9-6.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.9-6.png|600px|frameless]]<br>
| align="center" | If the serial port is available, it returns true, otherwise returns false.<br>
| align="center" | If the serial port is available, it returns true, otherwise returns false.<br>
(generally used in Bluetooth communication)
(generally used in Bluetooth communication)
Line 509: Line 630:
   
   
| align="center" | 7  
| align="center" | 7  
| align="center" | <br>[[Image:3.9-7.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.9-7.png|600px|frameless]]<br>
| align="center" | Returns a string in serial port  
| align="center" | Returns a string in serial port  
|-
|-
   
   
| align="center" | 8   
| align="center" | 8   
| align="center" | <br>[[Image:3.9-8.png|800px|frameless]]<br>
| 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" | A string read from serial port to a string variable, pause until read the specified character.
|-
|-
   
   
| align="center" | 9   
| align="center" | 9   
| align="center" | <br>[[Image:3.9-9.png|800px|frameless]]<br>
| 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" | 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" | 10
| align="center" | <br>[[Image:3.9-10png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.9-10.png|600px|frameless]]<br>
| align="center" | Wait for the output data completed
| align="center" | Wait for the output data completed
|-
|-
   
   
| align="center" | 11
| align="center" | 11
| align="center" | <br>[[Image:3.9-11.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.9-11.png|600px|frameless]]<br>
| align="center" | Set the software serial port <br>
| align="center" | Set the software serial port <br>
(call this function if need to use several serial ports)
(call this function if need to use several serial ports)
Line 535: Line 656:
   
   
| align="center" | 12
| align="center" | 12
| align="center" | <br>[[Image:3.9-12.png|800px|frameless]]<br>
| 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>  
| 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)
(equal to an interrupt function)
|-
|-
|}
|}
<br>


'''For example: serial communication'''<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”.  
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 Serial port -1.PNG|800px|frameless]]<br>
<br>[[Image:3.9-13.png|800px|frameless]]<br>
<br>[[Image:3.9-13.png|800px|frameless]]<br>


<br>


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


{| width="80%" cellspacing="0" border="1"
{| width="80%" cellspacing="0" border="1"
Line 558: Line 682:
|-
|-
| align="center" | 1   
| align="center" | 1   
| align="center" | <br>[[Image:3.10-1.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.10-1.png|500px|frameless]]<br>
| align="center" | Do something when receiving infrared signals.
| align="center" | Do something when receiving infrared signals.
<br>[[Image:3.10-1-1.png|800px|frameless]]<br>
<br>[[Image:3.10-1-1.png|500px|frameless]]<br>
|-
|-


| align="center" | 2   
| align="center" | 2   
| align="center" | <br>[[Image:3.10-2.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.10-2.png|500px|frameless]]<br>
| align="center" | Sends infrared signals of the specified types.<br>
| align="center" | Sends infrared signals of the specified types.<br>
IR transmitter sends the data, here use the libraries, only PIN3 port.  
IR transmitter sends the data, here use the libraries, only PIN3 port.  
Line 585: Line 709:
|}
|}


'''For example''' <br>
 
<br>
'''For example:''' <br>
You need an Arduino Uno board, an IR receiver module and an IR remote control.<br>
You need an Arduino Uno board, an IR receiver module and an IR remote control.<br>
Connect the signal pin of IR receiver to Digital pin 3 of Uno board, then upload the code and open the monitor. If send a signal to an IR receiver module using an IR remote control, you should see the monitor show the corresponding signal data.
Connect the signal pin of IR receiver to Digital pin 3 of Uno board, then upload the code and open the monitor. If send a signal to an IR receiver module using an IR remote control, you should see the monitor show the corresponding signal data.
<br>[[Image:3.10 ir.PNG|900px|frameless]]<br>


<br>


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


{| width="80%" cellspacing="0" border="1"
{| width="80%" cellspacing="0" border="1"
Line 619: Line 748:
|}
|}


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


 
<br>


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


{| width="80%" cellspacing="0" border="1"
{| width="80%" cellspacing="0" border="1"
Line 636: Line 766:
|-
|-
| align="center" | 1   
| align="center" | 1   
| align="center" | <br>[[Image:3.10-1.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.12-1.png|800px|frameless]]<br>
| align="center" | Sets the servo pin;<br>
| align="center" | Sets the servo pin;<br>
Moves between 0-180 degree;<br>
Moves between 0-180 degree;<br>
Line 659: Line 789:
|}
|}


 
<br>
'''For example''' <br>
'''For example:''' <br>
Connect the signal end of servo to Digital 0 of Uno, then upload the code below, servo will rotate 90 degrees. <br>
Connect the signal end of servo to Digital 0 of Uno, then upload the code below, servo will rotate 90 degrees. <br>
'''Note:''' Delay 100ms is the time required for servo to move.
'''Note:''' Delay 100ms is the time required for servo to move.
<br>[[Image:3.12-5.png|800px|frameless]]<br>
<br>[[Image:3.12-5.png|800px|frameless]]<br>
<br>




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


{| width="80%" cellspacing="0" border="1"
{| width="80%" cellspacing="0" border="1"
Line 692: Line 824:
   
   
| align="center" | 4  
| align="center" | 4  
| align="center" | <br>[[Image:3.13-4.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.13-4.png|500px|frameless]]<br>
| align="center" | Clear the LCD screen
| align="center" | Clear the LCD screen
|-
|-


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


| align="center" | 6  
| align="center" | 6  
| align="center" | <br>[[Image:3.9-6.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.13-6.png|800px|frameless]]<br>
| align="center" | Set the RGB light pin, light number and brightness
| align="center" | Set the RGB light pin, light number and brightness
|-
|-
   
   
| align="center" | 7  
| align="center" | 7  
| align="center" | <br>[[Image:3.9-7.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.13-7.png|800px|frameless]]<br>
| align="center" | Set the control pin, light number and color. (click to select the color)  
| align="center" | Set the control pin, light number and color. (click to select the color)  
|-
|-
   
   
| align="center" | 8   
| align="center" | 8   
| align="center" | <br>[[Image:3.9-8.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.13-8.png|800px|frameless]]<br>
| align="center" | Clear the data, namely turn off digital display
| align="center" | Clear the data, namely turn off digital display
|-
|-
   
   
| align="center" | 9   
| align="center" | 9   
| align="center" | <br>[[Image:3.9-9.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.13-9.png|800px|frameless]]<br>
| align="center" | Four-digit display, displaying abcd.
| align="center" | Four-digit display, displaying abcd.
|-
|-
   
   
| align="center" | 10
| align="center" | 10
| align="center" | <br>[[Image:3.9-10png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.13-10.png|800px|frameless]]<br>
| align="center" | Turn on or off the digitdisplay <br>
| align="center" | Turn on or off the digitdisplay <br>
(here turn on the first digitdisplay)
(here turn on the first digitdisplay)
Line 728: Line 860:
|}
|}


<br>
'''For example: serial communication'''<br>
'''For example: serial communication'''<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>
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>
<br>[[Image:3.13 LCD16002.PNG|800px|frameless]]<br>
<br>[[Image:3.13 LCD16002.PNG|800px|frameless]]<br>


<br>


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


{| width="80%" cellspacing="0" border="1"
{| width="80%" cellspacing="0" border="1"
Line 744: Line 878:
|-
|-
| align="center" | 1   
| align="center" | 1   
| align="center" | <br>[[Image:3.11-1.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.14-1.png|500px|frameless]]<br>
| align="center" | Creates a function with no output.<br>
| align="center" | Creates a function with no output.<br>
Click the blue icon to set the procedure parameter.(no return value)  
Click the blue icon to set the procedure parameter.(no return value)  
Line 750: Line 884:


| align="center" | 2   
| align="center" | 2   
| align="center" | <br>[[Image:3.11-2.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.14-2.png|500px|frameless]]<br>
| align="center" | Creates a function with an output.<br>
| align="center" | Creates a function with an output.<br>
Click the blue icon to set the procedure parameter.<br>
Click the blue icon to set the procedure parameter.<br>
Line 757: Line 891:


| align="center" | 3  
| align="center" | 3  
| align="center" | <br>[[Image:3.11-3.png|800px|frameless]]<br>
| align="center" | <br>[[Image:3.14-3.png|500px|frameless]]<br>
| align="center" | If a value is true, then return a second value.
|-
 
| align="center" | 4
| align="center" | <br>[[Image:4544.png|500px|frameless]]<br>
| align="center" | If a value is true, then return a second value.
| align="center" | If a value is true, then return a second value.
|-
|-
|}
|}


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


==Resources==
<br>
Download the Mixly software: <br>
https://drive.google.com/open?id=1oQxF-AZ0Aw6OQhu_8NSvwo3L2OP0Z6cU


Download the Example Code: <br>
==More Resources==
https://drive.google.com/open?id=1Fjd3SHHkg_-0IdB6GPX2uuTv3aRGMCSd
*'''Download the Mixly:''' <br>
https://fs.keyestudio.com/Mixly

Latest revision as of 17:51, 21 October 2020

Mixly

Introduction for 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.

The figure below shows the functional comparison between Ardublock and Mixly.
Mixly- table.png
It can be said that Mixly is the most versatile and smoothest Arduino graphical programming software, which can replace the Arduino programming tool IDE.


Design Concept and User Groups

Design Concept

(1) Usability
Mixly is designed to be completely green. Currently Mixly supports win, ubuntu, mac. Windows users can download the Mixly package directly from the Internet, and unzip it to run on Windows XP and above (download link is attached below).

(2) Simplicity
Mixly uses the Blockly graphical programming engine to replace complex text manipulation with graphical building blocks, providing a good foundation for beginners to get started quickly.
 Use the different color icons to represent different types of functional blocks, very convenient for users to classify.
 Provide default options in the composite function block to effectively reduce the number of user drags.
 Integrate all the features of the software in the same interface.
 Provide the reference tutorial and code examples.

(3) Functionality
It has versatile functions. Mixly can almost implement all the functions that Arduino IDE has. Support all official development boards of arduino.

(4) Continuity
The goal of the graphical programming system is definitely not to replace the original text programming method, but to better understand the programming principles and program thinking through graphical programming, and lay the foundation for future text programming.
It is also the design philosophy for Mixly. More continuous content has been added to the design of the software to protect the user's learning outcomes. To be specific, it includes the introduction of variable types, the consistency of text programming as much as possible in the design of the module, and the support of both graphical and text programming.

(5) Ecological
The most important design concept of Mixly is its ecological feature, which can distinguish it from other Arduino graphical programming.
In order to achieve sustainable development, Mixly is designed to allow manufacturers to develop their own unique modules (currently supports DfRobot, StartLab, MakeBlock, Sense, Seeed, Lubot. But users require JavaScript programming foundation to make this part of the module).
It also allows users directly use Mixly's graphical programming function to generate common modules (such as LED digital display, buzzer broadcast, etc. Users are able to make this part of the module only using Mixly).
Both of the two kinds of modules mentioned above can be imported into the Mixly system through the "Import" function, thereby realizing the user's own value in the popularity of Mixly software.


User Groups

From the above design concept, it can be seen that Mixly is suitable for primary and secondary school students to cultivate programming thinking. It is also available for quick programming when creating a work. Of course, it is good for those lovely friends who don't want to learn text programming, but want to do some small works with intelligent control.


Mixly Interface Functions

System Functions

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


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

In/Out Block

3.2-1.png

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

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

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

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

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

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

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

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

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

Turn off the given interrupt function.

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

Generally used for controlling the 74HC595 CHIP.

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


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

Control Block

Control.PNG

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

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

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

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

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

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

10
3.3-10.png
Timer interrupt function, that is, set a trigger interrupt for the amount of time (in milliseconds) specified as parameter.
11
3.3-11.png
Timer interrupt start block
12
3.3-12.png
Timer interrupt stop block
13
000---13.png
Set different simple timer, execute the corresponding program every interval time
14
000---14.png
Register a delayed function, and put the code to be executed in this function
15
000---15.png
Execute the delayed function, interval time is 1000ms,1 time
16
000---16.png
Allow to input and output the running of pins interrupt
17
000---17.png
Ban to input and output the running of pins interrupt
18
000---18.png
SCoop block is used to execute multithreading tasks,up to 8 tasks
19
000---19.png
Execute multithreading tasks
20
000---20.png
Only used for SCoop delay block


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


Math Block

3.4.png

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

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

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

-- (decrement)

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

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

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

if select the min, returns the smaller number.

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

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

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

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


Text Block

3.5.png

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

( Here Hello join Mixly equals HelloMixly)

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

(Decimal number 97 corresponding to a)

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

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

11
3.5-11.png
Returns a decimal value of the first string subtracts the second string.
12
111-12.png
obtain the character string from x to y(eg:acquire the character string from 0 to 3)
13
111-13.png
Simplify the decimals in compliance with designated bits(eg:make decimal 6.66 simplify according to designated 2 bits
14
111-14.png
Transfer the all lower-case letters of designated character strings into capital letters or capital ones into lower-case letters
15
111-15.png
Replace the designated characters or character strings(the first character string is original, the second is to be replaced , the third one is character string which replaces.
11
111-16.png
Eliminate the non-visual characters in the character strings
11
111-17.png
Whether the first character string starts or end with the second character string, if it is, return 1; otherwise, return 0.(the first character string needs to be determined, the second one is character string which determines
11
111-18.png
Transfer data type into character strings/ characters/bites/integers/long integers/decimals/words


List Block

3.6.png

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

Set the first item in mylist to another item.

6
22--6.png
Initialize two-dimensional array, select the data type including integers, long integers, decimals, character strings, bites, char and characters
7
22--7.png
Define value on M row and N column
8
22--8.png
Obtain the content from array on M row and N column


Logic Block

3.7.png

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

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

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

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

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



Variable Block

3.8.png

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

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

2
3.8-2.png
Define the data types


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


SerialPort Block

3.9.png

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

(generally used in Bluetooth communication)

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

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

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

(equal to an interrupt function)


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

3.9-13.png


Communicate Block

Communicate.PNG

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


3.10-1-1.png

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

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

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



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


Sensor Block

Sensor.PNG


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

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

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

Returns the temperature or humidity of DHT 11 sensor measured.

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

Returns the temperature or humidity of DHT 11 sensor measured.


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


Actuator Block

Actuator.PNG

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

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

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

Read the degree of servo connected to IO pin set

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


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



Monitor Block

Monitor.PNG

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

(here turn on the first digitdisplay)


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

3.13 LCD16002.PNG


Functions Block

Function.PNG

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

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

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

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

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


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

3.14-4.png


More Resources

  • Download the Mixly:

https://fs.keyestudio.com/Mixly