Arduino, Microcontrollers and you!
Bret Comnes
web.pdx.edu/~bcomnes
Microcontrollers are small computers
Typcally:
- They use less power than a normal computer
- Are small
- Can be battery operated
- Programed to do a few specific tasks
- Read voltages
- Generate signals
Examples!




MicroControllers used to be super hard to use
- Difficult to get started
- Poor software support
- Geared towards EE

Arduino is a set of tools
aimed to make physical computing
easy for everyone
-
Easy to use software
- Easy to read documentation
- lots of EXAMPLES
- computer, board, usb cable and your off
Arduino comes in many Shapes





Arduino = Open source



These qualities have
helped make arduino very popular
(which is good since there are now lots of project examples)
We are focusing on the common
Uno/Leonardo/Duemilanove
style boards



What comes on the board?
- 8-Bit AVR Microcontroller
- Boot Loader
- USB controller
- external power jack
(You also get some power leads)
6 analog inputs

14 Digital Pins (in and out)

How do I solve problems with arduino?
Think about what you need to do!
- Do I need to read/understand the environment around me?
- Do I need to display information to people around me?
- Do I need to manipulate the world around me?
- Do I need to communicate with anyone/anything?
- ...
Think about how you can do it!
- How can I turn my observations into a voltage?
- How can display a message to those around me?
- How can I turn a digital/analog signal into a manipulative action?
- What channels can I communicate over?
- What language shall I speak?
Start by learning how others have done it!

Try to get as far as
you can following the advice of others
...Then make changes to fit your needs
SHIELDS can save you a HEADACHE
But they are also expensive




Its easy to Write
Arduino code
A good way to learn to program if its your first time
It is a variation of C
But you can use pretty much any language you want using libraries


void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
}
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
}
// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 13;
// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
Lets try it out
Set up lots of examples
Read through more complex projects
Try out the ones that seem interesting
Good resources


I wrote a lab
https://github.com/bcomnes/315-lab-microcontroller

Beyond the world of Microcontrollers




- raspberry pi
- Beagle Bone
- Mojo board
- Arduino YUN
Find a hackspace!
Play with the hardware here tonight
Also check out
NODEBots!
Thursday, February 27, 2014 from 6–9pm
Urban Airship Inc
1417 NW Everett St, Suite 300
Portland, OR
http://calagator.org/events/1250465703

Thanks!



Arduino Microcontrollers and you
By Bret Comnes
Arduino Microcontrollers and you
- 3,857