SOFTWARE INSTALLATION
We will need softwate listed bellow:
- Arduino IDE is basics “development environment”
- RobDuino library for easier programming
- Ardublockly is needed for introduction to programming
- Python is needed for running Ardublockly
- VSC in PlatformIO proper IDE include:
- auto-completion,
- error marking (e.g. forgotten ";"),
- auto-detect USB port,
- function information
Arduino IDE
- Go to Arduino web page Arduino->Software->Download.
- Download Arduino IDE 1.8.9 choose Windows Install…
- … click
JUST DOWNLOAD
. - run
arduino-1.8.9.exe
and follow the instructions. - … don’t forget to install also 3rd party drivers (for Chinese version of Arduino UNO controller)…
- if you do forget… Try this Russian drivers from page.
Getting started
- Run
Arduino IDE
- Connect Arduino Uno controller to USB port.
Arduino Uno
- Open simple basic program:
files
->examples
->01.basics
->blink
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
- Make this settings in
Tools
menu ->Board:
Arduino/Genuino UnoPort:
COM3 or similar
-
Run :
Upload
to transfere the program to Arduino UNO controller. - If everything is OK you will get this message:
Done uploading.
Sketch uses 970 bytes (3%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
- Optional this preferences are suggested:
File
->Preferences
:Editor Language
: EnglishEditor font size
: 20Show verbose output during
: [ ]compiling [x] upload[x] Display linenumbers
[x] Enable code folding
RobDuino
RobDuino is Arduino library which include some usefull functions for driving motors and on-board key usage…
RobDuino Library Installation
- Download zip file:
- rename RobDuino-master.zip in:
- RobDuino.zip
- run Arduino IDE
- choose:
Sketch
–>Include Library
–>Add .ZIP Library...
- find
.../Download/RobDuino.zip
[OK]
Ardublockly
Ardublockly is graphical programming environment for programming Arduino controllers. A demo version of the program is also available on-line.
Note: For actual programming you will need Arduino IDE installed.
Note: For running Ardublockly you will need to install Python program.
Python Installation
-
You will have to install Python 3.7 or grater. First Download the newest version of Python.
-
Run installation file and set this settings:
[x] Add Python to PATH
in- choose
Clasic Instalation
Ardublockly Installation
-
From github.com/…/ardublockly download zip file by clicking Clone or download and choosen Download ZIP file.
-
Extract
ardublockly-master.zip
to dirrectory of your choice e.g.C:\\Program Files(x86)
-
That is it! Installation is complete.
Running Ardublockly
- Find this file
C:\\Program Files(x86)\\ardublockly-master
and double-click onstart.py
. Python program should run and you should see:- terminal window with some code running…
- and a new window should apear in your Internet Browser. If this is will not happend try to run
start.py
with right mouse button andStart program with
then choosePython 3.7
.
Settings
- Click
menu
and chooseSettings
:Compiler Location:
C:\Program Files (x86)\Arduino\arduino_debug.exeArduino Board:
UnoCom port:
COM3 or appropriate one- Click
[RETURN]
.
VSC in PlatformIO
Note: For programming Arduino controllers you will need Arduino IDE installed.
Download installation file:
- run
VSCodeUserSetup-ia32-1.49.3.exe
installation file. - run VSC program and click
Extensions
- search for
PlatformIO IDE
and - run
Install
. - restart VSC or click
Reload now
.
Getting Started
Write basic program Blink
:
- plug in Arduino Uno.
- open
PlatformIO - Home Page
:- in left icon bar find
PlatformIO
QUICK ACCESS
->PIO Home
->Open
- in left icon bar find
- choose
+ New Project
- Setup:
Name:
ime_projektaBoard:
Arduino UNOFramework:
Arduino Framework
- click
Finish
- Find directory
src
(e.g.source code
), where you can find main program code in filemain.cpp
- Copy-Paste this example: ```cpp #include
void setup() { pinMode(13, OUTPUT); }
void loop() { digitalWrite(13,HIGH); delay(500); digitalWrite(13,LOW); delay(500); } ```
- Run
Build
andUpload
.