Files
xod/docs/tutorial/install/README.md
2017-07-14 16:16:49 +03:00

88 lines
3.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: Installing and Running XOD
---
Installing and Running XOD
==========================
To work with XOD, you use the XOD integrated development environment (IDE for
short), which comes in two flavors: browser-based and desktop version.
Browser-based IDE
-----------------
You can start the [browser-based XOD IDE](/ide/) simply by visiting the link.
However, because the browser has relatively few permissions to access the
computers file system and USB-ports, its capabilities are quite limited.
Notably, you cant upload your program directly to the board from within your
browser and you won't get the convenient save/load functionality.
However, you can import/export your programs as a single file (known as a
xodball), generate source code that you could copy and paste into an Arduino
IDE, and then upload it to the board via the Arduino IDE.
Desktop IDE
-----------
XOD IDE for desktop requires installing, but provides all features. It works on
Windows, macOS, and Linux. Find a distribution package for your system on
[downloads page](/downloads/).
Upload your first program
-------------------------
Once you start XOD IDE, youll see the `welcome-to-xod` project open. Its
a primitive demo project that—yes, you guessed it—blinks a LED on the board.
![XOD main window](./main-window.png)
Let's try to upload the program to your Arduino IDE.
In the main menu, go to Deploy → Show Code for Arduino. Youll see much of
C++ source code that once compiled and uploaded to the board will blink the
built-in LED. If you have the Arduino IDE installed, try it. Copy and paste the
code to the Arduino IDE and click Upload.
<div class="ui segment">
<span class="ui ribbon label">Note</span>
If youve previously seen what code to blink an LED looks like for Arduino, you
might be astonished looking at the amount of code produced by XOD. Dont worry
- most of it is code for the XOD runtime environment, which actually creates
little overhead after compilation. You don't need to understand how it
actually works. For now, think of it as a black box.
</div>
Upload directly from within the XOD IDE
---------------------------------------
This feature is only available in the desktop version. Go to Deploy → Upload
to Arduino. Select your board model and the serial port it is connected to:
![XOD model/port dialog](./board-selection.png)
Click Upload and wait.
Behind the scenes, XOD uses the Arduino IDE to compile and upload programs. So
if you have no Arduino IDE installed yet, youll be asked to download and
install it. The Arduino IDE itself has a package system to support various
boards. If a package supporting your board is not installed yet, it will also
be automatically installed.
If the upload succeeds, youll see 100% progress and a compiler message:
![XOD upload window](./upload.png)
<div class="ui segment">
<span class="ui ribbon label">Feedback</span>
If you have a problem with uploading, please report it on our <a
href="//forum.xod.io">forum</a>. Describe what you're doing, what you expect to
get, and what you actually get. We will help.
</div>
Whats next
-----------
Now that you can run the IDE and upload programs, let's try to understand how
and why they work. Go to the [Nodes and Links](../nodes-and-links/) chapter.