Arduino IDE Lecturer: Dr. Samuel Kosolapov

Items to be explained • How to download and install Arduino IDE • How to connect Arduino board to PC • How to write and upload (simplest) Blinking LED program (sketch)

2

Step 1. Software Download and Installation All needed can be found at “Getting Started with Arduino on Windows” https://www.arduino.cc/en/Guide/Windows Practically: Goto https://www.arduino.cc/en/main/software Select “Windows installer” Select “Just Download” Save in some place arduino-1.6.5-r2-windows.exe (~80 MB) (or later version) Run (preferably as admin) arduino-1.6.5-r2-windows.exe Agree with license Select all (~365 MB) Will install at C:\Program Files (x86)\Arduino - agree if asked Install Arduino USB Driver – agree if asked to Install Press Close

3

Step 2. Connect Arduino Board to USB Port of PC

Connect Arduino Board to USB Port of the PC. Drivers are expected to be installed automatically. LED on the Arduino Board may blink – as a result of previously downloaded program

4

Step 3. Write (simplest) Blinking LED program (sketch) Step 3.1. Run Arduino IDE. If asked, allow “access”. The following Window Appear: Automatic naming. One can change this name later

This code will be run on power on (or after reset), that is ONCE

Infinite loop. Something like “main” in the plain C

5

Step 3.2 Modify code as: Plain C: Global integer variable “ledPin” One can write “ququPin”. =13, because Pin 13 is connected to small LED on the board (in order to provide fast check) On power on (or after reset), Digital Pin13 is configured for OUTPUT Pin13 is set to HIGH  5V  LED is ON

LED will blink forever (On-Off-On..) while board is powered on

LED will be ON during 100 ms. Change this number later to be sure that you really program this board Pin13 is set LOW 0V  LED is OFF LED will be OFF during 1000 ms == 1 sec. 6

Step 3.2 Code without comments int ledPin = 13;

void setup() { pinMode(ledPin, OUTPUT); }

When good naming is used, no comments needed. Only PM (*) requires comments our days. • PM = Program Manager - person that failed to become a programmer

void loop() { digitalWrite(ledPin, HIGH); delay(100); digitalWrite(ledPin, LOW); delay(1000); }

7

Minimal Explanation of the “strange” non-C “magic”: HIDE To make children happy, they are not asked to write “include”, main() and some other technical functions All they need to do is to write functions setup(), loop() IDE complier actually creates plain C code by replacing functions setup(), loop() In the file main.cpp stored at C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\Arduino

/* main.cpp - Main loop for Arduino sketches Copyright (c) 2005-2013 Arduino Team. */ #include int atexit(void (* /*func*/ )()) { return 0; } void initVariant() __attribute__((weak)); void initVariant() { } void setupUSB() __attribute__((weak)); void setupUSB() { }

Those “hidden” function can be changed in the real code

int main(void) { init(); initVariant(); #if defined(USBCON) USBDevice.attach(); #endif setup(); for (;;) { loop(); if (serialEventRun) serialEventRun(); } return 0; }

Non-bold code exists, but is hidden from “children” to make programming simple

One can place here “local” variables before setup()

8

Step 4 Verify that the code (sketch) is legal  can be compiled Main Menu: Sketch | Verify / Compile The following dialog appears: Press “Save” for now. Rethink location and name of the “sketch folder” later For example, better store all your sketches in “GoogleDrive, Dropbox, Onedrive folders and not in the “user” folder The following text will appear at the bottom the Arduino software Global variables use 11 bytes (0%) of dynamic memory, leaving 2,037 bytes for local variables. Maximum is 2,048 bytes. 9

Step 5 Upload the code (sketch) to Arduino board Select Proper Virtual COM Port (Actually USB connection is used, but Arduino UNO R3 software use it as Virtual COM port) Main Menu | Tools | {} Select COM port that bears name “Arduino Uno” For example: COM3.

WARNING: Next time Virtual Port Number can be changed – depending on what is connected to PC now)

Now do upload Main Menu: Sketch | Upload LED must start blinking. Paranoid check: To check that all the steps are passed, change delay(100) to (say) delay(1000). Do “upload” again.

If LED blinking pattern changed , then Great success 10

Home reading From now, advance according to your needs by using https://www.arduino.cc/en/Tutorial/HomePage and C Programming for Arduino. http://www.lakos.fs.uni-lj.si/images/Predmeti/MK/2014/C%20Programming%20for%20Arduino.pdf There is a big number of free books, tutorials, etc. in the Internet. For example: https://www.syncfusion.com/resources/techportal/details/ebooks/arduino In some cases registration is needed.

11

E012 Arduino IDE 2016-02-28.pdf

arduino-1.6.5-r2-windows.exe (~80 MB) (or later version). Run (preferably as admin) arduino-1.6.5-r2-windows.exe. Agree with license. Select all (~365 MB).

923KB Sizes 4 Downloads 195 Views

Recommend Documents

IDE Arduino + Arddublock.pdf
http://blog.ardublock.com/. Whoops! There was a problem loading this page. IDE Arduino + Arddublock.pdf. IDE Arduino + Arddublock.pdf. Open. Extract.

ide java netbeans.pdf
Sign in. Loading… Whoops! There was a problem loading more pages. Whoops! There was a problem previewing this document. Retrying... Download. Connect ...

IDE-Empresarial-FormularioCompleto.pdf
Firma del socio / representanle legal. DN~N° _. Page 3 of 3. IDE-Empresarial-FormularioCompleto.pdf. IDE-Empresarial-FormularioCompleto.pdf. Open. Extract.

ide java netbeans.pdf
ide java netbeans.pdf. ide java netbeans.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying ide java netbeans.pdf.

Cheap 2 Ide Dual 4 Pin Molex Ide Male To 6 Pin Female Pci-E Y ...
Cheap 2 Ide Dual 4 Pin Molex Ide Male To 6 Pin Fema ... deo Cards F642D Free Shipping & Wholesale Price.pdf. Cheap 2 Ide Dual 4 Pin Molex Ide Male To 6 ...

pdf-1437\eclipse-ide-eclipse-ide-based-on-eclipse ...
feel so best to be part of this internet site. Coming to be the ... Page 3 of 6. pdf-1437\eclipse-ide-eclipse-ide-based-on-eclipse-42-and-43-vogella-series.pdf.

Cheap New 2.5'' To 3.5'' Hdd Adapter 44Pin Ide 2.5 Hd To Ide 3.5 ...
Cheap New 2.5'' To 3.5'' Hdd Adapter 44Pin Ide 2.5 H ... r Laptop Desktop Free Shipping & Wholesale Price.pdf. Cheap New 2.5'' To 3.5'' Hdd Adapter 44Pin ...

CONECTORE DE IDE Y SATA.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. CONECTORE ...

eclipse ide for mac.pdf
eclipse ide for mac.pdf. eclipse ide for mac.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying eclipse ide for mac.pdf.

Tract Infos IDE .pdf
Sign in. Loading… Whoops! There was a problem loading more pages. Retrying... Whoops! There was a problem previewing this document. Retrying.

arduino uno - electrician.wz.cz
DIGITAL (PWM~). AREF. GND1312 11 109 8. 765 43 2. TX→1 RX←0. L. TX. RX. POWER. ANALOG IN. A0A1A2A3A4A5. IOREF RESET 3.3V 5VGND GND Vin. ON. WWW.ARDUINO.CC - Made in Italy. RESET. ICSP. 1 ... EEPROM.h - access non-volatile memory byte read(addr) write

arduino
Aug 25, 2011 - 3. 1. S. 4. R. 1. 2. R. 1. 3. T. 1. R14. R. 1. 5. R. 1. 6. R. 1. 7. R. 1. 8. R. 1. 9. R20. R21. Q3. Q4. R22. Q2. R. 2. 3. R. 2. 4. P. IC. K. U. P. C. O. IL. V. C. C. 1. G. N. D. 2. O. U. T. 3. IC. 2. ARDUINO. Duemilanove Diecimila. TO

arduino -
An overview of basic electronics that will teach you how not to fry your Arduino. ... flexible, easy-to-use hardware and software. It's intended for artists, designers ...

arduino ppt.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. arduino ppt.pdf.

arduino manual.pdf
35. 3. Page 3 of 49. arduino manual.pdf. arduino manual.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying arduino manual.pdf. Page 1 of 49.

selenium ide commands with examples pdf
selenium ide commands with examples pdf. selenium ide commands with examples pdf. Open. Extract. Open with. Sign In. Main menu. Displaying selenium ide ...

Wanda POS Deployment In Netbeans IDE -
and advanced users with Java development skills who want to “tweak” ... Click the Add Folder button and add the src-beans, src-data, src-pos, src-erp, reports.

Wanda POS Deployment In Netbeans IDE -
Make sure the Java Platform is set to JDK 1.7 (Wanda POS v1 series uses features available in from JDK 1.7) and later. 2. Add the Libraries. Make sure the ...

man-152\ide-for-android-tablet.pdf
Connect more apps... Try one of the apps below to open or edit this item. man-152\ide-for-android-tablet.pdf. man-152\ide-for-android-tablet.pdf. Open. Extract.

Arduino Basic Connections - GitHub
Multiplexing 8 potentiometers ............................................................................................................. 55. Connect 8 difital inputs via SPI .........................................................................