반응형
블로그 이미지
개발자로서 현장에서 일하면서 새로 접하는 기술들이나 알게된 정보 등을 정리하기 위한 블로그입니다. 운 좋게 미국에서 큰 회사들의 프로젝트에서 컬설턴트로 일하고 있어서 새로운 기술들을 접할 기회가 많이 있습니다. 미국의 IT 프로젝트에서 사용되는 툴들에 대해 많은 분들과 정보를 공유하고 싶습니다.
솔웅

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

글 보관함

카테고리

[Arduino] Motion Sensor and Water Level Sensor

2017. 1. 17. 07:56 | Posted by 솔웅


반응형

더 재밌게 놀기 연구소



※ Motion Seosor (HC-SR501)



Data sheet :

HC-SR501_Datasheet.pdf



Motion sensor will work without Arduino

When the sensor detects motion, the output pin will go "high"


* Using Arduino


Circuit



Source Code


//www.elegoo.com
//2016.06.13

/*
 * PIR sensor tester
 */
 
int ledPin = 13;                // choose the pin for the LED
int inputPin = 7;               // choose the input pin (for PIR sensor)
int pirState = LOW;             // we start, assuming no motion detected
int val = 0;                    // variable for reading the pin status
 
void setup() {
  pinMode(ledPin, OUTPUT);      // declare LED as output
  pinMode(inputPin, INPUT);     // declare sensor as input
 
  Serial.begin(9600);
}
 
void loop(){
  val = digitalRead(inputPin);  // read input value
  if (val == HIGH) {            // check if the input is HIGH
    digitalWrite(ledPin, HIGH);  // turn LED ON
    if (pirState == LOW) {
      // we have just turned on
      Serial.println("Motion detected!");
      // We only want to print on the output change, not state
      pirState = HIGH;
    }
  } else {
    digitalWrite(ledPin, LOW); // turn LED OFF
    if (pirState == HIGH){
      // we have just turned of
      Serial.println("Motion ended!");
      // We only want to print on the output change, not state
      pirState = LOW;
    }
  }
}


Result





※ Water Level Sensor


Circuit



Source Code


//www.elegoo.com
//2016.06.13

int adc_id = 0;
int HistoryValue = 0;
char printBuffer[128];

void setup()
{
  Serial.begin(9600);
}

void loop()
{
    int value = analogRead(adc_id); // get adc value

    if(((HistoryValue>=value) && ((HistoryValue - value) > 10)) || ((HistoryValue<value) && ((value - HistoryValue) > 10)))
    {
      sprintf(printBuffer,"ADC%d level is %d\n",adc_id, value);
      Serial.print(printBuffer);
      HistoryValue = value;
    }
}


Result













반응형


반응형

더 재밌게 놀기 연구소


※ Joystick


Circuit



Source Code


//www.elegoo.com
//2016.06.13

// Arduino pin numbers
const int SW_pin = 2; // digital pin connected to switch output
const int X_pin = 0; // analog pin connected to X output
const int Y_pin = 1; // analog pin connected to Y output

void setup() {
  pinMode(SW_pin, INPUT);
  digitalWrite(SW_pin, HIGH);
  Serial.begin(9600);
}

void loop() {
  Serial.print("Switch:  ");
  Serial.print(digitalRead(SW_pin));
  Serial.print("\n");
  Serial.print("X-axis: ");
  Serial.print(analogRead(X_pin));
  Serial.print("\n");
  Serial.print("Y-axis: ");
  Serial.println(analogRead(Y_pin));
  Serial.print("\n\n");
  delay(500);
}


Result






※ MAX7219 LED Dot Matrix Module


Circuit



Add this Library

LedControl.zip



Source Code


//www.elegoo.com
//2016.11.5

//We always have to include the library
#include "LedControl.h"

/*
 Now we need a LedControl to work with.
 ***** These pin numbers will probably not work with your hardware *****
 pin 12 is connected to the DataIn
 pin 11 is connected to the CLK
 pin 10 is connected to LOAD
 We have only a single MAX72XX.
 */
LedControl lc=LedControl(12,11,10,1);

/* we always wait a bit between updates of the display */
unsigned long delaytime1=500;
unsigned long delaytime2=50;
void setup() {
  /*
   The MAX72XX is in power-saving mode on startup,
   we have to do a wakeup call
   */
  lc.shutdown(0,false);
  /* Set the brightness to a medium values */
  lc.setIntensity(0,8);
  /* and clear the display */
  lc.clearDisplay(0);
}

/*
 This method will display the characters for the
 word "Arduino" one after the other on the matrix.
 (you need at least 5x7 leds to see the whole chars)
 */
void writeArduinoOnMatrix() {
  /* here is the data for the characters */
  byte a[5]={B01111110,B10001000,B10001000,B10001000,B01111110};
  byte r[5]={B00010000,B00100000,B00100000,B00010000,B00111110};
  byte d[5]={B11111110,B00010010,B00100010,B00100010,B00011100};
  byte u[5]={B00111110,B00000100,B00000010,B00000010,B00111100};
  byte i[5]={B00000000,B00000010,B10111110,B00100010,B00000000};
  byte n[5]={B00011110,B00100000,B00100000,B00010000,B00111110};
  byte o[5]={B00011100,B00100010,B00100010,B00100010,B00011100};

  /* now display them one by one with a small delay */
  lc.setRow(0,0,a[0]);
  lc.setRow(0,1,a[1]);
  lc.setRow(0,2,a[2]);
  lc.setRow(0,3,a[3]);
  lc.setRow(0,4,a[4]);
  delay(delaytime1);
  lc.setRow(0,0,r[0]);
  lc.setRow(0,1,r[1]);
  lc.setRow(0,2,r[2]);
  lc.setRow(0,3,r[3]);
  lc.setRow(0,4,r[4]);
  delay(delaytime1);
  lc.setRow(0,0,d[0]);
  lc.setRow(0,1,d[1]);
  lc.setRow(0,2,d[2]);
  lc.setRow(0,3,d[3]);
  lc.setRow(0,4,d[4]);
  delay(delaytime1);
  lc.setRow(0,0,u[0]);
  lc.setRow(0,1,u[1]);
  lc.setRow(0,2,u[2]);
  lc.setRow(0,3,u[3]);
  lc.setRow(0,4,u[4]);
  delay(delaytime1);
  lc.setRow(0,0,i[0]);
  lc.setRow(0,1,i[1]);
  lc.setRow(0,2,i[2]);
  lc.setRow(0,3,i[3]);
  lc.setRow(0,4,i[4]);
  delay(delaytime1);
  lc.setRow(0,0,n[0]);
  lc.setRow(0,1,n[1]);
  lc.setRow(0,2,n[2]);
  lc.setRow(0,3,n[3]);
  lc.setRow(0,4,n[4]);
  delay(delaytime1);
  lc.setRow(0,0,o[0]);
  lc.setRow(0,1,o[1]);
  lc.setRow(0,2,o[2]);
  lc.setRow(0,3,o[3]);
  lc.setRow(0,4,o[4]);
  delay(delaytime1);
  lc.setRow(0,0,0);
  lc.setRow(0,1,0);
  lc.setRow(0,2,0);
  lc.setRow(0,3,0);
  lc.setRow(0,4,0);
  delay(delaytime1);
}

/*
  This function lights up a some Leds in a row.
 The pattern will be repeated on every row.
 The pattern will blink along with the row-number.
 row number 4 (index==3) will blink 4 times etc.
 */
void rows() {
  for(int row=0;row<8;row++) {
    delay(delaytime2);
    lc.setRow(0,row,B10100000);
    delay(delaytime2);
    lc.setRow(0,row,(byte)0);
    for(int i=0;i<row;i++) {
      delay(delaytime2);
      lc.setRow(0,row,B10100000);
      delay(delaytime2);
      lc.setRow(0,row,(byte)0);
    }
  }
}

/*
  This function lights up a some Leds in a column.
 The pattern will be repeated on every column.
 The pattern will blink along with the column-number.
 column number 4 (index==3) will blink 4 times etc.
 */
void columns() {
  for(int col=0;col<8;col++) {
    delay(delaytime2);
    lc.setColumn(0,col,B10100000);
    delay(delaytime2);
    lc.setColumn(0,col,(byte)0);
    for(int i=0;i<col;i++) {
      delay(delaytime2);
      lc.setColumn(0,col,B10100000);
      delay(delaytime2);
      lc.setColumn(0,col,(byte)0);
    }
  }
}

/*
 This function will light up every Led on the matrix.
 The led will blink along with the row-number.
 row number 4 (index==3) will blink 4 times etc.
 */
void single() {
  for(int row=0;row<8;row++) {
    for(int col=0;col<8;col++) {
      delay(delaytime2);
      lc.setLed(0,row,col,true);
      delay(delaytime2);
      for(int i=0;i<col;i++) {
        lc.setLed(0,row,col,false);
        delay(delaytime2);
        lc.setLed(0,row,col,true);
        delay(delaytime2);
      }
    }
  }
}

void loop() {
  writeArduinoOnMatrix();
  rows();
  columns();
  single();
}



※ ADXL335 Module


Circuit




Source Code


//www.elegoo.com
//2016.06.13

int x, y, z;
int a1 = A0;
int a2 = A1;
int a3 = A2;
void setup()
{
  pinMode(a1,INPUT);
  pinMode(a2,INPUT);
  pinMode(a3,INPUT);
  Serial.begin(9600);  
}
void loop()
{
  x = analogRead(a1);    
  y = analogRead(a2);    
  z = analogRead(a3);    
  Serial.print("x:  ");
  Serial.print(x, DEC); 
  Serial.print(" ");
 Serial.print("y:  ");
  Serial.print(y, DEC);  
  Serial.print(" ");
 Serial.print("z:  ");
  Serial.println(z, DEC);
  delay(100);           
}


Result




반응형


반응형

더 재밌게 놀기 연구소


※ Ultrasonic Sensor (external library)


Circuit



Add zip library to include it in the source code.

HC-SR04_Library.zip


=> This NewPing library converts ping time to distance and print result.



Source Code


//www.elegoo.com
//2016.06.13

#include <NewPing.h>

#define TRIGGER_PIN  12  // Arduino pin tied to trigger pin on the ultrasonic sensor.
#define ECHO_PIN     11  // Arduino pin tied to echo pin on the ultrasonic sensor.
#define MAX_DISTANCE 200 // Maximum distance we want to ping for (in centimeters). Maximum sensor distance is rated at 400-500cm.

NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); // NewPing setup of pins and maximum distance.

void setup() {
  Serial.begin(9600); // Open serial monitor at 115200 baud to see ping results.
}

void loop() {
  delay(500);  // Wait 500ms between pings (about 2 pings/sec). 29ms should be the shortest delay between pings.
  unsigned int uS = sonar.ping(); // Send ping, get ping time in microseconds (uS).
  Serial.print("Ping: ");
  Serial.print(uS / US_ROUNDTRIP_CM); // Convert ping time to distance and print result (0 = outside set distance range, no ping echo)
  Serial.println("cm");
}


==> Result






※ Membrane switch (Keypad)


Circuit




Download and add KeyPad Library


http://playground.arduino.cc/Code/Keypad



Source Code


//www.elegoo.com
//2016.06.13

/* @file CustomKeypad.pde
|| @version 1.0
|| @author Alexander Brevig
|| @contact alexanderbrevig@gmail.com
||
|| @description
|| | Demonstrates changing the keypad size and key values.
|| #
*/
#include <Keypad.h>

const byte ROWS = 4; //four rows
const byte COLS = 4; //four columns
//define the cymbols on the buttons of the keypads
char hexaKeys[ROWS][COLS] = {
  {'1','2','3','A'},
  {'4','5','6','B'},
  {'7','8','9','C'},
  {'*','0','#','D'}
};
byte rowPins[ROWS] = {9, 8, 7, 6}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {5, 4, 3, 2}; //connect to the column pinouts of the keypad

//initialize an instance of class NewKeypad
Keypad customKeypad = Keypad( makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS);

void setup(){
  Serial.begin(9600);
}
 
void loop(){
  char customKey = customKeypad.getKey();
 
  if (customKey){
    Serial.println(customKey);
  }
}


==> Result : If you press any button then the value of the button will be display








※ Temperature and Humidity Sensor


Circuit


add SimpleDHT library


SimpleDHT.zip



Source Code


//www.elegoo.com
//2016.06.13

#include <SimpleDHT.h>

// for DHT11,
//      VCC: 5V or 3V
//      GND: GND
//      DATA: 2
int pinDHT11 = 2;
SimpleDHT11 dht11;

void setup() {
  Serial.begin(9600);
}

void loop() {
  // start working...
  Serial.println("=================================");
  Serial.println("Sample DHT11...");
 
  // read with raw sample data.
  byte temperature = 0;
  byte humidity = 0;
  byte data[40] = {0};
  if (dht11.read(pinDHT11, &temperature, &humidity, data)) {
    Serial.print("Read DHT11 failed");
    return;
  }
 
  Serial.print("Sample RAW Bits: ");
  for (int i = 0; i < 40; i++) {
    Serial.print((int)data[i]);
    if (i > 0 && ((i + 1) % 4) == 0) {
      Serial.print(' ');
    }
  }
  Serial.println("");
 
  Serial.print("Sample OK: ");
  Serial.print((int)temperature); Serial.print(" *C, ");
  Serial.print((int)humidity); Serial.println(" %");
 
  // DHT11 sampling rate is 1HZ.
  delay(1000);
}


==> Result



반응형

[Arduino] 7 Segment, Servo, LCD and Thermometer

2017. 1. 14. 21:38 | Posted by 솔웅


반응형

더 재밌게 놀기 연구소



※ Four 7 digital segment with 74 HC595


Circuit

Source Code


int latch=9;  //74HC595  pin 12 STCP
int clock=10; //74HC595  pin 11 SHCP
int data=8;   //74HC595  pin 14 DS

unsigned char table[]=
{0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c
,0x39,0x5e,0x79,0x71,0x00};

void setup() {
  pinMode(latch,OUTPUT);
  pinMode(clock,OUTPUT);
  pinMode(data,OUTPUT);
}
void Display(unsigned char num)
{

  digitalWrite(latch,LOW);
  shiftOut(data,clock,MSBFIRST,table[num]);
  digitalWrite(latch,HIGH);
 
}
void loop() {
  Display(1);
  delay(500);
  Display(2);
  delay(500);
  Display(3);
  delay(500);
  Display(4);
  delay(500);
  Display(5);
  delay(500);
  Display(6);
  delay(500);
  Display(7);
  delay(500);
  Display(8);
  delay(500);
  Display(9);
  delay(500);
  Display(10);
  delay(500);
  Display(11);
  delay(500);
  Display(12);
  delay(500);
  Display(13);
  delay(500);
  Display(14);
  delay(500);
  Display(15);
  delay(500);
}



※ Servo Motor


Circuit




Source Code


//www.elegoo.com
//2016.06.13
/************************************************/
#include <Servo.h>
/************************************************/
Servo myservo;//create servo object to control a servo
/************************************************/
void setup()
{
  myservo.attach(9);//attachs the servo on pin 9 to servo object
  myservo.write(0);//back to 0 degrees
  delay(1000);//wait for a second
}
/*************************************************/
void loop()

  myservo.write(15);//goes to 15 degrees
  delay(1000);//wait for a second
  myservo.write(30);//goes to 30 degrees
  delay(1000);//wait for a second.33
  myservo.write(45);//goes to 45 degrees
  delay(1000);//wait for a second.33
  myservo.write(60);//goes to 60 degrees
  delay(1000);//wait for a second.33
  myservo.write(75);//goes to 75 degrees
  delay(1000);//wait for a second.33
  myservo.write(90);//goes to 90 degrees
  delay(1000);//wait for a second
  myservo.write(75);//back to 75 degrees
  delay(1000);//wait for a second.33
  myservo.write(60);//back to 60 degrees
  delay(1000);//wait for a second.33
  myservo.write(45);//back to 45 degrees
  delay(1000);//wait for a second.33
  myservo.write(30);//back to 30 degrees
  delay(1000);//wait for a second.33
  myservo.write(15);//back to 15 degrees
  delay(1000);//wait for a second
  myservo.write(0);//back to 0 degrees
  delay(1000);//wait for a second
}
/**************************************************/





※ LCD


Circuit




Source Code


//www.elegoo.com
//2016.06.13

/*
  LiquidCrystal Library - Hello World

 Demonstrates the use a 16x2 LCD display.  The LiquidCrystal
 library works with all LCD displays that are compatible with the
 Hitachi HD44780 driver. There are many of them out there, and you
 can usually tell them by the 16-pin interface.

 This sketch prints "Hello World!" to the LCD
 and shows the time.

  The circuit:
 * LCD RS pin to digital pin 7
 * LCD Enable pin to digital pin 8
 * LCD D4 pin to digital pin 9
 * LCD D5 pin to digital pin 10
 * LCD D6 pin to digital pin 11
 * LCD D7 pin to digital pin 12
 * LCD R/W pin to ground
 * LCD VSS pin to ground
 * LCD VCC pin to 5V
 * 10K resistor:
 * ends to +5V and ground
 * wiper to LCD VO pin (pin 3)

 Library originally added 18 Apr 2008
 by David A. Mellis
 library modified 5 Jul 2009
 by Limor Fried (http://www.ladyada.net)
 example added 9 Jul 2009
 by Tom Igoe
 modified 22 Nov 2010
 by Tom Igoe

 This example code is in the public domain.

 http://www.arduino.cc/en/Tutorial/LiquidCrystal
 */

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("hello, world!");
}

void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  lcd.print(millis() / 1000);
}





※ LCD with Thermometer


Circuit



Source Code


//www.elegoo.com
//2016.06.13

/*
Adafruit Arduino - Lesson 12. Light and Temperature
*/

#include <LiquidCrystal.h>

int tempPin = 0;
int lightPin = 1;

//                BS  E  D4 D5  D6 D7
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);

void setup()
{
  lcd.begin(16, 2);
}

void loop()
{
  // Display Temperature in C
  int tempReading = analogRead(tempPin);
  float tempVolts = tempReading * 5.0 / 1024.0;
  float tempC = (tempVolts - 0.5) * 100.0;
  float tempF = tempC * 9.0 / 5.0 + 32.0;
  //         ----------------
  lcd.print("Temp         F  ");
  lcd.setCursor(6, 0);
  lcd.print(tempF);
 
  // Display Light on second row
  int lightReading = analogRead(lightPin);
  lcd.setCursor(0, 1);
  //         ----------------
  lcd.print("Light           "); 
  lcd.setCursor(6, 1);
  lcd.print(lightReading);
  delay(500);
}


반응형


반응형




The 74HC595; 74HCT595 is an 8-bit serial-in/serial or parallel-out shift register with a storage register and 3-state outputs. Both th e shift and storage register have separate clocks. The device features a serial input (DS) and a serial output (Q7S) to enable cascading and an asynchronous reset MR input. A LOW on MR will reset the shift register.
Data is shifted on the LOW-to-HIGH transitions of the SHCP input. The data in the shift register is transferred to the storage register on a LOW-to-HIGH transition of the STCP input. If both clocks are connected together, the shift register will always be one clock pulse ahead of the storage register. Data in the storage register appears at the output whenever the output enable input (OE) is LOW. A HIGH on OE causes the outputs to assume a high-impedance OFF-state. Operation of the OE input does not affect the state of the registers. Inputs include clamp diodes. This enables the use of current limiting resistors to interface inputs to voltages in excess of VCC




Display 0~9 and A~E on a 7-segment


Circuit




Source Code 1


const int clockPin = 8; //SH
const int latchPin = 9; //ST
const int dataPin = 10; // DS

const byte seg[10] = {0b00000000, 0b00000001,0b00000010,0b00000100,
                    0b00001000,0b00010000,0b00100000,0b01000000,
                    0b10000000,0b1111111};
const byte digits[17] = {
  0b01110111, //0
  0b00000110, //1
  0b10110011, //2
  0b10010111, //3
  0b11000110, //4
  0b11010101, //5
  0b11110101, //6
  0b01000111, //7
  0b11110111, //8
  0b11010111, //9
  0b11100111, //A
  0b11110100, //B
  0b01110001, //C
  0b10110110, //D
  0b11110001, //E
  0b11110001, //F
  0b11111111  //ALL
};


void setup() {
  // put your setup code here, to run once:
  pinMode(clockPin, OUTPUT);
  pinMode(latchPin, OUTPUT);
  pinMode(dataPin, OUTPUT);

}

void LEDs(byte a) {
  digitalWrite(latchPin, LOW);
  shiftOut(dataPin, clockPin, MSBFIRST, a);
  digitalWrite(latchPin, HIGH);
}

void loop() {
  // put your main code here, to run repeatedly:
  for(int i=0; i<10; i++) {
    LEDs(seg[i]);
    delay(500);
  }

  for(int i=0; i<18; i++) {
    LEDs(digits[i]);
    delay(500);
  }
}



Source Code 2


//www.elegoo.com
//2016.06.13

// Lab13 Using a 74hc595 and seven segment display to make reciprocal function
 
// define the LED digit patterns, from 0 - 9
// 1 = LED on, 0 = LED off, in this order:
//                74HC595 pin     Q0,Q1,Q2,Q3,Q4,Q5,Q6,Q7
//                Mapping to      a,b,c,d,e,f,g of Seven-Segment LED
byte seven_seg_digits[10] = { B11111100,  // = 0
                              B01100000,  // = 1
                              B11011010,  // = 2
                              B11110010,  // = 3
                              B01100110,  // = 4
                              B10110110,  // = 5
                              B10111110,  // = 6
                              B11100000,  // = 7
                              B11111110,  // = 8
                              B11100110   // = 9
                             };
 
// connect to the ST_CP of 74HC595 (pin 9,latch pin)
int latchPin = 9;
// connect to the SH_CP of 74HC595 (pin 8, clock pin)
int clockPin = 8;
// connect to the DS of 74HC595 (pin 10)
int dataPin = 10;
 
void setup() {
  // Set latchPin, clockPin, dataPin as output
  pinMode(latchPin, OUTPUT);
  pinMode(clockPin, OUTPUT);
  pinMode(dataPin, OUTPUT);
}
 
// display a number on the digital segment display
void sevenSegWrite(byte digit) {
  // set the latchPin to low potential, before sending data
  digitalWrite(latchPin, LOW);
    
  // the original data (bit pattern)
  shiftOut(dataPin, clockPin, LSBFIRST, seven_seg_digits[digit]); 
 
  // set the latchPin to high potential, after sending data
  digitalWrite(latchPin, HIGH);
}
 
void loop() {      
  // count from 9 to 0
  for (byte digit = 10; digit > 0; --digit) {
    delay(1000);
    sevenSegWrite(digit - 1);
  }
  
  // suspend 4 seconds
  delay(4000);
}





74HC595 with 8 LEDs


Circuit



in my case, I used Arduino Uno and changed the pin numbers.


//by Simon Monk
//www.elegoo.com
//2016.06.13

int latchPin = 9;
int clockPin = 8;
int dataPin = 10;

byte leds = 0;

void setup()
{
  pinMode(latchPin, OUTPUT);
  pinMode(dataPin, OUTPUT);  
  pinMode(clockPin, OUTPUT);
}

void loop()
{
  leds = 0;
  updateShiftRegister();
  delay(500);
  for (int i = 0; i < 8; i++)
  {
    bitSet(leds, i);
    updateShiftRegister();
    delay(500);
  }
}

void updateShiftRegister()
{
   digitalWrite(latchPin, LOW);
   shiftOut(dataPin, clockPin, LSBFIRST, leds);
   digitalWrite(latchPin, HIGH);
}



Use Serial Monitor


Same Circuit as above


Source Code


//by Simon Monk
//www.elegoo.com
//2016.06.13

int latchPin = 9;
int clockPin = 8;
int dataPin = 10;

byte leds = 0;

void setup()
{
  pinMode(latchPin, OUTPUT);
  pinMode(dataPin, OUTPUT); 
  pinMode(clockPin, OUTPUT);
  updateShiftRegister();
  Serial.begin(9600);
  while (! Serial); // Wait untilSerial is ready - Leonardo
  Serial.println("Enter LED Number 0 to 7 or 'x' to clear");
}

void loop()
{
  if (Serial.available())
  {
    char ch = Serial.read();
    if (ch >= '0' && ch <= '7')
    {
      int led = ch - '0';
      bitSet(leds, led);
      updateShiftRegister();
      Serial.print("Turned on LED ");
      Serial.println(led);
    }
    if (ch == 'x')
    {
      leds = 0;
      updateShiftRegister();
      Serial.println("Cleared");
    }
  }
}

void updateShiftRegister()
{
   digitalWrite(latchPin, LOW);
   shiftOut(dataPin, clockPin, LSBFIRST, leds);
   digitalWrite(latchPin, HIGH);
}


==> Type number on the Serial Monitor -> light on the LED of typed number





반응형

[Arduino] Library and RGB LED

2017. 1. 11. 08:18 | Posted by 솔웅


반응형

Libraries


Arduino 소프트웨어에 익숙해지고 내장 함수를 사용할 수 있게 되면 Arduino 기능을 추가 Library 확장  있습니다.

 


Library?

 

Library 센서디스플레이모듈 등에 쉽게 연결할 수있는 코드 모음입니다예를 들어내장  LiquidCrystal Library 사용하면 문자 LCD 디스플레이와 쉽게 대화   있습니다인터넷에 다운로드  수있는 수백 개의 추가 Library 있습니다내장 Library 이러한 추가 Library  일부는 이곳에 가면 보실 수 있습니다. 추가 Library 사용하려면 Library 설치해야합니다.

 


Library 설치 방법

 


Library 관리자 사용


 

Arduino IDE  Library 설치하려면 Library Manager(IDE 버전 1.6.2에서 사용 가능) 사용하면 됩니다.  IDE 열고 "스케치"메뉴를 클릭  다음 Library 포함> Library Manage 클릭하십시오.

 




그런 다음 Library 관리자가 열리고 이미 설치되었거나 설치할 준비가  Library 목록이 표시됩니다. 예제에서는 Bridge Library 설치합니다목록을 스크롤하여 설치하려는 Library 버전을 선택하십시오경우에 따라 Library  버전  사용할  있습니다버전 선택 메뉴가 나타나지 않아도 걱정하지 마세요정상입니다.



 


마지막으로 install 클릭하고 IDE에서  Library 설치할 때까지 기다립니다연결 속도에 따라 다운로드하는  시간이 걸릴  있습니다설치가 끝나면 Installed 태그가 Bridge Library 옆에 나타납니다.  그러면 Library 매니저를 닫을  있습니다.

 


 


이제  Include Library menu에서  Library 찾을  있습니다나만의 Library 추가하려면 github에서 new issue 엽니다.

 

 

.zip Library 가져 오기

 

Library 종종 ZIP 파일 또는 폴더로 배포됩니다폴더의 이름은 Library 이름입니다폴더 안에는.cpp 파일, .h 파일  종종 keywords.txt 파일예제 폴더  Library 필요한 기타 파일이 있습니다.버전 1.0.5부터는 3rd party Library IDE 설치할  있습니다다운로드  Library 압축을 풀지말고 그대로 두십시오.

 

Arduino IDE에서 스케치> Library 포함으로 이동하십시오드롭 다운 목록의 상단에서 ".ZIP Library추가"옵션을 선택하십시오.

 


 


추가하려는 Library 선택하라는 메시지가 나타납니다. .zip 파일의 위치로 이동하여 엽니 .

 


 


스케치> Library 가져 오기 메뉴로 돌아갑니다이제 드롭 다운 메뉴 하단에 Library 표시됩니다.스케치에서 사용할 준비가되었습니다. zip 파일은 Arduino 스케치 디렉토리의 libraries 폴더에서 확장됩니다.

 

참고 : Library 스케치에서 사용할  있지만 IDE restart  때까지 Library 예제가 파일예제에 표시되지 않습니다.

 


Manual Installation

 

Library 설치하려면 먼저 Arduino 응용 프로그램을 종료하십시오그런 다음 Library 포함  ZIP파일의 압축을 푸십시오예를 들어 "ArduinoParty"라는 Library 설치하는 경우 ArduinoParty.zip압축 해제하십시오. ArduinoParty라는 폴더와 ArduinoParty.cpp  ArduinoParty.h 같은 파일이 있어야합니다. (.cpp  .h 파일이 폴더에 없으면 폴더를 만들어야합니다. 경우 "ArduinoParty"라는폴더를 만들어 ZIP 있던 모든 파일로 이동하십시오 ArduinoParty.cpp  ArduinoParty.h 같은 파일).

 

ArduinoParty 폴더를이 폴더 (Library 폴더) 드래그하십시오. Windows에서는 "My Documents \ Arduino \ libraries"라고합니다. Mac 사용자의 경우 "Documents / Arduino / libraries"라고 불릴 것입니다리눅스에서는 스케치북의 "libraries"폴더가됩니다.

 

Arduino Library 폴더는 다음과 같아야합니다 (Windows 경우).

 

  My Documents\Arduino\libraries\ArduinoParty\ArduinoParty.cpp
  My Documents\Arduino\libraries\ArduinoParty\ArduinoParty.h
  My Documents\Arduino\libraries\ArduinoParty\examples
  ....

 

또는 다음과 같이 (Mac  Linux) :

 

  Documents/Arduino/libraries/ArduinoParty/ArduinoParty.cpp
  Documents/Arduino/libraries/ArduinoParty/ArduinoParty.h
  Documents/Arduino/libraries/ArduinoParty/examples
  ....

 

 

 

.cpp  .h 파일보다 많은 파일이있을  있습니다파일이 모두 있는지 확인하십시오. (.cpp  .h 파일을 Library 폴더에 직접 저장하거나 추가 폴더에 중첩  경우 Library 작동하지 않습니다 ( : Documents \ Arduino \ libraries \ ArduinoParty.cpp  Documents \ Arduino \ libraries \ ArduinoParty \ ArduinoParty \ ArduinoParty.cpp 작동하지 않습니다.)

 

Arduino 응용 프로그램을 다시 시작하십시오 Library 소프트웨어의 스케치 -> Library 가져 오기 메뉴 항목에 나타나는지 확인하십시오그게 다야! Library 설치했습니다!

 

 튜토리얼은 Limor Fried 텍스트를 기반으로합니다.

 

Arduino 시작 안내서의 텍스트는 Creative Commons Attribution-ShareAlike 3.0 라이선스 따라 사용이 허가되었습니다가이드의 코드 샘플은 공개 도메인으로 배포됩니다.

 

https://www.arduino.cc/en/reference/libraries



※ RGB LED with Arduino Mega 2560



Circuit




Source Code


//by Simon Monk
//www.elegoo.com
//2016.06.13

// Define Pins
#define RED 3
#define GREEN 5
#define BLUE 6

#define delayTime 10 // fading time between colors


void setup()
{
pinMode(RED, OUTPUT);
pinMode(GREEN, OUTPUT);
pinMode(BLUE, OUTPUT);
digitalWrite(RED, HIGH);
digitalWrite(GREEN, HIGH);
digitalWrite(BLUE, HIGH);
}

// define variables
int redValue;
int greenValue;
int blueValue;


// main loop
void loop()
{
  redValue = 255; // choose a value between 1 and 255 to change the color.
  greenValue = 0;
  blueValue = 0;

  analogWrite(RED, 0);
  delay(1000);

   for(int i = 0; i < 255; i += 1) // fades out red bring green full when i=255
  {
    redValue -= 1;
    greenValue += 1;
    analogWrite(RED, 255 - redValue);
    analogWrite(GREEN, 255 - greenValue);
    delay(delayTime);
  }

  redValue = 0;
  greenValue = 255;
  blueValue = 0;

  for(int i = 0; i < 255; i += 1)  // fades out green bring blue full when i=255
  {
    greenValue -= 1;
    blueValue += 1;
    analogWrite(GREEN, 255 - greenValue);
    analogWrite(BLUE, 255 - blueValue);
    delay(delayTime);
  }

  redValue = 0;
  greenValue = 0;
  blueValue = 255;


  for(int i = 0; i < 255; i += 1)  // fades out blue bring red full when i=255
  {
  redValue += 1;
  blueValue -= 1;
  analogWrite(RED, 255 - redValue);
  analogWrite(BLUE, 255 - blueValue);
  delay(delayTime);
  }
}




반응형

[Arduino] Servo Motor

2017. 1. 10. 09:53 | Posted by 솔웅


반응형


※ Servo Motor


Circuit




Source Code


Include Servo Library



#include <Servo.h>

Servo myservo;
int pos = 0;

void setup() {
  // put your setup code here, to run once:
  myservo.attach(9);
}

void loop() {
  // put your main code here, to run repeatedly:
  for(pos = 0; pos < 180; pos += 1)
  {
    myservo.write(pos);
    delay(15);
  }
}



※ Servo Motor with variable resistor


Circuit


Source Code


#include <Servo.h>

Servo myservo;

void setup() {
  // put your setup code here, to run once:
  myservo.attach(9);
}

void loop() {
  // put your main code here, to run repeatedly:
  myservo.write(map(analogRead(A0),0,1023,0,120));
  delay(15);
}


refer to youtube tutorial (in Korean) : https://www.youtube.com/watch?v=s_B8KYE7xvI&index=10&list=PL0Vl139pNHbe-JlsydLg3NFRk6nC_cC7w



반응형

[Arduino] LCD and 7 Segment

2017. 1. 10. 09:27 | Posted by 솔웅


반응형


※  Control LCD with illuminance sencor



Circuit




Source Code


LiquidCrystal Library. This library allows an Arduino board to control LiquidCrystal displays (LCDs) based on the Hitachi HD44780 (or a compatible) chipset, which is found on most text-based LCDs.


include LiquidCrystal Library.




#include <LiquidCrystal.h>

LiquidCrystal lcd(12,11,2,3,4,5);

void setup() {
  // put your setup code here, to run once:
  lcd.begin(16,2);
  lcd.print("More Fun Life");
  Serial.print("Test");
}

void loop() {
  // put your main code here, to run repeatedly:
  lcd.setCursor(0,1);
  lcd.print(analogRead(A0));
  delay(200);
}


==> Display Illuminance sensor value on LCD



※ Control LCD using ultrasonic sencor


Circuit




Source Code


#include <LiquidCrystal.h>
#define TRIG 8
#define ECHO 9

LiquidCrystal lcd(12,11,2,3,4,5);

void setup() {
  // put your setup code here, to run once:
  pinMode(TRIG, OUTPUT);
  pinMode(ECHO, INPUT);
  lcd.begin(16,2);
}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(TRIG, LOW);
  delayMicroseconds(2);
  digitalWrite(TRIG, HIGH);
  delayMicroseconds(10);
  digitalWrite(TRIG, LOW);

  long distance = pulseIn(ECHO, HIGH)/58.2;
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print(distance);
  lcd.print(" cm");
  delay(200);
}


refer to youtube tutorial (in Korean) : https://www.youtube.com/watch?v=coFwvg_O1q4&index=8&list=PL0Vl139pNHbe-JlsydLg3NFRk6nC_cC7w




7 Segment Anode


7 Segment Cathode




※ 7 Segment



Circuit



Source Code


// Common Anode version
byte digits[10][7] =
{
  {0,0,0,0,0,0,1 }, // display '0'
  {1,0,0,1,1,1,1 }, // display '1'
  {0,0,1,0,0,1,0 }, // display '2'
  {0,0,0,0,1,1,0 }, // display '3'
  {1,0,0,1,1,0,0 }, // display '4'
  {0,1,0,0,1,0,0 }, // display '5'
  {0,1,0,0,0,0,0 }, // display '6'
  {0,0,0,1,1,1,1 }, // display '7'
  {0,0,0,0,0,0,0 }, // display '8'
  {0,0,0,1,1,0,0 }  // display '9'
};

// Common Cathode version
/*
byte digits[10][7] = {
  {1,1,1,1,1,1,0 }, // display '0'
  {0,1,1,0,0,0,0 }, // display '1'
  {1,1,0,1,1,0,1 }, // display '2'
  {1,1,1,1,0,0,1 }, // display '3'
  {0,1,1,0,0,1,1 }, // display '4'
  {1,0,1,1,0,1,1 }, // display '5'
  {1,0,1,1,1,1,1 }, // display '6'
  {1,1,1,0,0,0,0 }, // display '7'
  {1,1,1,1,1,1,1 }, // display '8'
  {1,1,1,0,0,1,1 }  // display '9'
};
*/
void setup() {
  // put your setup code here, to run once:
  for(int i=2;i<10;i++) {
    pinMode(i,OUTPUT);
  }
  digitalWrite(9,HIGH); // turn off DP LED
}

void loop() {
  // put your main code here, to run repeatedly:
  for(int i=0; i<10;i++) {
    delay(1000);
    displayDigit(i);
  }
}

void displayDigit(int num) {
  int pin = 2;
  for(int i=0; i<7; i++) {
    digitalWrite(pin+i, digits[num][i]);
  }
}



※ 7 Segment with buttons


Circuit


Source Code


#define PLUS 11
#define MINUS 12

int digit = 0;

// Common Anode version
byte digits[10][7] =
{
  {0,0,0,0,0,0,1 }, // display '0'
  {1,0,0,1,1,1,1 }, // display '1'
  {0,0,1,0,0,1,0 }, // display '2'
  {0,0,0,0,1,1,0 }, // display '3'
  {1,0,0,1,1,0,0 }, // display '4'
  {0,1,0,0,1,0,0 }, // display '5'
  {0,1,0,0,0,0,0 }, // display '6'
  {0,0,0,1,1,1,1 }, // display '7'
  {0,0,0,0,0,0,0 }, // display '8'
  {0,0,0,1,1,0,0 }  // display '9'
};

void setup() {
  // put your setup code here, to run once:
  pinMode(PLUS,INPUT);
  pinMode(MINUS, INPUT);

  for(int i=2;i<10;i++) {
    pinMode(i,OUTPUT);
  }
  digitalWrite(9,HIGH); // turn off DP LED
}

void loop() {
  // put your main code here, to run repeatedly:
  if(digitalRead(PLUS) == HIGH)
  {
    ++digit;
    if(digit > 9)
    {
      digit=0;
    }
  }

  if(digitalRead(NINUS) == HIGH)
  {
    --digit;
    if(digit < 0)
    {
      digit=9;
    }
  } 

  displayDigit(digit);
  delay(100);
}

void displayDigit(int num) {
  int pin = 2;
  for(int i=0; i<7; i++) {
    digitalWrite(pin+i, digits[num][i]);
  }
}


refer to youtube tutorial (in Korean) : https://www.youtube.com/watch?v=SRtYpBnmPfA&index=9&list=PL0Vl139pNHbe-JlsydLg3NFRk6nC_cC7w

반응형


반응형


더 재밌게 놀기 연구소



Illuminance sensor with LED


Need to use Analog pin of Arduino

Analog input pins

AnalogRead


Circuit



Source Code


void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:
  analogWrite(9,map(analogRead(A0),0,1023,0,255);
}



※ Illuminance sensor with Buzzer



Circuit




Source Code


void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:
  tone(8,map(analogRead(A0),0,1023,31,4978),20);
  delay(500);
}



Youtube Tutorial of above examples (in Korean) : https://www.youtube.com/watch?v=w397cxZQ5IA&index=6&list=PL0Vl139pNHbe-JlsydLg3NFRk6nC_cC7w






Ultrasonic Sensor with LED


Circuit




Source Code


#define TRIG 2
#define ECHO 3
#define RED 11
#define RED2 12
#define GREEN 10
#define BLUE 9


void setup() {
  // put your setup code here, to run once:
  pinMode(TRIG, OUTPUT);
  pinMode(ECHO, INPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(TRIG,LOW);
  delayMicroseconds(2);
  digitalWrite(TRIG,HIGH);
  delayMicroseconds(10);
  digitalWrite(TRIG,LOW);

  long distance = pulseIn(ECHO, HIGH)/58.2;

  analogWrite(RED, 0);
  analogWrite(GREEN, 0);
  analogWrite(BLUE, 0);

  if(distance < 10) {
    analogWrite(RED2,255);
  }else if(distance < 20) {
    analogWrite(GREEN,255);
    analogWrite(RED2,0);
  } else if(distance < 30) {
    analogWrite(BLUE,255);
    analogWrite(RED2,0);
  }

  delay(100);
}


Note : Red of 3 color LED of mine is not working properly so I've added Red LED to port number 12.




Ultrasonic Sensor with Buzzer



Circuit





Source Code



#define TRIG 2
#define ECHO 3

void setup() {
  // put your setup code here, to run once:
  pinMode(TRIG, OUTPUT);
  pinMode(ECHO, INPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(TRIG,LOW);
  delayMicroseconds(2);
  digitalWrite(TRIG,HIGH);
  delayMicroseconds(10);
  digitalWrite(TRIG,LOW);

  long distance = pulseIn(ECHO, HIGH)/58.2;

  tone(4,1000,20);
  delay(100);
  tone(4,1000,20);

  delay(distance);
}


Youtube Tutorial of above examples (in Korean) : https://www.youtube.com/watch?v=XzNHUctzjOM&list=PL0Vl139pNHbe-JlsydLg3NFRk6nC_cC7w&index=7





Application

Let's add some more LEDs and make Buzzer Piano with Ultrasonic sensor. Wow


#define TRIG 2
#define ECHO 3
#define RED 11
#define RED2 12
#define GREEN 10
#define GREEN2 7
#define YELLOW 8
#define BLUE 9
#define BLUE2 5
#define NOTE_C4 262
#define NOTE_D4 294
#define NOTE_E4 330
#define NOTE_F4  349
#define NOTE_G4  392
#define NOTE_A4  440

int pins[] = {2,3,4};
int notes[] = {NOTE_E4, NOTE_D4, NOTE_C4};


void setup() {
  // put your setup code here, to run once:
  pinMode(TRIG, OUTPUT);
  pinMode(ECHO, INPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(TRIG,LOW);
  delayMicroseconds(2);
  digitalWrite(TRIG,HIGH);
  delayMicroseconds(10);
  digitalWrite(TRIG,LOW);

  long distance = pulseIn(ECHO, HIGH)/58.2;

  analogWrite(RED, 0);
  analogWrite(GREEN, 0);
  analogWrite(BLUE, 0);

  if(distance < 10) {
    analogWrite(RED2,255);
    tone(4,NOTE_C4,20);
  }else if(distance < 15) {
    analogWrite(GREEN,255);
    analogWrite(BLUE2,0);
    analogWrite(RED2,0);
    analogWrite(YELLOW,0);
    analogWrite(GREEN2,0);
    tone(4,NOTE_D4,20);
  } else if(distance < 20) {
    analogWrite(BLUE,255);
    analogWrite(BLUE2,0);
    analogWrite(RED2,0);
    analogWrite(YELLOW,0);
    analogWrite(GREEN2,0);
    tone(4,NOTE_E4,20);
  } else if(distance < 25) {
    analogWrite(YELLOW,255);
    analogWrite(BLUE2,0);
    analogWrite(RED2,0);
    analogWrite(GREEN2,0);
    tone(4,NOTE_F4,20);
  } else if(distance < 30) {
    analogWrite(GREEN2,255);
    analogWrite(BLUE2,0);
    analogWrite(RED2,0);
    analogWrite(YELLOW,0);
    tone(4,NOTE_G4,20);
  } else if(distance < 30) {
    analogWrite(BLUE2,255);
    analogWrite(RED2,0);
    analogWrite(YELLOW,0);
    analogWrite(GREEN2,0);
    tone(4,NOTE_A4,20);
  }

  delay(100);
}





반응형

[Arduino] Tri LED and Buzzer

2017. 1. 9. 01:33 | Posted by 솔웅


반응형

PWM (Pulse Width Modulation)
Pulse Width Modulation, or PWM, is a technique for getting analog results with digital means. Digital control is used to create a square wave, a signal switched between on and off. This on-off pattern can simulate voltages in between full on (5 Volts) and off (0 Volts) by changing the portion of the time the signal spends on versus the time that the signal spends off. The duration of "on time" is called the pulse width. To get varying analog values, you change, or modulate, that pulse width. If you repeat this on-off pattern fast enough with an LED for example, the result is as if the signal is a steady voltage between 0 and 5v controlling the brightness of the LED.




※ Tri LED control


Circuit


Source Code


#define RED 11
#define GREEN 10
#define BLUE 9

void setup() {
  // put your setup code here, to run once:
  randomSeed(analogRead(0));
}

void loop() {
  // put your main code here, to run repeatedly:
  analogWrite(RED, random(255));
  analogWrite(GREEN, random(255));
  analogWrite(BLUE, random(255));
  delay(1000);
}



※ Control Tri LED using Buttons




Source Code


#define RED 11
#define GREEN 10
#define BLUE 9
#define RED_BUTTON 4
#define GREEN_BUTTON 3
#define BLUE_BUTTON 2

int r=0, g=0, b=0;

void setup() {
  // put your setup code here, to run once:
  pinMode(RED_BUTTON, INPUT);
  pinMode(GREEN_BUTTON, INPUT);
  pinMode(BLUE_BUTTON, INPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  if(digitalRead(RED_BUTTON) == HIGH) {
    ++r;
    if(r>255) {
      r=0;
    }
  }

   if(digitalRead(GREEN_BUTTON) == HIGH) {
    ++g;
    if(g>255) {
      g=0;
    }
  }

  if(digitalRead(BLUE_BUTTON) == HIGH) {
    ++b;
    if(b>255) {
      b=0;
    }
  }

  analogWrite(RED,r);
  analogWrite(GREEN,g);
  analogWrite(BLUE,b);
  delay(10);
}


Youtube Tutorial of above examples (in Korean) : https://www.youtube.com/watch?v=7h8TJtRekNI&list=PL0Vl139pNHbe-JlsydLg3NFRk6nC_cC7w&index=4





※ Passive Buzzer (piezo speaker)




Source Code


To include pitches.h, first copy the file to Sketch.

(Examples - 02. Digital - toneMelody)


#include "pitches.h"

int melody[] = {
  NOTE_G4,
  NOTE_G4,
  NOTE_A5,
  NOTE_A5,
  NOTE_G4,
  NOTE_G4,
  NOTE_E4,
  NOTE_G4,
  NOTE_G4,
  NOTE_E4,
  NOTE_E4,
  NOTE_D4,
  0,
  NOTE_G4,
  NOTE_G4,
  NOTE_A5,
  NOTE_A5,
  NOTE_G4,
  NOTE_G4,
  NOTE_E4,
  NOTE_G4,
  NOTE_E4,
  NOTE_D4,
  NOTE_E4,
  NOTE_C4,
  0 };

  int noteDurations[] = {
  1,1,1,1,
  1,1,2,
  1,1,1,1,
  3,1,
  1,1,1,1,
  1,1,2,
  1,1,1,1,
  3,1
  };
 
void setup() {
  // put your setup code here, to run once:
}

void loop() {
  // put your main code here, to run repeatedly:
  for(int thisNote = 0; thisNote < 26; thisNote++) {
    int noteDuration = 250 * noteDurations[thisNote];
    tone(8, melody[thisNote], noteDuration);

    int pauseBetweenNotes = noteDuration * 1.30;
    delay(pauseBetweenNotes);
    noTone(8);
  }
}


==> Buzzer (Piezo speaker) will play the Korean children song.





※ Let's make a Piano using the Buzzer


Circuit


Source Code


#define NOTE_C4 262
#define NOTE_D4 294
#define NOTE_E4 330

int pins[] = {2,3,4};
int notes[] = {NOTE_E4, NOTE_D4, NOTE_C4};

void setup() {
  // put your setup code here, to run once:
  for(int i=0; i<3; i++) {
    pinMode(pins[i], INPUT);
  }
  pinMode(8, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  for(int i=0; i<3; i++) {
    if(digitalRead(pins[i] == HIGH)) {
      tone(8, notes[i], 20);
    }
  }
}


Youtube Tutorial of above examples (in Korean) : https://www.youtube.com/watch?v=irbyDUGmNYk&index=5&list=PL0Vl139pNHbe-JlsydLg3NFRk6nC_cC7w

반응형