Get started with Mixly

From Wiki
Revision as of 08:07, 15 July 2017 by Root (Talk | contribs)

Jump to: navigation, search

Introduction

Arduino is a very popular platform since its being Open Source in terms of both software and hardware. More and more people want to learn Arduino programming. But once they open the software Arduino IDE to check the samples, the complicated code frustrates them. For those without programming basics, Arduino programming is definitely a big obstacle. Fortunately, you have Mixly – a free, open source, graphical visual programming language software based on Arduino, which will make programming as easy as building blocks.

Mixly-1.png

The Mixly GUI software is developed based on Blockly and Java8, which can run on OS Win7 or above. The Arduino IDE installation file, instructional lessons, and sample code are included in the package.

Mixly-2.png

The main interface of Mixly is concise and clear. Block categories are at left, the coding area is at the center. You can see the buttons to center, to zoom in or out, and to delete at the right side. Then the grey bar at the bottom top is the tool bar including all function menus, and the area at the very bottom, is the message display.

Get Started

Download the Mixly package, get into the folder Mixly0.995_WIN:

Mixly-3.png

Double click the Mixly iconMixly-4.png on your desktop:


For convenience, we can right-click and select Send to -> Desktop (create shortcut) to create a desktop shortcut.


Blocks

The Mixly includes In/Out, Control, SerialPort, and some other block categories. Next, let’s get through what these categories cover.
Note: Block categories supports Normal and Advanced views. For more functions, just click Advanced to use after you've mastered much.


In/Out: DigitalRead, DigitalWrite, AnalogRead, AnalogWrite, attachInterrupt, detachInterrupt, ShiftOut, etc.


Control: Delay, if…do…, repeat…do…, System running time, setup, etc.


Math: Map, Constrain, operations like +/-, sin/cos, random integer from…to… etc.


Text: text join, number to string, length of string, compareTo, etc.


Lists: create list, get item at list, set item at list, etc.


Logic: if conditional statement, logical operations


SerialPort: set baud rate, print data, read data


Communicate: IR receive, IR send, I2C read/write device, to SPI, etc.


Sensor: ultrasonic, DHT11, DS18B20


Actuator: Tone control, servo and stepper control.


Monitor: setup LCD pin, LCD print data, set LCD I2C address


Variables: High/Low, True/False, float, integer, Boolean, string variables, etc.


Functions: define function, do procedure with, etc.


Driver

When you connect the Arduino or SunFounder board to the computer, it may show “Unknown Device” or “USB Serial Port” with a yellow exclamation mark.


At that time, you need to install the driver yourself.
Right-click on the “Unknown Device” or the “USB Serial Port” with yellow exclamation mark, and click “Update Driver Software”.


Then click “Browse my computer for driver software”.


Click Browse, and select the path to Mixly-Rollman\Mixly0.995_WIN\Mixly0.995_WIN\arduino-1.8.2\drivers, then click Next.


Click "Install this driver software anyway".


The driver will be installed successfully after a while. If it fails, replug the USB cable to try and repeat the previous operations.


OK. That's all for the basics of the Mixly software. We'll probe into details later in specific lessons. Get familiar with them and you will find it pretty easy to catch up the following code tutorials. Good luck!

Example

Let’s start Mixly learning from programming a very simple project, blinking LED. First, make sure the LED is connected to pin 9. Drag out a digitalWrite block from In/Out.


Set pin 9 to High to light up the LED.


Then drag out a Delay block from Control category


Set the value to 500, i.e. 0.5s.


Then set pin 9 to LOW in the same way, and keep this state for 0.5s. Thus the LED will be blinking.


Connect the board to computer, and select the board type and port.


Upload the program, then we can see the LED blinking.


Resource