Что такое findslide.org?

FindSlide.org - это сайт презентаций, докладов, шаблонов в формате PowerPoint.


Для правообладателей

Обратная связь

Email: Нажмите что бы посмотреть 

Яндекс.Метрика

Презентация на тему Arduino philosophy and community

Содержание

What is Arduino?Physical DeviceIDECommunityhttp://www.arduino.cc
IMPLEMENTING IOEAssist. Prof. Rassim Suliyev - SDU 2017Week 2 What is Arduino?Physical DeviceIDECommunityhttp://www.arduino.cc Arduino Philosophy and CommunityOpen Source Physical Computing Platform“open source hardware”open source: free Arduino HardwareSimilar to Basic Stamp (if you know of it)but cheaper, faster, Arduino Hardware VarietyOpenness has its advantages, many different varieties.Anyone can build an Arduino Capabilities16 kBytes of Flash program memory1 kByte of RAM16 MHz (Apple Arduino Types Comparison Arduino Uno Arduino Terminology“sketch” – a program you write to run on an Arduino Arduino SoftwareLike a text editorView/write/edit sketchesBut then you program them into hardware Installing ArduinoGet the Arduino software & unzip itPlug in Arduino boardInstall the Plug in Arduino board Windows Driver Install Mac Driver Install Selecting Location & Typeusually highest numbered portstarts with tty.usbserial Arduino IDE Using ArduinoWrite your sketchPress Compile button (to check for errors)Press Upload button Status Messages TroubleshootingMost common problem is incorrect serial port settingIf you ever have any I made an LED blink, so what?Most actuators are switched on and Development CycleMake as many changes as you wantNot like most web programming: Lots of Built-in ExamplesAnd all over the Net. Search for “Arduino tutorial” Proteus ISIS Simulation SystemProteus is a CAD (Computer Aided Design) type software Proteus Menu and Navigation Creating a Circuit on Proteus Connecting Elements Simulation Installing Arduino Library for ProteusFor Windows XPCopy file BLOGEMBARCADO.LIB into:C:\Program Files\Labcenter Electronics\Proteus Loading the compiled file to ProteusFile –> Preferences -> Show verbose output during compilation Loading the compiled file to ProteusSelect and copy the location of .hex file Loading the compiled file to ProteusPaste the location of .hex file hereDouble click Useful Linkshttp://arduino.cc/Official homepage. Also check out the Playground & forumshttp://arduino.ru/Lots of useful Some Common CommandsSerial.println(value); Prints the value to the Serial Monitor on your Hidden Treasureint main(void){  init(); // initializes the Arduino hardware  setup(); TasksBlinking LED on 12th pin3 LEDs blink by order (interval - 1s)Traffic Arduino data types Flow controldo{ // assign readSensors value to x  x = readSensors(); Using Floating-Point Numbersfloat value = 1.1;void setup(){ Serial.begin(9600);}void loop(){ value = value ArraysArrays are zero indexed, with the first value in the array beginning Tasks with arrays and loops3 LEDs blink by order (interval - 1s)Traffic
Слайды презентации

Слайд 2 What is Arduino?
Physical Device
IDE
Community
http://www.arduino.cc

What is Arduino?Physical DeviceIDECommunityhttp://www.arduino.cc

Слайд 3 Arduino Philosophy and Community
Open Source Physical Computing Platform
“open

Arduino Philosophy and CommunityOpen Source Physical Computing Platform“open source hardware”open source:

source hardware”
open source: free to inspect & modify
physical computing
ubiquitous

computing
pervasive computing
ambient intelligence
calm computing
Spimes
Blogjects
smart objects
Community-built
Examples wiki (the “playground”) editable by anyone
Forums with lots of helpful people

Слайд 4 Arduino Hardware
Similar to Basic Stamp (if you know

Arduino HardwareSimilar to Basic Stamp (if you know of it)but cheaper,

of it)
but cheaper, faster, & open
Uses AVR ATmega328 microcontroller

chip
chip was designed to be used with C language
The designer of the AVR purposefully arranged its registers and instruction set so that C programs would compile efficiently on it. This is a big deal, compared to previous microcontrollers where C programs were almost always less efficient than a hand-coded assembly language variant.

$20 $70

$2 $50


Слайд 5 Arduino Hardware Variety
Openness has its advantages, many different

Arduino Hardware VarietyOpenness has its advantages, many different varieties.Anyone can build

varieties.
Anyone can build an Arduino work-alike in any form-factor

they want

Слайд 6 Arduino Capabilities
16 kBytes of Flash program memory
1 kByte

Arduino Capabilities16 kBytes of Flash program memory1 kByte of RAM16 MHz

of RAM
16 MHz (Apple II: 1 MHz)
Inputs and Outputs
14

digital input/output pins
6 analog input pins
6 analog output pins (pseudo-analog, uses PWM , which we’ll talk about later)
Completely stand-alone: doesn’t need a computer once programmed

* Don’t worry if the above doesn’t make sense, you don’t really need to know it.

Слайд 7 Arduino Types Comparison


Arduino Types Comparison

Слайд 8 Arduino Uno

Arduino Uno

Слайд 9 Arduino Terminology
“sketch” – a program you write to

Arduino Terminology“sketch” – a program you write to run on an

run on an Arduino board
“pin” – an input or

output connected to something. e.g. output to an LED, input from a knob.
“digital” – value is either HIGH or LOW. (aka on/off, one/zero) e.g. switch state
“analog” – value ranges, usually from 0-255. e.g. LED brightness, motor speed, etc.

Слайд 10 Arduino Software
Like a text editor
View/write/edit sketches
But then you

Arduino SoftwareLike a text editorView/write/edit sketchesBut then you program them into hardware

program them into hardware


Слайд 11 Installing Arduino
Get the Arduino software & unzip it
Plug

Installing ArduinoGet the Arduino software & unzip itPlug in Arduino boardInstall

in Arduino board
Install the driver
Reboot
Run the Arduino program
Tell Arduino

(program) about Arduino (board)

Слайд 12 Plug in Arduino board

Plug in Arduino board

Слайд 13 Windows Driver Install

Windows Driver Install

Слайд 14 Mac Driver Install

Mac Driver Install

Слайд 15 Selecting Location & Type

usually highest numbered port
starts with

Selecting Location & Typeusually highest numbered portstarts with tty.usbserial

tty.usbserial


Слайд 16 Arduino IDE

Arduino IDE

Слайд 17 Using Arduino
Write your sketch
Press Compile button (to check

Using ArduinoWrite your sketchPress Compile button (to check for errors)Press Upload

for errors)
Press Upload button to program Arduino board with

your sketch

Try it out with the “Blink” sketch!
Load “File/Examples/Basics/Blink”

Слайд 18 Status Messages

Status Messages

Слайд 19 Troubleshooting
Most common problem is incorrect serial port setting
If

TroubleshootingMost common problem is incorrect serial port settingIf you ever have

you ever have any “weird” errors from the Arduino

environment, just try again.
The red text at the bottom is debugging output in case there may be a problem
Status area shows summary of what’s wrong

Слайд 20 I made an LED blink, so what?
Most actuators

I made an LED blink, so what?Most actuators are switched on

are switched on and off with a digital output
The

digitalWrite() command is the software portion of being able to control just about anything
LEDs are easy, motors come in a bit
Arduino has up to 13 digital outputs, and you easily can add more with helper chips

Слайд 21 Development Cycle
Make as many changes as you want
Not

Development CycleMake as many changes as you wantNot like most web

like most web programming: edit ➝ run
Edit ➝ compile

➝ upload ➝ run

Слайд 22 Lots of Built-in Examples
And all over the Net.

Lots of Built-in ExamplesAnd all over the Net. Search for “Arduino

Search for “Arduino tutorial” or “Arduino notes” or whatever

you’re interested in and “Arduino” and likely you’ll find some neat pages.

And more here:
http://www.arduino.cc/en/Tutorial/HomePage


Слайд 23 Proteus ISIS Simulation System
Proteus is a CAD (Computer

Proteus ISIS Simulation SystemProteus is a CAD (Computer Aided Design) type

Aided Design) type software package
It combines the two main

programs:
ISIS – is a program for developing and debugging electronic circuits in real-time mode
ARES – PCB (Printed Circuit Board) design tool

Слайд 24 Proteus Menu and Navigation

Proteus Menu and Navigation

Слайд 25 Creating a Circuit on Proteus

Creating a Circuit on Proteus

Слайд 26 Connecting Elements

Connecting Elements

Слайд 27 Simulation

Simulation

Слайд 28 Installing Arduino Library for Proteus
For Windows XP
Copy file

Installing Arduino Library for ProteusFor Windows XPCopy file BLOGEMBARCADO.LIB into:C:\Program Files\Labcenter

BLOGEMBARCADO.LIB into:
C:\Program Files\Labcenter Electronics\Proteus 8 Professional\Data\LIBRARY

For Windows 7 and

later
Copy file BLOGEMBARCADO.LIB into:
C:\ProgramData\Labcenter Electronics\Proteus 8 Professional\LIBRARY


Слайд 29 Loading the compiled file to Proteus
File –> Preferences

Loading the compiled file to ProteusFile –> Preferences -> Show verbose output during compilation

-> Show verbose output during compilation


Слайд 30 Loading the compiled file to Proteus
Select and copy

Loading the compiled file to ProteusSelect and copy the location of .hex file

the location of .hex file


Слайд 31 Loading the compiled file to Proteus

Paste the location

Loading the compiled file to ProteusPaste the location of .hex file hereDouble click

of .hex file here
Double click


Слайд 32 Useful Links
http://arduino.cc/
Official homepage. Also check out the Playground

Useful Linkshttp://arduino.cc/Official homepage. Also check out the Playground & forumshttp://arduino.ru/Lots of

& forums
http://arduino.ru/
Lots of useful information about Arduino and programming

language on Russian language
http://arduino-project.net/videouroki-arduino-arduino4life/
Arduino video tutorials
http://adafruit.com/
Arduino starter kits, Boarduino Arduino clone, lots of cool kits
http://sparkfun.com/
Sells Arduino boards and lots of neat sensors & stuff
Books:
“Arduino cookbook”, Michael Margolis
“Arduino programming notebook”, Brian W. Evans
“Getting started with Arduino”, Massimo Banzi

Слайд 33 Some Common Commands
Serial.println(value); Prints the value to the Serial

Some Common CommandsSerial.println(value); Prints the value to the Serial Monitor on

Monitor on your computer
pinMode(pin, mode); Configures a digital pin to

read (input) or write (output) a digital value
digitalRead(pin); Reads a digital value (HIGH or LOW) on a pin set for input
digitalWrite(pin, value); Writes the digital value (HIGH or LOW) to a pin set for output

delay(value)
Stops the program execution for amount of milliseconds given by value


Слайд 34 Hidden Treasure
int main(void)
{
init(); // initializes the

Hidden Treasureint main(void){ init(); // initializes the Arduino hardware setup(); for (;;)  loop(); return 0;}

Arduino hardware
setup();
for (;;)

loop();
return 0;
}

Слайд 35 Tasks
Blinking LED on 12th pin
3 LEDs blink by

TasksBlinking LED on 12th pin3 LEDs blink by order (interval -

order (interval - 1s)
Traffic lights (Rd-5s, Yl-1s, Gr-5s, Yl-1s

…)
3 LEDs binary counter (0-7)
4 LED ripple

Слайд 36 Arduino data types

Arduino data types

Слайд 37 Flow control
do{ // assign readSensors value to x

Flow controldo{ // assign readSensors value to x  x =


x = readSensors();
delay (50);

// pauses 50 milliseconds
} while (x < 100); // loops if x is less than 100

while (someVariable < 200){ //if less than 200
doSomething; // executes enclosed statements
someVariable++; // increments variable by 1
}

for(j=0; j < 4; j++ ){
Serial.println(j);
}

if (inputPin < 500){
doThingA;
}
else if (inputPin >= 1000){
doThingB;
}
else{
doThingC;
}

1. if
if(expression){ //if expression is true
doSomething;
}

2. if… else
if(inputPin == HIGH){
doThingA;
} else{
doThingB;
}

3. for
for (initialization; condition; expression){
doSomething;
}

4. while
while (expression){
doSomething;
}

5. do… while
do {
doSomething;
} while (expression);


Слайд 38 Using Floating-Point Numbers
float value = 1.1;
void setup(){
Serial.begin(9600);
}
void

Using Floating-Point Numbersfloat value = 1.1;void setup(){ Serial.begin(9600);}void loop(){ value =

loop(){
value = value - 0.1;

//reduce value by 0.1 each time through the loop
if( value == 0)
Serial.println("The value is exactly zero");
else if(fabs(value) < .0001)
//function to take the absolute value of a float
Serial.println("The value is close enough to zero");
else
Serial.println(value);
delay(100);
}

OUTPUT:
1.00
0.90
0.80
0.70
0.60
0.50
0.40
0.30
0.20
0.10
The value is close enough to zero
-0.10
-0.20

This is because the only memory-efficient way that floating-point numbers can contain the huge range in values they can represent is by storing an approximation of the number.
The solution to this is to check if a variable is close to the desired value.


Слайд 39 Arrays
Arrays are zero indexed, with the first value

ArraysArrays are zero indexed, with the first value in the array

in the array beginning at index number 0. An

array needs to be declared and optionally assigned values before they can be used.

int myArray[] = {value0, value1, value2...}

Likewise it is possible to declare an array by declaring the array type and size and later assign values to an index position

int myArray[5]; // declares integer array with 5 positions
myArray[3] = 10; // assigns the 3rd index the value 10

To retrieve a value from an array, assign a variable to the array and index position:

first = myArray[0]; // this is the first element
last = myArray[4]; // this is the last element

  • Имя файла: arduino-philosophy-and-community.pptx
  • Количество просмотров: 115
  • Количество скачиваний: 0