SlideShare a Scribd company logo
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
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
}
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
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);
}
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
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);
    }
}
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
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);
}
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
Arduino Workshop 2011.05.31
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

PDF
Programming arduino makeymakey
PDF
The IoT Academy IoT Training Arduino Part 3 programming
PDF
Arduino workshop
PDF
Arduino: Analog I/O
PPTX
Arduino programming
PDF
Etapes fab-venti-v2
PPTX
LED Cube Presentation Slides
PPTX
Arduino Programming
Programming arduino makeymakey
The IoT Academy IoT Training Arduino Part 3 programming
Arduino workshop
Arduino: Analog I/O
Arduino programming
Etapes fab-venti-v2
LED Cube Presentation Slides
Arduino Programming

What's hot (20)

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

Viewers also liked (11)

PDF
平成23年度メディア芸術部門会議
PDF
Make:r × Maker - 0th Exhibition
PDF
111125 ものづくりオープンメソッドiamas・岐阜高専連携講座 takawo
PDF
「Makerムーブメント」の時代におけるデザイン言語
PDF
iBeaconハッカソン
PDF
20131026 i beaconワークショップ
PDF
フィジカルコンピューティングとその可能性
PDF
IAMAS 2010 First presentation
PDF
IAMAS Innovation Studio Opening 2013.04.19
PDF
「Makerムーブメント」の時代におけるdesign、学び、産業
PDF
2013 Maker Meetup Taipei
平成23年度メディア芸術部門会議
Make:r × Maker - 0th Exhibition
111125 ものづくりオープンメソッドiamas・岐阜高専連携講座 takawo
「Makerムーブメント」の時代におけるデザイン言語
iBeaconハッカソン
20131026 i beaconワークショップ
フィジカルコンピューティングとその可能性
IAMAS 2010 First presentation
IAMAS Innovation Studio Opening 2013.04.19
「Makerムーブメント」の時代におけるdesign、学び、産業
2013 Maker Meetup Taipei
Ad

Similar to Arduino Workshop 2011.05.31 (20)

PDF
Arduino: Intro and Digital I/O
PDF
L6 Visual Output LED_7SEGMEN_LEDMATRIX upate.pdf
PDF
L6 Visual Output LED_7SEGMEN_LEDMATRIX upate.pdf
PDF
Introduction to Arduino and Circuits
PDF
LinnStrument : the ultimate open-source hacker instrument
PDF
Arduino Lecture 4 - Interactive Media CS4062 Semester 2 2009
PPTX
Introduction to arduino Programming with
PDF
publish manual
PDF
From Arduino to LinnStrument
PPTX
Arduino by bishal bhattarai IOE, Pashchimanchal Campus Pokhara, Nepal
DOCX
Lab_5.txt.rtfLab_05Design an application that reads the .docx
PPT
01 Intro to the Arduino and it's basics.ppt
PDF
What will be quantization step size in numbers and in voltage for th.pdf
PPTX
Sensors and Actuators in Arduino, Introduction
PDF
Arduino and Robotics
PPTX
R tist
PPTX
Mims effect
PPTX
Arduino Foundations
PPTX
Fun with arduino
PDF
Arduino: Arduino para dummies 2 edición por Wiley Brand parte 2
Arduino: Intro and Digital I/O
L6 Visual Output LED_7SEGMEN_LEDMATRIX upate.pdf
L6 Visual Output LED_7SEGMEN_LEDMATRIX upate.pdf
Introduction to Arduino and Circuits
LinnStrument : the ultimate open-source hacker instrument
Arduino Lecture 4 - Interactive Media CS4062 Semester 2 2009
Introduction to arduino Programming with
publish manual
From Arduino to LinnStrument
Arduino by bishal bhattarai IOE, Pashchimanchal Campus Pokhara, Nepal
Lab_5.txt.rtfLab_05Design an application that reads the .docx
01 Intro to the Arduino and it's basics.ppt
What will be quantization step size in numbers and in voltage for th.pdf
Sensors and Actuators in Arduino, Introduction
Arduino and Robotics
R tist
Mims effect
Arduino Foundations
Fun with arduino
Arduino: Arduino para dummies 2 edición por Wiley Brand parte 2

More from Shigeru Kobayashi (20)

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

Recently uploaded (20)

PPTX
Wisp Textiles: Where Comfort Meets Everyday Style
PDF
Emailing DDDX-MBCaEiB.pdf DDD_Europe_2022_Intro_to_Context_Mapping_pdf-165590...
PPTX
YV PROFILE PROJECTS PROFILE PRES. DESIGN
PDF
SEVA- Fashion designing-Presentation.pdf
PPTX
Special finishes, classification and types, explanation
PPT
Machine printing techniques and plangi dyeing
PDF
GREEN BUILDING MATERIALS FOR SUISTAINABLE ARCHITECTURE AND BUILDING STUDY
PPTX
AC-Unit1.pptx CRYPTOGRAPHIC NNNNFOR ALL
DOCX
The story of the first moon landing.docx
PDF
UNIT 1 Introduction fnfbbfhfhfbdhdbdto Java.pptx.pdf
PPTX
Fundamental Principles of Visual Graphic Design.pptx
DOCX
actividad 20% informatica microsoft project
PPTX
6- Architecture design complete (1).pptx
PDF
Trusted Executive Protection Services in Ontario — Discreet & Professional.pdf
PPT
UNIT I- Yarn, types, explanation, process
PDF
BRANDBOOK-Presidential Award Scheme-Kenya-2023
PDF
Phone away, tabs closed: No multitasking
PPTX
ANATOMY OF ANTERIOR CHAMBER ANGLE AND GONIOSCOPY.pptx
PPT
EGWHermeneuticsffgggggggggggggggggggggggggggggggg.ppt
PPTX
joggers park landscape assignment bandra
Wisp Textiles: Where Comfort Meets Everyday Style
Emailing DDDX-MBCaEiB.pdf DDD_Europe_2022_Intro_to_Context_Mapping_pdf-165590...
YV PROFILE PROJECTS PROFILE PRES. DESIGN
SEVA- Fashion designing-Presentation.pdf
Special finishes, classification and types, explanation
Machine printing techniques and plangi dyeing
GREEN BUILDING MATERIALS FOR SUISTAINABLE ARCHITECTURE AND BUILDING STUDY
AC-Unit1.pptx CRYPTOGRAPHIC NNNNFOR ALL
The story of the first moon landing.docx
UNIT 1 Introduction fnfbbfhfhfbdhdbdto Java.pptx.pdf
Fundamental Principles of Visual Graphic Design.pptx
actividad 20% informatica microsoft project
6- Architecture design complete (1).pptx
Trusted Executive Protection Services in Ontario — Discreet & Professional.pdf
UNIT I- Yarn, types, explanation, process
BRANDBOOK-Presidential Award Scheme-Kenya-2023
Phone away, tabs closed: No multitasking
ANATOMY OF ANTERIOR CHAMBER ANGLE AND GONIOSCOPY.pptx
EGWHermeneuticsffgggggggggggggggggggggggggggggggg.ppt
joggers park landscape assignment bandra

Arduino Workshop 2011.05.31

  • 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 }
  • 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); }
  • 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); } }
  • 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); }
  • 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); }