Getting Started with Mixly: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
 
(45 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 124: Line 132:
|}
|}


'''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===
Line 133: Line 143:
{| 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 199: Line 208:
| align="center" | <br>[[Image:3.3-12.png|400px|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>
'''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)
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>[[Image:3.3 flash.PNG|800px|frameless]]<br>
<br>


=== Math Block===
=== Math Block===
Line 212: Line 264:
{| 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 225: Line 276:
| align="center" | <br>[[Image:3.4-2.png|300px|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>
|-
|-


Line 281: Line 333:
|-
|-
|}
|}
<br>


===Text Block===
===Text Block===
Line 349: 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===
Line 386: 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===
Line 435: Line 554:
|-
|-
|}
|}
<br>


===Variable Block===
===Variable Block===
Line 457: Line 579:
|-
|-
|}
|}
<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===
Line 535: Line 661:
|-
|-
|}
|}
<br>


'''For example: serial communication'''<br>
'''For example: serial communication'''<br>
Line 540: Line 668:
<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===
Line 579: 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===
[[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 612: 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===
[[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 627: 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 650: 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===
[[Image:Monitor.PNG|800px|frameless]]<br>
[[Image:Monitor.PNG|900px|frameless]]<br>


{| width="80%" cellspacing="0" border="1"
{| width="80%" cellspacing="0" border="1"
Line 682: 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 718: Line 860:
|}
|}


<br>
'''For example: serial communication'''<br>
'''For example: serial communication'''<br>
Separately connect the SDA (A4) and SCL (A5) of