101
coma Study Room 2013.11.16 @BULLET’S presented by coma team Contents 1. Arduino + Processing Workshop 2. openFrameworks + Node.js Workshop 3. The Breadboard Band Special Talk Session

coma Study Room Arduino Workshop

Embed Size (px)

DESCRIPTION

2013.11.16 @ BULLET'S

Citation preview

  • 1. coma Study Room! !2013.11.16! @BULLETS! presented by coma teamContents! !1.! Arduino + Processing!!!!!Workshop!2.! openFrameworks + Node.js! !!Workshop!!Special Talk Session!! !3.! The Breadboard Band ! !!!

2. Arduino + Processing!Workshop!!comakuma! ! coma team Eto Haruhiko1.! ! !!!!!2. !! !!!!!!3.! Arduino!!!!!!!4.! Lets! !!!!6.! ! !!5.! ! 7.! OSC!!!!! !8.! Tips! !!!!! 3. ! Arduino! ! ! ! LED! !&! ! 4. 1.!! 5. Whats the comakuma? coma discotheque Ver.0.02! ! !comakuma! ! !! !! 6. Whats the comakuma? comakuma! comakuma Arduino XBee PC Processing OSC openFrameworks RGB-LED 7. Whats the comakuma? comakuma! comakuma Arduino PC Processing OSC openFrameworks RGB-LED 8. 2.!! 9. ! !! ! ! ! ! ! ! ! ! !! ! ! ! Arduino PC ! LED! ! ! etc. 10. ! !! !!!2 ! 5cm/ 25cm !5cm/ - 0cm/ = 2.5cm// 2 11. ! ! !! ! ! ! !! ! !! ! !etc. 12. ! ! !! ! ! !! ON/OFF! ! /! ! !!!!!!!!!!!!comakuma! ! 13. 3.!! Arduino 14. Arduino! ! !! C/C++Arduino! !! PC! ! ! ! Arduino Uno!! !!! 15. Arduino! ! !USBIDE! ! !Arduino!! ! Arduino Uno!! !!! 16. Arduino Uno USB 5V 17. Arduino Uno USB 5V 3x,y,z A0,A1,A23 18. Arduino Uno PWM LED RGB-LED3~9,~10,~113USB 5V 3x,y,z A0,A1,A23 19. Arduino Uno PWM LED RGB-LED3~9,~10,~113USB 5V 3x,y,z 5V3.3V 3.3V3.3VA0,A1,A23 20. Arduino Uno PWM05V LED RGB-LED3~9,~10,~113USB 5V OK 3.3V LED 3x,y,z 5V3.3V 3.3V3.3VA0,A1,A23 21. 4.!! Lets 22. ! ! ! !ArduinoUnoNanoLeonardoMicro! 1! USB! !!!!!!!!!!!1! KXR94-2050 ()! !!!!1!RGB-LED OSTA5131A ()! !!!!!1! 150! !!!!!!!!!4!! !!!!!!!!!!1!! !!!!!!!!!14!!!! 23. ! ! ArduinoLED! ! !!!! ! ( )! RGB-LED( ` ) !! c(`) ! ! RGB-LED! !! 24. ! 25. ! 26. ! 3.3V 27. ! 3.3V 28. ! Arduino3.3V ! ! or 3.3V 29. 30. x,y,z 31. x,y,z 3.3V 1g 1g660mV 0g xy67 z1g 1.65V+0.66V=2.31V2.31V 32. x,y,z ! 1Arduino 3.3V 2Arduino 3.3V 3Arduino GND 4OK 5Arduino GND 6Arduino 7Arduino 8Arduino ! 33. RGB-LED! 34. RGB-LED! 20mA LED 5V 35. RGB-LED! LED20mA 10mA! (PWM)5V LED5V 10mA! R()=V()/I() ! R=(5V-2V)/0.01A=300OK 20mA ! Ror=(5V-3.6V)/0.01A=140OK 1502300 1504LED 5V 36. RGB-LED! RGB-LED3LED! !! Common Cathode = ! !! Arduino! Arduino! ! ! 91011(PWM)! !!! !!! 37. ! !! Arduino! ! RGB-LED! ! !! 38. ! or ! ! ! 1! 1 39. (+)! ! 3.3V! (+)! 3.3V5V 40. Arduino Nano +8514 41. Arduino Uno 8514 42. Arduino Micro8514 43. Arduino Leonardo! 8514 44. USB! ArduinoPC! Arduino MicroLeonardo! Mac! OK!!! ! 45. ! !Arduino IDE ( OCtrl+O)! comaSR_RGBrandom.ino! 46. (1) ! ! ! Arduino ! 47. (2) ! Arduino !UnoUno Nanonano w/ATmega328 LeonardoLeonardo MicroMicro ! ! ! LED 48. 5.!! 49. oscP5! !oscP5ProcessingOSC! !(1)! http://www.sojamo.de/libraries/oscP5/! ! oscP5zip! !(2) Processing! !libraries!!(3)! Processing! !(4) Processing Sketch Import Library! !oscP5! 50. ! !(1)! Processing !( OCtrl+O)!!comaSR.pde!!(2)! Run()! ! RCtrl+R 51. (Processing 1.52.0)! !Processing! ! !Arduino! ! int Arduino = ;! ! 52. (Processing 2.1)! !Processing! ! !Arduino! ! int Arduino = ;! ! 0! ! 53. ! !! !!3D!!! Arduino!! ! & ! LED EscProcessing 54. ! Arduino! ! !!!Processing!comaSR_RGBthreshold.ino! !!comaSR.pde!!comaSRminim.pde!Arduino! !!!!LED! !! !comaSR_minim.ino! !!!! LED! !! ! 55. ! ! ! !Processing! EscProcessing! !ArduinoUSBPC! ! ! Arduino! =PC!! ProcessingOK! ! 56. 6.!! 57. Arduino! ! ! = void setup(){!!! !! !}! !void loop(){! !! !}! Arduino Processing LED LED 58. Arduino! !! !void setup(){! !! !}! !void loop(){! !! !}!setup() ! ! ! () () { }! =() =void! ! 59. Arduino! !! !void setup(){! !! !}! !void loop(){! !! !}!loop() { }! RGB-LED ! 60. comaSR_RGBrandom.ino 61. comaSR_RGBrandom.ino setup() analogReference(); EXTERNALAREF 3.3V! pinMode(); pinMode(9, OUTPUT) 9(LED)! Serial.begin(); Serial.begin(9600)9600bps 62. comaSR_RGBrandom.ino loop() analogRead(); analogRead(0)0! map() map(inX, 0, 1023, 0, 255) 01023inX 0255! analogRead010231024 0255 analogRead(inX, inY, inZ) 0255! inX, inY, inZ 01024255 0 outX, outY, outZ 63. comaSR_RGBrandom.inoloop() if (Serial.available()>0){ } Processing{ } ProcessingArduino Arduino ArduinoProcessing ! Serial.write(); ( ) 64. comaSR_RGBrandom.inoloop() random(); LED! analogWrite(); LED! 65. Processing! !!Arduino!void setup(){!!!ProcessingArduino!Java!}! !void draw(){! !! !}! 66. comaSR.pde! setup()! ! !OSC oFOSCIDOK Java 67. comaSR.pde! setup()setup() frameRate(); 1 (=draw())! size(); P3D3D! inX = inY = inZ = 0; Arduino ! println(Serial.list()); 68. comaSR.pde! setup()setup()! myPort = new Serial(this, , 9600); 9600bps Serial.list()[Arduino] 69. comaSR.pde! setup()setup()! OSC 70. comaSR.pde! draw() draw() background(); 0255 draw() background(R, G, B, ) RGB()!translate(); translate() 2translate();!ll(R, G, B); ll() background!sphere(); 3D!println( or ); ( ) + 71. comaSR.pde! draw()serialEvent() if (myPort.available()>2){ } 3 { }! myPort.read(); inX, inY, inZ! myPort.write(); Arduino 255 Arduino 72. comaSR.pde! draw()mousePressed() myPort.clear(); Arduino OK myPort.write(); 73. ! !ArduinocomaSR_RGBrandom.ino! random()LED! !ProcessingcomaSR.pde! size()! background()! drawsetup! background(R, G, B, )! translate()! ll()! sphere()! ! 74. 2! ! ! !!!Processing!comaSR_RGBthreshold.ino! !!comaSR.pde!!comaSRminim.pde!Arduino! !!!!LED! !! !comaSR_minim.ino! !!!! LED! !! ! 75. comaSR_RGBthreshold.ino comaSR_RGBrandom.ino loop()RGB-LEDRGB-LED if 180LED 180 LED 76. comaSR_minim.ino 2 loop()&RGB-LEDProcessingcomaSR_minim.pde Arduino a ProcessingsRGB-LED Processing a LED 77. comaSRminim.pde! setup() minim! minim! 78. comaSRminim.pde! setup() minimminim = new Minim(this); audioIn = minim.getLineIn(Minim,MONO); 79. comaSRminim.pde! draw()if (audioIn.left.get(0)>0.001) { myPort.write( a ); myPort.clear(); } 0.001 Arduino a audioIn.left.get(0)-11 0.001 80. 7.!! OSC 81. OSC ! !! Arduino! Processing! ! !! oFMaxPure Data! ! !OSC(Open Sound Countrol)! 82. OSC! !1PC2ProcessingOSC! ! ProcessingcomaSRreceiver.pde!!comaSRreceiver!comaSRreceiver! ! 83. comaSR.pde ()! setup()! ! !OSCoFOSCIDOK ID8000 PC(localhost) 9000 IP 84. comaSR.pde ()! draw() OSCx, y, zOSC 85. comaSRreceiver.pde () { } OSC x, y, z 86. 8.!! Tips 87. 1.XBee! ! !! ! ! !USB! ! !! ! !! XBee 88. XBee! !12000! !1(IEEE 802.15.4)! 2(ZigBee)! !! 12OK! !XBee 1! PCB 89. ! !XBee 1! !!!!!2!XBee USB! !!!1!!!1!! XBee USB!!XBee 2.54mm!!!! XBee! 90. ! !XBee! !WindowsTeraTermMacCoolTerm X-CTUMac! http://www.digi.com/blog/community/xctu-sneak-peek-sign-up/!! !Baud RateID! OK! !! 91. Arduino Uno! !XBee! !Arduino!!1 3.3V! 21(TX)! 30(RX)! 10GND! ! USBArduino! !!! (712V)!!VinGND! +-! (9V006P) 92. ! !XBee! 1PCUSB! ! Arduino NanoXBeePCXBee 93. 2.! ! ! !! ! ! ! !! ! comakuma! ! 94. 2.! !! !! ! ! !! ! ! ! 95. 2.! !()! 1000! 96. 2.! !! ! 97. 2.! !! !! ! ! !! ! ! ! 98. 2.! ! & ! 99. 2.! !! 100. ArduinoProcessing! ! ! comacafe!! !!!!!!!!!!! Wikipedia23! !! 101. ! ! ! LED!! ! comacafe! coma!! !!! !!! ! Eto