Successfully reported this slideshow.
Processing Arduino
Processing••               C/Java•• 3D/           /AR•• Arduino IDE• Serial              Arduino
• Download Processing 1.0  http://processing.org/download• Processing 1.0.6•    Mac          Applications D&D
Processingvoid setup(){   size( 255, 255 ); //}void draw() { //   background( 255 ); //   noStroke(); //   color cl = colo...
Arduino• Arduino    – シリアルポートに可変抵抗の値をバイト値で送信    – port.print( val, BYTE );• Processing    – シリアルポートからバイト値を受信    – int val ...
Arduinoint val = 0;void setup(){   Serial.begin( 9600 );}void loop(){   val = analogRead( 0 ) / 4; // 4   1byte   Serial.p...
Processingimport processing.serial.*;Serial port;int val = 0; //void setup(){   size( 255, 255 ); //   port = new Serial( ...
Processing•                       2008:          Processing    – http://kousaku-      kousaku.blogspot.com/2008/07/process...
C#(.NET)• SerialPort•  – 浅草ギ研 Visual C# 2005 のシリアル通信機    能を使ってみる    http://www.robotsfx.com/robot/robohow/R    oboHow60/Ro...
C#(.NET)• SerialPort                   Form•   BaudRate             9600•   PortName             ”COM4”•   Form          s...
Flash/AIR••••                      Funnel•         Flash(AIR)           TECH Matari    – http://tech.ironhearts.com/blog/a...
ProcessingとArduinoの連携
Upcoming SlideShare
Loading in …5
×

ProcessingとArduinoの連携

2,160 views

Published on

福井情報技術者協会(FITEA)主催のArduino入門で発表したハンズオン用のスライドです。
http://fitea.org/?p=110
http://blog.shos.info/archives/2009/09/fiteaard

Published in: Technology, Business
  • Be the first to comment

  • Be the first to like this

ProcessingとArduinoの連携

  1. 1. Processing Arduino
  2. 2. Processing•• C/Java•• 3D/ /AR•• Arduino IDE• Serial Arduino
  3. 3. • Download Processing 1.0 http://processing.org/download• Processing 1.0.6• Mac Applications D&D
  4. 4. Processingvoid setup(){ size( 255, 255 ); //}void draw() { // background( 255 ); // noStroke(); // color cl = color( 255, 255, 0, 127 ); // R,G,B,α fill( cl ); // ellipse( 100, 100, 50, 50 ); // ( x, y, w, h );}
  5. 5. Arduino• Arduino – シリアルポートに可変抵抗の値をバイト値で送信 – port.print( val, BYTE );• Processing – シリアルポートからバイト値を受信 – int val = port.read();•
  6. 6. Arduinoint val = 0;void setup(){ Serial.begin( 9600 );}void loop(){ val = analogRead( 0 ) / 4; // 4 1byte Serial.print( val, BYTE ); // delay( 50 ); //}
  7. 7. Processingimport processing.serial.*;Serial port;int val = 0; //void setup(){ size( 255, 255 ); // port = new Serial( this, "COM4", 9600 );}void draw(){ background( 255 ); ellipse( 100, 100, val, val );}void serialEvent( Serial p ) { val = port.read();}
  8. 8. Processing• 2008: Processing – http://kousaku- kousaku.blogspot.com/2008/07/processing_10.html• Processing – http://yoppa.jpn.org/presen.php?itemid=169• yasushi noguchi class » Processing – http://r-dimension.xsrv.jp/classes_j/processing/
  9. 9. C#(.NET)• SerialPort• – 浅草ギ研 Visual C# 2005 のシリアル通信機 能を使ってみる http://www.robotsfx.com/robot/robohow/R oboHow60/RoboHow60.html
  10. 10. C#(.NET)• SerialPort Form• BaudRate 9600• PortName ”COM4”• Form serialPort1.Open()• Form serialPort1.Close()• DataReceived ReadByte• Write – var byteArray = new byte[] = { 1, 2, 3, 4, 5 }; – serialPort1.Write( byteArray, 0, 5 ); // 配列の0番から5個送信
  11. 11. Flash/AIR•••• Funnel• Flash(AIR) TECH Matari – http://tech.ironhearts.com/blog/archives/39

×