SlideShare a Scribd company logo
1 of 46
Download to read offline
void setup() {
  // initialize the digital pin as an output.
  // Pin 13 has an LED connected on most Arduino boards:
  pinMode(13, OUTPUT);
}

void loop() {
  digitalWrite(13, HIGH);   //   set the LED on
  delay(1000);              //   wait for a second
  digitalWrite(13, LOW);    //   set the LED off
  delay(1000);              //   wait for a second
}
void setup() {
  // initialize the digital pin as an output.
  // Pin 13 has an LED connected on most Arduino boards:
  pinMode(13, OUTPUT);
}

void loop() {
  digitalWrite(13, HIGH);   //   set the LED on
  delay(1000);              //   wait for a second
  digitalWrite(13, LOW);    //   set the LED off
  delay(1000);              //   wait for a second
}
int brightness = 0;
int fadeAmount = 5;

void setup() {
  pinMode(9, OUTPUT);
}

void loop() {
  // set the brightness of pin 9:
  analogWrite(9, brightness);

    brightness = brightness + fadeAmount;

    if (brightness == 0 || brightness == 255) {
      fadeAmount = -fadeAmount ;
    }

    delay(30);
}
const int buttonPin = 2;
const int ledPin = 13;

int buttonState = 0;

void setup() {
  pinMode(ledPin, OUTPUT);
  pinMode(buttonPin, INPUT);
}

void loop(){
  // read the state of the pushbutton value:
  buttonState = digitalRead(buttonPin);

    if (buttonState == HIGH) {
      digitalWrite(ledPin, HIGH);
    }
    else {
      digitalWrite(ledPin, LOW);
    }
}
const int sensorPin = A0;
const int ledPin = 9;

void setup() {
  pinMode(ledPin, OUTPUT);
}

void loop() {
  // read the value from the sensor:
  int sensorValue = analogRead(sensorPin);

    // scale from 0-1023 to 0-255
    int intensity = map(sensorValue, 0, 1023, 0, 255);

    // sets the value
    analogWrite(ledPin, intensity);
}
const int ledPin = 9;

void setup() {
  // initialize the serial communication:
  Serial.begin(9600);

    pinMode(ledPin, OUTPUT);
}

void loop() {
  byte brightness;

    // check if data has been sent from the computer:
    if (Serial.available()) {
      // read the most recent byte (0-255)
      brightness = Serial.read();

        // set the brightness of the LED:
        analogWrite(ledPin, brightness);
    }
}
import processing.serial.*;

Serial port;

void setup() {
  size(256, 150);

    // Print available serial ports
    println(Serial.list());

    port = new Serial(this, "COM1", 9600);
}

void draw() {
  // draw a gradient from black to white
  ...

    // send the current X-position of the mouse
    port.write(mouseX);
}
Arduino Workshop 2011.05.31

More Related Content

What's hot

Experiment write-vhdl-code-for-realize-all-logic-gates
Experiment write-vhdl-code-for-realize-all-logic-gatesExperiment write-vhdl-code-for-realize-all-logic-gates
Experiment write-vhdl-code-for-realize-all-logic-gates
Ricardo Castro
 
Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9
Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9
Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9
Irfan Qadoos
 
Getting Started With Raspberry Pi - UCSD 2013
Getting Started With Raspberry Pi - UCSD 2013Getting Started With Raspberry Pi - UCSD 2013
Getting Started With Raspberry Pi - UCSD 2013
Tom Paulus
 

What's hot (20)

Arduino Workshop Day 2
Arduino  Workshop Day 2Arduino  Workshop Day 2
Arduino Workshop Day 2
 
Cassiopeia Ltd - standard Arduino workshop
Cassiopeia Ltd - standard Arduino workshopCassiopeia Ltd - standard Arduino workshop
Cassiopeia Ltd - standard Arduino workshop
 
Aurduino coding for transformer interfacing
Aurduino coding for transformer interfacingAurduino coding for transformer interfacing
Aurduino coding for transformer interfacing
 
Scottish Ruby Conference 2010 Arduino, Ruby RAD
Scottish Ruby Conference 2010 Arduino, Ruby RADScottish Ruby Conference 2010 Arduino, Ruby RAD
Scottish Ruby Conference 2010 Arduino, Ruby RAD
 
Arduino Day 1 Presentation
Arduino Day 1 PresentationArduino Day 1 Presentation
Arduino Day 1 Presentation
 
DSL Junior Makers - electronics workshop
DSL Junior Makers - electronics workshopDSL Junior Makers - electronics workshop
DSL Junior Makers - electronics workshop
 
Arduino 8-step drum sequencer 3 channels
Arduino 8-step drum sequencer 3 channelsArduino 8-step drum sequencer 3 channels
Arduino 8-step drum sequencer 3 channels
 
arduino
arduinoarduino
arduino
 
Experimentdsd[1]
Experimentdsd[1]Experimentdsd[1]
Experimentdsd[1]
 
Chap 3
Chap 3Chap 3
Chap 3
 
Task i
Task iTask i
Task i
 
Experiment write-vhdl-code-for-realize-all-logic-gates
Experiment write-vhdl-code-for-realize-all-logic-gatesExperiment write-vhdl-code-for-realize-all-logic-gates
Experiment write-vhdl-code-for-realize-all-logic-gates
 
VERILOG CODE
VERILOG CODEVERILOG CODE
VERILOG CODE
 
Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9
Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9
Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9
 
Digital system design lab manual
Digital system design lab manualDigital system design lab manual
Digital system design lab manual
 
Logic gates
Logic gatesLogic gates
Logic gates
 
Temperature sensor with a led matrix display (arduino controlled)
Temperature sensor with a led matrix display (arduino controlled)Temperature sensor with a led matrix display (arduino controlled)
Temperature sensor with a led matrix display (arduino controlled)
 
Logical Gates
Logical GatesLogical Gates
Logical Gates
 
Getting Started With Raspberry Pi - UCSD 2013
Getting Started With Raspberry Pi - UCSD 2013Getting Started With Raspberry Pi - UCSD 2013
Getting Started With Raspberry Pi - UCSD 2013
 
Up and running with Teensy 3.1
Up and running with Teensy 3.1Up and running with Teensy 3.1
Up and running with Teensy 3.1
 

Viewers also liked

111125 ものづくりオープンメソッドiamas・岐阜高専連携講座 takawo
111125 ものづくりオープンメソッドiamas・岐阜高専連携講座 takawo111125 ものづくりオープンメソッドiamas・岐阜高専連携講座 takawo
111125 ものづくりオープンメソッドiamas・岐阜高専連携講座 takawo
takawo shunsuke
 
IAMAS 2010 First presentation
IAMAS 2010 First presentationIAMAS 2010 First presentation
IAMAS 2010 First presentation
ocrock
 
IAMAS Innovation Studio Opening 2013.04.19
IAMAS Innovation Studio Opening 2013.04.19IAMAS Innovation Studio Opening 2013.04.19
IAMAS Innovation Studio Opening 2013.04.19
Shigeru Kobayashi
 

Viewers also liked (12)

平成23年度メディア芸術部門会議
平成23年度メディア芸術部門会議平成23年度メディア芸術部門会議
平成23年度メディア芸術部門会議
 
Make:r × Maker - 0th Exhibition
Make:r × Maker - 0th ExhibitionMake:r × Maker - 0th Exhibition
Make:r × Maker - 0th Exhibition
 
111125 ものづくりオープンメソッドiamas・岐阜高専連携講座 takawo
111125 ものづくりオープンメソッドiamas・岐阜高専連携講座 takawo111125 ものづくりオープンメソッドiamas・岐阜高専連携講座 takawo
111125 ものづくりオープンメソッドiamas・岐阜高専連携講座 takawo
 
「Makerムーブメント」の時代におけるデザイン言語
「Makerムーブメント」の時代におけるデザイン言語「Makerムーブメント」の時代におけるデザイン言語
「Makerムーブメント」の時代におけるデザイン言語
 
iBeaconハッカソン
iBeaconハッカソンiBeaconハッカソン
iBeaconハッカソン
 
20131026 i beaconワークショップ
20131026 i beaconワークショップ20131026 i beaconワークショップ
20131026 i beaconワークショップ
 
公共の場での体験型作品展示 〜屋外で観客を誘導するためのKinect〜
公共の場での体験型作品展示 〜屋外で観客を誘導するためのKinect〜公共の場での体験型作品展示 〜屋外で観客を誘導するためのKinect〜
公共の場での体験型作品展示 〜屋外で観客を誘導するためのKinect〜
 
フィジカルコンピューティングとその可能性
フィジカルコンピューティングとその可能性フィジカルコンピューティングとその可能性
フィジカルコンピューティングとその可能性
 
IAMAS 2010 First presentation
IAMAS 2010 First presentationIAMAS 2010 First presentation
IAMAS 2010 First presentation
 
IAMAS Innovation Studio Opening 2013.04.19
IAMAS Innovation Studio Opening 2013.04.19IAMAS Innovation Studio Opening 2013.04.19
IAMAS Innovation Studio Opening 2013.04.19
 
「Makerムーブメント」の時代におけるdesign、学び、産業
「Makerムーブメント」の時代におけるdesign、学び、産業「Makerムーブメント」の時代におけるdesign、学び、産業
「Makerムーブメント」の時代におけるdesign、学び、産業
 
2013 Maker Meetup Taipei
2013 Maker Meetup Taipei2013 Maker Meetup Taipei
2013 Maker Meetup Taipei
 

Similar to Arduino Workshop 2011.05.31

Mims effect
Mims effectMims effect
Mims effect
arnaullb
 
What will be quantization step size in numbers and in voltage for th.pdf
What will be quantization step size in numbers and in voltage for th.pdfWhat will be quantization step size in numbers and in voltage for th.pdf
What will be quantization step size in numbers and in voltage for th.pdf
SIGMATAX1
 
4 IOT 18ISDE712 MODULE 4 IoT Physical Devices and End Point-Aurdino Uno.pdf
4 IOT 18ISDE712  MODULE 4 IoT Physical Devices and End Point-Aurdino  Uno.pdf4 IOT 18ISDE712  MODULE 4 IoT Physical Devices and End Point-Aurdino  Uno.pdf
4 IOT 18ISDE712 MODULE 4 IoT Physical Devices and End Point-Aurdino Uno.pdf
Jayanthi Kannan MK
 
Mao arduino
Mao arduinoMao arduino
Mao arduino
Mao Wu
 
Lab_5.txt.rtfLab_05Design an application that reads the .docx
Lab_5.txt.rtfLab_05Design an application that reads the .docxLab_5.txt.rtfLab_05Design an application that reads the .docx
Lab_5.txt.rtfLab_05Design an application that reads the .docx
DIPESH30
 

Similar to Arduino Workshop 2011.05.31 (20)

Mims effect
Mims effectMims effect
Mims effect
 
Introduction to arduino Programming with
Introduction to arduino Programming withIntroduction to arduino Programming with
Introduction to arduino Programming with
 
Arduino.pptx
Arduino.pptxArduino.pptx
Arduino.pptx
 
Arduino cic3
Arduino cic3Arduino cic3
Arduino cic3
 
Roberto Gallea: Workshop Arduino, giorno #2 Arduino + Processing
Roberto Gallea: Workshop Arduino, giorno #2 Arduino + ProcessingRoberto Gallea: Workshop Arduino, giorno #2 Arduino + Processing
Roberto Gallea: Workshop Arduino, giorno #2 Arduino + Processing
 
What will be quantization step size in numbers and in voltage for th.pdf
What will be quantization step size in numbers and in voltage for th.pdfWhat will be quantization step size in numbers and in voltage for th.pdf
What will be quantization step size in numbers and in voltage for th.pdf
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Arduino based applications part 1
Arduino based applications part 1Arduino based applications part 1
Arduino based applications part 1
 
Bluetooth
Bluetooth Bluetooth
Bluetooth
 
4 IOT 18ISDE712 MODULE 4 IoT Physical Devices and End Point-Aurdino Uno.pdf
4 IOT 18ISDE712  MODULE 4 IoT Physical Devices and End Point-Aurdino  Uno.pdf4 IOT 18ISDE712  MODULE 4 IoT Physical Devices and End Point-Aurdino  Uno.pdf
4 IOT 18ISDE712 MODULE 4 IoT Physical Devices and End Point-Aurdino Uno.pdf
 
Gaztea Tech Robotica 2016
Gaztea Tech Robotica 2016Gaztea Tech Robotica 2016
Gaztea Tech Robotica 2016
 
Arduino final ppt
Arduino final pptArduino final ppt
Arduino final ppt
 
Arduino for Beginners
Arduino for BeginnersArduino for Beginners
Arduino for Beginners
 
Mao arduino
Mao arduinoMao arduino
Mao arduino
 
Day1
Day1Day1
Day1
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Lab_5.txt.rtfLab_05Design an application that reads the .docx
Lab_5.txt.rtfLab_05Design an application that reads the .docxLab_5.txt.rtfLab_05Design an application that reads the .docx
Lab_5.txt.rtfLab_05Design an application that reads the .docx
 
Arduino programming part1
Arduino programming part1Arduino programming part1
Arduino programming part1
 
P-Space Arduino/Genuino day 2016
P-Space Arduino/Genuino day 2016P-Space Arduino/Genuino day 2016
P-Space Arduino/Genuino day 2016
 

More from Shigeru Kobayashi

情報学基礎:エレクトロニクス
情報学基礎:エレクトロニクス情報学基礎:エレクトロニクス
情報学基礎:エレクトロニクス
Shigeru Kobayashi
 
Engadget電子工作部:インテルGalileoでガジェットを作ろう!
Engadget電子工作部:インテルGalileoでガジェットを作ろう!Engadget電子工作部:インテルGalileoでガジェットを作ろう!
Engadget電子工作部:インテルGalileoでガジェットを作ろう!
Shigeru Kobayashi
 

More from Shigeru Kobayashi (20)

Maker Faireを持続可能にするには?
Maker Faireを持続可能にするには?Maker Faireを持続可能にするには?
Maker Faireを持続可能にするには?
 
Maker Faire Tokyo 2018
Maker Faire Tokyo 2018Maker Faire Tokyo 2018
Maker Faire Tokyo 2018
 
IoT Workshop in Macao
IoT Workshop in MacaoIoT Workshop in Macao
IoT Workshop in Macao
 
au未来研究所ハッカソン
au未来研究所ハッカソンau未来研究所ハッカソン
au未来研究所ハッカソン
 
Maker Faire Tokyo 2015
Maker Faire Tokyo 2015Maker Faire Tokyo 2015
Maker Faire Tokyo 2015
 
Gesture Workshop
Gesture WorkshopGesture Workshop
Gesture Workshop
 
Telematics Hackathon
Telematics HackathonTelematics Hackathon
Telematics Hackathon
 
テレマティクスハッカソン参加同意書
テレマティクスハッカソン参加同意書テレマティクスハッカソン参加同意書
テレマティクスハッカソン参加同意書
 
monoFab Ideathon Meeting
monoFab Ideathon MeetingmonoFab Ideathon Meeting
monoFab Ideathon Meeting
 
monoFabアイデアソンミーティング参加同意書
monoFabアイデアソンミーティング参加同意書monoFabアイデアソンミーティング参加同意書
monoFabアイデアソンミーティング参加同意書
 
CEATEC JAPAN 2014
CEATEC JAPAN 2014CEATEC JAPAN 2014
CEATEC JAPAN 2014
 
BLE Boot Camp
BLE Boot CampBLE Boot Camp
BLE Boot Camp
 
Fab MeetUp Vol.5
Fab MeetUp Vol.5Fab MeetUp Vol.5
Fab MeetUp Vol.5
 
SK creator planet 2014
SK creator planet 2014SK creator planet 2014
SK creator planet 2014
 
Solid 2014 kobayashi
Solid 2014 kobayashiSolid 2014 kobayashi
Solid 2014 kobayashi
 
情報学基礎:エレクトロニクス
情報学基礎:エレクトロニクス情報学基礎:エレクトロニクス
情報学基礎:エレクトロニクス
 
Rebuilding the world, from the 'periphery'
Rebuilding the world, from the 'periphery'Rebuilding the world, from the 'periphery'
Rebuilding the world, from the 'periphery'
 
Engadget電子工作部:インテルGalileoでガジェットを作ろう!
Engadget電子工作部:インテルGalileoでガジェットを作ろう!Engadget電子工作部:インテルGalileoでガジェットを作ろう!
Engadget電子工作部:インテルGalileoでガジェットを作ろう!
 
第2回iBeaconハッカソン
第2回iBeaconハッカソン第2回iBeaconハッカソン
第2回iBeaconハッカソン
 
イノベーション創出のファシリテータとしてのデジタル工作機械を備えた市民工房
イノベーション創出のファシリテータとしてのデジタル工作機械を備えた市民工房イノベーション創出のファシリテータとしてのデジタル工作機械を備えた市民工房
イノベーション創出のファシリテータとしてのデジタル工作機械を備えた市民工房
 

Recently uploaded

一比一定(购)卡尔顿大学毕业证(CU毕业证)成绩单学位证
一比一定(购)卡尔顿大学毕业证(CU毕业证)成绩单学位证一比一定(购)卡尔顿大学毕业证(CU毕业证)成绩单学位证
一比一定(购)卡尔顿大学毕业证(CU毕业证)成绩单学位证
wpkuukw
 
Top profile Call Girls In Mysore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Mysore [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Mysore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Mysore [ 7014168258 ] Call Me For Genuine Models We...
gajnagarg
 
一比一原版(ANU毕业证书)澳大利亚国立大学毕业证原件一模一样
一比一原版(ANU毕业证书)澳大利亚国立大学毕业证原件一模一样一比一原版(ANU毕业证书)澳大利亚国立大学毕业证原件一模一样
一比一原版(ANU毕业证书)澳大利亚国立大学毕业证原件一模一样
yhavx
 
一比一定(购)西悉尼大学毕业证(WSU毕业证)成绩单学位证
一比一定(购)西悉尼大学毕业证(WSU毕业证)成绩单学位证一比一定(购)西悉尼大学毕业证(WSU毕业证)成绩单学位证
一比一定(购)西悉尼大学毕业证(WSU毕业证)成绩单学位证
eqaqen
 
Q4-Trends-Networks-Module-3.pdfqquater days sheets123456789
Q4-Trends-Networks-Module-3.pdfqquater days sheets123456789Q4-Trends-Networks-Module-3.pdfqquater days sheets123456789
Q4-Trends-Networks-Module-3.pdfqquater days sheets123456789
CristineGraceAcuyan
 
怎样办理莫纳什大学毕业证(Monash毕业证书)成绩单留信认证
怎样办理莫纳什大学毕业证(Monash毕业证书)成绩单留信认证怎样办理莫纳什大学毕业证(Monash毕业证书)成绩单留信认证
怎样办理莫纳什大学毕业证(Monash毕业证书)成绩单留信认证
ehyxf
 
Top profile Call Girls In Mau [ 7014168258 ] Call Me For Genuine Models We ar...
Top profile Call Girls In Mau [ 7014168258 ] Call Me For Genuine Models We ar...Top profile Call Girls In Mau [ 7014168258 ] Call Me For Genuine Models We ar...
Top profile Call Girls In Mau [ 7014168258 ] Call Me For Genuine Models We ar...
nirzagarg
 
怎样办理巴斯大学毕业证(Bath毕业证书)成绩单留信认证
怎样办理巴斯大学毕业证(Bath毕业证书)成绩单留信认证怎样办理巴斯大学毕业证(Bath毕业证书)成绩单留信认证
怎样办理巴斯大学毕业证(Bath毕业证书)成绩单留信认证
eeanqy
 
怎样办理伯明翰城市大学毕业证(BCU毕业证书)成绩单留信认证
怎样办理伯明翰城市大学毕业证(BCU毕业证书)成绩单留信认证怎样办理伯明翰城市大学毕业证(BCU毕业证书)成绩单留信认证
怎样办理伯明翰城市大学毕业证(BCU毕业证书)成绩单留信认证
eeanqy
 
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
awasv46j
 
How to Build a Simple Shopify Website
How to Build a Simple Shopify WebsiteHow to Build a Simple Shopify Website
How to Build a Simple Shopify Website
mark11275
 
Top profile Call Girls In Meerut [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Meerut [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Meerut [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Meerut [ 7014168258 ] Call Me For Genuine Models We...
gajnagarg
 

Recently uploaded (20)

Furniture & Joinery Details_Designs.pptx
Furniture & Joinery Details_Designs.pptxFurniture & Joinery Details_Designs.pptx
Furniture & Joinery Details_Designs.pptx
 
Sweety Planet Packaging Design Process Book.pptx
Sweety Planet Packaging Design Process Book.pptxSweety Planet Packaging Design Process Book.pptx
Sweety Planet Packaging Design Process Book.pptx
 
Gamestore case study UI UX by Amgad Ibrahim
Gamestore case study UI UX by Amgad IbrahimGamestore case study UI UX by Amgad Ibrahim
Gamestore case study UI UX by Amgad Ibrahim
 
一比一定(购)卡尔顿大学毕业证(CU毕业证)成绩单学位证
一比一定(购)卡尔顿大学毕业证(CU毕业证)成绩单学位证一比一定(购)卡尔顿大学毕业证(CU毕业证)成绩单学位证
一比一定(购)卡尔顿大学毕业证(CU毕业证)成绩单学位证
 
Top profile Call Girls In Mysore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Mysore [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Mysore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Mysore [ 7014168258 ] Call Me For Genuine Models We...
 
一比一原版(ANU毕业证书)澳大利亚国立大学毕业证原件一模一样
一比一原版(ANU毕业证书)澳大利亚国立大学毕业证原件一模一样一比一原版(ANU毕业证书)澳大利亚国立大学毕业证原件一模一样
一比一原版(ANU毕业证书)澳大利亚国立大学毕业证原件一模一样
 
一比一定(购)西悉尼大学毕业证(WSU毕业证)成绩单学位证
一比一定(购)西悉尼大学毕业证(WSU毕业证)成绩单学位证一比一定(购)西悉尼大学毕业证(WSU毕业证)成绩单学位证
一比一定(购)西悉尼大学毕业证(WSU毕业证)成绩单学位证
 
Q4-Trends-Networks-Module-3.pdfqquater days sheets123456789
Q4-Trends-Networks-Module-3.pdfqquater days sheets123456789Q4-Trends-Networks-Module-3.pdfqquater days sheets123456789
Q4-Trends-Networks-Module-3.pdfqquater days sheets123456789
 
怎样办理莫纳什大学毕业证(Monash毕业证书)成绩单留信认证
怎样办理莫纳什大学毕业证(Monash毕业证书)成绩单留信认证怎样办理莫纳什大学毕业证(Monash毕业证书)成绩单留信认证
怎样办理莫纳什大学毕业证(Monash毕业证书)成绩单留信认证
 
Top profile Call Girls In Mau [ 7014168258 ] Call Me For Genuine Models We ar...
Top profile Call Girls In Mau [ 7014168258 ] Call Me For Genuine Models We ar...Top profile Call Girls In Mau [ 7014168258 ] Call Me For Genuine Models We ar...
Top profile Call Girls In Mau [ 7014168258 ] Call Me For Genuine Models We ar...
 
怎样办理巴斯大学毕业证(Bath毕业证书)成绩单留信认证
怎样办理巴斯大学毕业证(Bath毕业证书)成绩单留信认证怎样办理巴斯大学毕业证(Bath毕业证书)成绩单留信认证
怎样办理巴斯大学毕业证(Bath毕业证书)成绩单留信认证
 
Abortion pills in Riyadh +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Riyadh +966572737505 <> buy cytotec <> unwanted kit Saudi A...Abortion pills in Riyadh +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Riyadh +966572737505 <> buy cytotec <> unwanted kit Saudi A...
 
怎样办理伯明翰城市大学毕业证(BCU毕业证书)成绩单留信认证
怎样办理伯明翰城市大学毕业证(BCU毕业证书)成绩单留信认证怎样办理伯明翰城市大学毕业证(BCU毕业证书)成绩单留信认证
怎样办理伯明翰城市大学毕业证(BCU毕业证书)成绩单留信认证
 
Pondicherry Escorts Service Girl ^ 9332606886, WhatsApp Anytime Pondicherry
Pondicherry Escorts Service Girl ^ 9332606886, WhatsApp Anytime PondicherryPondicherry Escorts Service Girl ^ 9332606886, WhatsApp Anytime Pondicherry
Pondicherry Escorts Service Girl ^ 9332606886, WhatsApp Anytime Pondicherry
 
Call Girls Jalaun Just Call 8617370543 Top Class Call Girl Service Available
Call Girls Jalaun Just Call 8617370543 Top Class Call Girl Service AvailableCall Girls Jalaun Just Call 8617370543 Top Class Call Girl Service Available
Call Girls Jalaun Just Call 8617370543 Top Class Call Girl Service Available
 
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
一比一原版(WLU毕业证)罗瑞尔大学毕业证成绩单留信学历认证原版一模一样
 
Independent Escorts Goregaon WhatsApp +91-9930687706, Best Service
Independent Escorts Goregaon WhatsApp +91-9930687706, Best ServiceIndependent Escorts Goregaon WhatsApp +91-9930687706, Best Service
Independent Escorts Goregaon WhatsApp +91-9930687706, Best Service
 
How to Turn a Picture Into a Line Drawing in Photoshop
How to Turn a Picture Into a Line Drawing in PhotoshopHow to Turn a Picture Into a Line Drawing in Photoshop
How to Turn a Picture Into a Line Drawing in Photoshop
 
How to Build a Simple Shopify Website
How to Build a Simple Shopify WebsiteHow to Build a Simple Shopify Website
How to Build a Simple Shopify Website
 
Top profile Call Girls In Meerut [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Meerut [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Meerut [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Meerut [ 7014168258 ] Call Me For Genuine Models We...
 

Arduino Workshop 2011.05.31

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26. void setup() { // initialize the digital pin as an output. // Pin 13 has an LED connected on most Arduino boards: pinMode(13, OUTPUT); } void loop() { digitalWrite(13, HIGH); // set the LED on delay(1000); // wait for a second digitalWrite(13, LOW); // set the LED off delay(1000); // wait for a second }
  • 27. void setup() { // initialize the digital pin as an output. // Pin 13 has an LED connected on most Arduino boards: pinMode(13, OUTPUT); } void loop() { digitalWrite(13, HIGH); // set the LED on delay(1000); // wait for a second digitalWrite(13, LOW); // set the LED off delay(1000); // wait for a second }
  • 28.
  • 29.
  • 30. int brightness = 0; int fadeAmount = 5; void setup() { pinMode(9, OUTPUT); } void loop() { // set the brightness of pin 9: analogWrite(9, brightness); brightness = brightness + fadeAmount; if (brightness == 0 || brightness == 255) { fadeAmount = -fadeAmount ; } delay(30); }
  • 31.
  • 32.
  • 33.
  • 34.
  • 35. const int buttonPin = 2; const int ledPin = 13; int buttonState = 0; void setup() { pinMode(ledPin, OUTPUT); pinMode(buttonPin, INPUT); } void loop(){ // read the state of the pushbutton value: buttonState = digitalRead(buttonPin); if (buttonState == HIGH) { digitalWrite(ledPin, HIGH); } else { digitalWrite(ledPin, LOW); } }
  • 36.
  • 37.
  • 38.
  • 39.
  • 40. const int sensorPin = A0; const int ledPin = 9; void setup() { pinMode(ledPin, OUTPUT); } void loop() { // read the value from the sensor: int sensorValue = analogRead(sensorPin); // scale from 0-1023 to 0-255 int intensity = map(sensorValue, 0, 1023, 0, 255); // sets the value analogWrite(ledPin, intensity); }
  • 41.
  • 42.
  • 43.
  • 44. const int ledPin = 9; void setup() { // initialize the serial communication: Serial.begin(9600); pinMode(ledPin, OUTPUT); } void loop() { byte brightness; // check if data has been sent from the computer: if (Serial.available()) { // read the most recent byte (0-255) brightness = Serial.read(); // set the brightness of the LED: analogWrite(ledPin, brightness); } }
  • 45. import processing.serial.*; Serial port; void setup() { size(256, 150); // Print available serial ports println(Serial.list()); port = new Serial(this, "COM1", 9600); } void draw() { // draw a gradient from black to white ... // send the current X-position of the mouse port.write(mouseX); }