V&A P5.js Series: Arduino @lexicobob The Code Liberation - - PowerPoint PPT Presentation

v a p5 js series arduino
SMART_READER_LITE
LIVE PREVIEW

V&A P5.js Series: Arduino @lexicobob The Code Liberation - - PowerPoint PPT Presentation

The Code Liberation Foundation Lecture #6: Arduino V&A P5.js Series: Arduino @lexicobob The Code Liberation Foundation Lecture #6: Arduino Why keyboards are great The Code Liberation Foundation Lecture #6: Arduino HOW THO? ATMega 32u4


slide-1
SLIDE 1

Lecture #6: Arduino The Code Liberation Foundation

V&A P5.js Series: Arduino

@lexicobob

slide-2
SLIDE 2

Lecture #6: Arduino The Code Liberation Foundation

Why keyboards are great

slide-3
SLIDE 3

Lecture #6: Arduino The Code Liberation Foundation

HOW THO?

ATMega 32u4 <3

slide-4
SLIDE 4

Lecture #6: Arduino The Code Liberation Foundation

Buttons

slide-5
SLIDE 5

Lecture #6: Arduino The Code Liberation Foundation

slide-6
SLIDE 6

Lecture #6: Arduino The Code Liberation Foundation

What's in the Bag

  • Arduino Pro Micro
  • Breadboard
  • 2 x wires (DuPont cables)
  • 1 x arcade button
slide-7
SLIDE 7

Lecture #6: Arduino The Code Liberation Foundation

TODAY

  • Make a hole in a box
  • Solder wires to a button
  • Use a breadboard
  • Put it together
  • Write the code!
  • Play your game
slide-8
SLIDE 8

Lecture #6: Arduino The Code Liberation Foundation

Breadboards

slide-9
SLIDE 9

Lecture #6: Arduino The Code Liberation Foundation

Breadboards

Images from Ben Miller's tutsplus.com article: How to Use a Breadboard and Build a LED Circuit

slide-10
SLIDE 10

Lecture #6: Arduino The Code Liberation Foundation

Soldering

  • Decide whether you want to use the

breadboard.

  • Cut off one end of your wire.
  • Strip the plastic off the end.
  • Tin the wire
  • Solder to the button
  • Repeat!
slide-11
SLIDE 11

Lecture #6: Arduino The Code Liberation Foundation

Tinning

slide-12
SLIDE 12

Lecture #6: Arduino The Code Liberation Foundation

Soldering

slide-13
SLIDE 13

Lecture #6: Arduino The Code Liberation Foundation

Cutting Holes - using a knife

  • Don't point the knife at

your face.

  • Don't point the knife at

anyone else's face.

  • Don't run with the

knife.

  • Protect the surface

you're cutting on.

  • Draw a 28mm circle.
  • Cut it out.
slide-14
SLIDE 14

Lecture #6: Arduino The Code Liberation Foundation

Putting it together

  • Push button through the hole
  • Screw on the nut
  • Plug one pin from the button into any of the pins

labelled GND (ground)

  • Plug the other pin into one of the digital pins
  • Plug the USB cable in!
slide-15
SLIDE 15

Lecture #6: Arduino The Code Liberation Foundation

Coding Time!

slide-16
SLIDE 16

Lecture #6: Arduino The Code Liberation Foundation

Arduino IDE + Bounce library

https://www.arduino.cc/en/Main/Software https://github.com/thomasfredericks/Bounce-Ardu ino-Wiring/archive/master.zip

slide-17
SLIDE 17

Lecture #6: Arduino The Code Liberation Foundation

Bounce?

slide-18
SLIDE 18

Lecture #6: Arduino The Code Liberation Foundation

Installing the Libary

slide-19
SLIDE 19

Lecture #6: Arduino The Code Liberation Foundation

The Setup

slide-20
SLIDE 20

Lecture #6: Arduino The Code Liberation Foundation

SPECIAL KEYS

KEY_LEFT_CTRL KEY_LEFT_SHIFT KEY_LEFT_ALT KEY_LEFT_GUI KEY_RIGHT_CTRL KEY_RIGHT_SHIFT KEY_RIGHT_ALT KEY_RIGHT_GUI KEY_UP_ARROW KEY_DOWN_ARROW KEY_LEFT_ARROW KEY_RIGHT_ARROW KEY_BACKSPACE KEY_TAB KEY_RETURN KEY_ESC KEY_INSERT KEY_DELETE

slide-21
SLIDE 21

Lecture #6: Arduino The Code Liberation Foundation

The Loop

slide-22
SLIDE 22

Lecture #6: Arduino The Code Liberation Foundation

UPLOOOOADING...

slide-23
SLIDE 23

Lecture #6: Arduino The Code Liberation Foundation

UPLOOOOADING...

slide-24
SLIDE 24

Lecture #6: Arduino The Code Liberation Foundation

FINISHING UP

slide-25
SLIDE 25

Lecture #6: Arduino The Code Liberation Foundation

Amazing Job!