Upload
skugme
View
439
Download
0
Embed Size (px)
Citation preview
Some Kind of User Group (SKUG)
Arduino Core Environment
What is Arduino?
Arduino Is…
• An open-source electronics prototyping platform
• Based on flexible, easy to use hardware and software
• Intended for students, designers, hobbyists, and others
• Able to receive input from sensors
• Able to send output to lights, motors, and other actuators
Why use Arduino?
• Inexpensive
• Cross-platform
• Simple programming environment
• Open source and extensible software
• Open source and extensible hardware
Basics
• Programming language is based on Wiring
• Development environment is based on Processing
• A program in Arduino is called a Sketch
• Two main functions that are part of every Sketch
• setup(): Called once when the Sketch starts
• loop(): Called over and over and is the main part of the Sketch
• Both functions must be present even if not needed
Microcontrollers
• Digital pins can be configured as inputs or outputs
• Pins default to input so no need to declare explicitly
• Pins configured as output can provide substantial current to other circuits
• Provides enough current to power an LED or other sensors
• Does not provide enough current to power motors or solenoids
Development
• Windows: Arduino IDE, Visual Studio plugin
• Linux, Mac OS X: Arduino IDE
• Bare Minimum of code for a sketch:
void setup() {// put your setup code here, to run once:}
void loop() {// put your main code here, to run repeatedly:}
Standard Libraries• EEPROM - reading and writing to "permanent" storage
• Ethernet - for connecting to the internet using the Arduino Ethernet Shield
• Firmata - for communicating with applications on the computer using a standard serial protocol.
• GSM - for connecting to a GSM/GRPS network with the GSM shield.
• LiquidCrystal - for controlling liquid crystal displays (LCDs)
• SD - for reading and writing SD cards
• Servo - for controlling servo motors
• SPI - for communicating with devices using the Serial Peripheral Interface (SPI) Bus
• SoftwareSerial - for serial communication on any digital pins.
• Stepper - for controlling stepper motors
• WiFi - for connecting to the internet using the Arduino WiFi shield
• Wire - Two Wire Interface (TWI/I2C) for sending and receiving data over a net of devices or sensors.
Connect Your Arduino
• Get an Arduino board and cable
• Download the Arduino IDE
• Connect the board via USB
• Install the drivers
• Launch the Arduino IDE
Upload Your Sketch
• Create new or open existing sketch
• Select your board
• Select your serial port
• Upload your sketch
Questions
?
References
• Arduino Website: http://www.Arduino.cc
• Wikipedia: http://en.wikipedia.org/wiki/Arduino
• Wiring: http://wiring.org.co/
• Processing: http://www.processing.org/