YCAM Workshop Part 2

2,017 views
1,964 views

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,017
On SlideShare
0
From Embeds
0
Number of Embeds
103
Actions
Shares
0
Downloads
37
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

YCAM Workshop Part 2

  1. 1. 2007.12.22-23 YCAM #2 HELLO!!
  2. 2. 2 1 14:40 15:00 • • • LED
  3. 3. • – 2 – GND – V
  4. 4. • – – A
  5. 5. • – – Ω
  6. 6. • 1,000 1kΩ • 1,000,000 1MΩ • 1,000 1 1mA • 1,000,000 1 50µA
  7. 7. • •
  8. 8. +5V GND
  9. 9. LED
  10. 10. • • – – –
  11. 11. • • •
  12. 12. • •
  13. 13. LED
  14. 14. LED • LED 20mA • • •
  15. 15. V =I ×R • V V • I A • R Ω
  16. 16. − LED = LED ×R R − LED R= LED 5.0V LED 1.8V 10mA 5 − 1.8 3.2 R= = = 0.01 0.01
  17. 17. LED
  18. 18. • +5V • GND •
  19. 19. LED NG
  20. 20. 2 2 15:00 15:20 Processing • • •
  21. 21. Processing • • • •
  22. 22. Processing • Processing Development Environment • Sketch • Display Window
  23. 23. Processing 1 1 // 1 void setup() { // Display Window size(200, 200); } // void draw() { // background(255, 255, 255); }
  24. 24. Processing 2
  25. 25. Processing 2 2 PFont myFont; // void setup() { size(200, 200); myFont = loadFont(quot;HelveticaNeue-32.vlwquot;); // textFont(myFont, 32); // } void draw() { background(120, 120, 120); text(quot;Hello!!quot;, 15, 50); // }
  26. 26. Processing • • •
  27. 27. 2 3 15:20 16:30 Funnel • Gainer I/O • • LED •
  28. 28. Funnel Gainer I/O 1. Funnel Server 2. I/O LED 3. I/O LED
  29. 29. Funnel 3 I/O LED import processing.funnel.*; Gainer gainer; void setup() { size(200, 200); frameRate(30); gainer= new Gainer(this, Gainer.MODE1); gainer.autoUpdate = true; } void draw() { background(100); }
  30. 30. Funnel 4 I/O LED void mousePressed() { gainer.led().value = 1.0; } void mouseReleased() { gainer.led().value = 0.0; }
  31. 31. Funnel 5 I/O LED import processing.funnel.*; Gainer gainer; void setup() { size(200, 200); frameRate(30); gainer= new Gainer(this, Gainer.MODE1); gainer.autoUpdate = true; } void draw() { background(100); }
  32. 32. Funnel 6 I/O LED void gainerButtonEvent(boolean pressed) { if (pressed) { gainer.led().value = 1.0; } else { gainer.led().value = 0.0; } }
  33. 33. Funnel Gainer I/O 2 • dout 0 1 2 – LED – • aout 0 255 256 – LED –
  34. 34. Funnel aout 0 LED
  35. 35. Funnel aout 0 LED
  36. 36. Funnel 7 aout 0 LED void setup() { ... osc = new Osc(this, Osc.SQUARE, 1.0, 0); osc.serviceInterval = 30; osc.addEventListener(Osc.UPDATE, quot;oscUpdatedquot;); } void oscUpdated(Osc osc) { gainer.led().value = osc.value; }
  37. 37. Funnel 8 aout 0 LED void risingEdge(PortEvent e) { if (e.target.number == gainer.button) { osc.reset(); osc.start(); } } void fallingEdge(PortEvent e) { if (e.target.number == gainer.button) { osc.stop(); } }
  38. 38. Funnel Gainer I/O 2 • din 0 1 2 – – • ain 0 255 256 – –
  39. 39. Funnel ain 0
  40. 40. Funnel ain 0
  41. 41. Funnel ain 0 1. SimpleScope 2. 3. ain 1 4.
  42. 42. Funnel
  43. 43. Funnel
  44. 44. Funnel 1. Topics/Fractals and L-Systems/Tree 2. 3. Funnel 4. mouseX ain 0
  45. 45. Funnel ain 0
  46. 46. Funnel ain 0
  47. 47. Funnel ain 0 1. Tree 2. SimpleScope 3. Scaler 4.
  48. 48. Funnel ain 0
  49. 49. Funnel ain 0
  50. 50. Funnel ain 0
  51. 51. Funnel ain 0
  52. 52. Funnel ain 0
  53. 53. Funnel ain 0
  54. 54. Funnel ain
  55. 55. Funnel ain
  56. 56. Funnel ain 1. SimpleScope 2. 3 3. x, y, z • •
  57. 57. Funnel • •
  58. 58. Funnel
  59. 59. Funnel 1. 2. SimpleScope 3. -1 +1 4. sin
  60. 60. Funnel 1. RGBCube Mouse 2. 3.
  61. 61. Funnel ain 0
  62. 62. Funnel • • •
  63. 63. 2 16:30 17:00 • LED 9 analogInput(0) SetPoint void setup() { ... gainer.analogInput(0).filters = filters; ... } void risingEdge(PortEvent e) { if (e.target.number == gainer.analogInput[0]) { ... } }
  64. 64. 3 17:00 18:00 1. 30 2. 1

×