|
Pure
Software code |
| |
Lebanon | |
|
|
Mixly |
| |
Home : Chapter
2: Getting Started with Mixly
Name of this webPage :
1a-GettingStartedwithMixly.html |
| | |
|
Multi-Functional 4 Wheel
Drive Robot Car |
|
|
The Chapters
:
1
2
3 4 5 6 |
|
Chapter 2: Getting Started with
Mixly. |
|
|
|
|
| | |
|
1- 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.
|
|
It can be
said that Mixly is the most versatile and
smoothest Arduino graphical programming
software, which can replace the Arduino
programming tool IDE. |
|
|
|
|
2- 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.
|
|
|
|
3- Mixly Interface Functions |
|
3.1- 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.
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.2- In/Out Block
For example: Connect your Arduino Uno board, then follow
the steps below to light the Pin13 led on Arduino UNO.
3.3- Control Block
No. |
BLOCK ICON |
DEFINITION |
1 |
|
Initialization (run only once) |
2 |
|
End the program, means the program will
stop running when use this block. |
3 |
|
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 |
|
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 |
|
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 |
|
Equal to for statement. |
7 |
|
A while loop
statement. |
8 |
|
break function, used to
exit from the containing loop. |
9 |
|
millis() function, returns
the system running time since the program started.
(The unit can
be ms (milliseconds)
or μs(microsecond)). |
10 |
|
Timer interrupt function, that is, set
a trigger interrupt for the amount of time (in
milliseconds) specified as parameter. |
11 |
|
Timer interrupt start block |
12 |
|
Timer interrupt stop block |
13 |
|
Set different simple timer, execute the
corresponding program every interval time |
14 |
|
Register a delayed function, and put
the code to be executed in this function |
15 |
|
Execute the delayed function, interval
time is 1000ms,1 time |
16 |
|
Allow to input and output the running
of pins interrupt |
17 |
|
Ban to input and output the running of
pins interrupt |
18 |
|
SCoop block is used to execute
multithreading tasks,up to 8 tasks |
19 |
|
Execute multithreading tasks |
20 |
|
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.4- Math Block
3.5- Text Block
No. |
BLOCK ICON |
DEFINITION |
1 |
|
character string: a letter, word, or
line of text. |
2 |
|
A character |
3 |
|
Creates a piece of text by joining
together two piece of text.
( Here Hello join Mixly
equals HelloMixly) |
4 |
|
Converts a string into an integer or an
float. |
5 |
|
Returns the char corresponding to an
ASCII code
(Decimal number 97
corresponding to a) |
6 |
|
Returns the ASCII code corresponding to
a char. |
7 |
|
Converts a number into a string. |
8 |
|
Calculates the length of a string |
9 |
|
Output the char of a string (the char
at 0 of hello is h) |
10 |
|
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 |
|
Returns a decimal value of the first
string subtracts the second string. |
12 |
|
obtain the character string from x to
y(eg:acquire the character string from 0 to 3) |
13 |
|
Simplify the decimals in compliance
with designated bits(eg:make decimal 6.66 simplify
according to designated 2 bits |
14 |
|
Transfer the all lower-case letters of
designated character strings into capital letters or
capital ones into lower-case letters |
15 |
|
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 |
|
Eliminate the non-visual characters in
the character strings |
11 |
|
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 |
|
Transfer data type into character
strings/ characters/bites/integers/long
integers/decimals/words |
3.6- List Block
No. |
BLOCK ICON |
DEFINITION |
1 |
|
Create a list with any number of
items |
2 |
|
Creats a list from a text. (int mylist
[ ]={0,0,0};) |
3 |
|
Creats a list from a text. (int mylist
[ ]={0,0,0};) |
4 |
|
Returns the value of at the specified
position in a list. |
5 |
|
Sets the value of at the specified
position in a list.
Set the first item in
mylist to another item. |
6 |
|
Initialize two-dimensional array,
select the data type including integers, long integers,
decimals, character strings, bites, char and
characters |
7 |
|
Define value on M row and N
column |
8 |
|
Obtain the content from array on M row
and N column |
3.7- Logic Block
3.8- Variable Block
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.9- SerialPort
Block
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.10- Communicate
Block
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.11- Sensor Block
No. |
BLOCK ICON |
DEFINITION |
1 |
|
Set the Trig and Echo pin of ultrasonic
sensor.
Returns the distance of
ultrasonic sensor measured.
(unit: cm) |
2 |
|
Set the control pin of DHT11
temperature and humidity sensor.
Returns the temperature or
humidity of DHT 11 sensor measured. |
3 |
|
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.12- Actuator Block
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.13- Monitor Block
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.14- Functions
Block
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.
|
|
|
|
The Chapters :
1
2
3
4 5 6 |
|
www.puresoftwarecode.com
: |
CHRISTIANITY
Institute |
HUMANITIES
Institute |
ART Institute &
Others |
SOFTWARE Institute - "All Courses Free" |
|
History of the MARONITES in
Arabic |
Basilica Architecture, in the Shape
of a Cross |
Python, Teach yourSelf Programs in 6
pages |
Holy BIBLE in 22 Languages and Studies
... |
Le HANDICAP c'est quoi ? (in
French) |
|
VISUAL STUDIO 2019, C# Programs, in
English |
220 Holy Christian
ICONS |
Drugs and Treatment in English, french,
Arabic |
Old Traditional Lebanese
houses |
VISUAL STUDIO 2010 in
English |
Catholic Syrian MARONITE
Church |
Classification of Wastes from the Source
in Arabic |
5 DRAWING Courses & 3
Galleries |
VISUAL STUDIO .NET, Windows & ASP in
En |
HOLY MASS of Maronite Church - Audio
in Arabic |
Christianity in the Arabian Peninsula in
Arabic |
Meteora,
Christianity Monasteries - En, Ar,
Fr |
VISUAL STUDIO 6.0 in
English |
VIRGIN MARY, Mother of JESUS CHRIST
GOD |
Summary of the Lebanese history in
Arabic |
Monasteries of Mount Athos &
Pilgrimage |
Microsoft ACCESS in
English |
SAINTS of the Church |
LEBANON EVENTS 1840 & 1860, in
Arabic |
Carved Rock Churches, Lalibela -
Ethiopia |
PHP & MySQL in
English |
Saint SHARBEL - Sharbelogy in 10
languages, Books |
Great FAMINE in LEBANON 1916, in
Arabic |
4 Different
STUDIES |
SOFTWARE GAMES in
English |
Catholic RADIO in Arabic, Sawt el
Rab |
Great FAMINE and Germny Role 1916,
in Arabic |
SOLAR Energy & Gas
Studies |
WEB DESIGN in English |
Saint SHARBEL Family -
Evangelization |
Armenian Genocide 1915 in
Arabic |
Personal Protective
Equipment |
JAVA SCRIPT in
English |
Читать -
БИБЛИЯ и Шарбэль cвятой, in Russe |
Sayfo or Assyrian Genocide 1915 in
Arabic |
WELCOME to LEBANON |
FLASH - ANIMATION in
English |
Apparitions of Virgin Mary -
Ar |
Christianity in Turkey in
Arabic |
YAHCHOUCH, my Lebanese
Village |
PLAY, 5 GAMES |
Neocatechumenal Way |
Prononce English and French and Arabic
Letters |
ZOUEIN, my Family - History &
Trees |
Multi-Functional 4 Wheel Drive
Robot Car
New |
Holy BIBLE, for the Maronite Liturgical
Year |
Andree Zouein
Foundation |
|
HERMEZ Steel, Steel Decor
Artwork |
Holy BIBLE, according to Maronite
Calendar, (2023) |
GIGI L'AMOROSO Fashion and
Jewellery |
my PRODUCTS, and Statistiques
... |
SAADEH BEJJANE
Architecture |
Holy BIBLE, Online Translation in
133 Languages |
Josette Zoueïn. Psychanalyste
Psychologue |
REPORT, Cyber Attack Attacks the Current
Site |
CARLOS SLIM HELU Site. new
design |
|
|
|
| |
|
| |