blinky 101 with arduino v1.0b3 (fastled)

9
Blinky 101 with Arduino v1.0 Beta 3 Mark Kriegsman October 29, 2013 (revised)

Upload: kriegsman

Post on 29-Jun-2015

431 views

Category:

Engineering


5 download

DESCRIPTION

Slides from "Blinky 101 with Arduino" mini class from 2013.

TRANSCRIPT

Page 1: Blinky 101 with Arduino v1.0b3 (FastLED)

Blinky  101  with  Arduino  v1.0  Beta  3  

Mark  Kriegsman  October  29,  2013  (revised)  

Page 2: Blinky 101 with Arduino v1.0b3 (FastLED)

Before  You  Start,  First  Learn…  •  Addi5ve  color  (light)  model  

•  Trichroma5c  color  percep5on  

•  Red/Green/Blue  (RGB)  colorspace  

•  Non-­‐linear  brightness  percep5on  •  Raw  Spectra  vs.  “Rainbows”  

•  Inherent  brightness  (re:  yellow)  

•  24-­‐bit  RGB  color  representa5on  

•  Refresh  rate,  persistence  of  vision  

•  LED  opera5onal  basics  •  Pulse-­‐width  modula5on  

•  Basic  computer  anima5on  

•  Double  buffering  

•  Electrical  and  breadboarding  basics  

•  Digital  logic  basics  •  Clocked  serial  communica5on  (SPI)  

•  Microcontroller  basics  (e.g.,  no  OS,  etc.)  

•  Arduino  basics  (setup/loop,  preprocessor)  

•  gcc  4.3.x  toolchain  

•  C++  classes  &  methods  •  C++  memory,  pointers,  structs  &  arrays  

•  C++  operator  overloading  (e.g.  %=)  

•  Inline  assembly  language  

•  Harvard  vs.  von  Neumann  architectures  

•  AVR/ATmega  MCU  architecture  •  8-­‐bit  MCU  issues  (e.g.  int  =  16  bits)  

•  Satura5ng  arithme5c  &  ISO/IEC  N1169  

•  ATmega  328  port-­‐to-­‐pin  mappings  

•  Disassembly  of  compiler  output  

•  Cycle  coun5ng  for  required  5mings  •  “prine  debugging”  

Page 3: Blinky 101 with Arduino v1.0b3 (FastLED)

On  Second  Thought,  Let’s  Just  Play:  

1.  Connect  Arduino,  run  test  code  (“cookbook”)  -­‐  USB  connec5on,  Arduino  IDE,  basic  “Blink”  sketch  

2.  Hook  up  LED  strip,  sample  code  (“cookbook”)  -­‐  Run  code,  see  LEDs  on  strip  light  up.  Woo!  

3.  Receive  your  mission  instruc5ons  

-­‐  Play  with  der  Blinkenlights.  

Page 4: Blinky 101 with Arduino v1.0b3 (FastLED)

Basic  Arduino  setup  

1.  

2.  

3.  

Page 5: Blinky 101 with Arduino v1.0b3 (FastLED)
Page 6: Blinky 101 with Arduino v1.0b3 (FastLED)

Type,  Upload  

Page 7: Blinky 101 with Arduino v1.0b3 (FastLED)

Destroy  The  Earth    

Page 8: Blinky 101 with Arduino v1.0b3 (FastLED)

References  and  Resources  

•  Arduino.cc:  good  docs  &  great  forums  

•  Where  to  shop:  Adafruit.com,  Sparkfun.com  

•  FastLED    hjp://fastled.io  Google  Plus  “FastLED  Users”  group      hjp://fastled.io/+  

•  DL-­‐Blinkenlights  

Page 9: Blinky 101 with Arduino v1.0b3 (FastLED)

Thank  you!  

And  special  thanks  to…