Introduction: JUST LINE JUST LIGTH #3

The acrylic patterns are illuminated, and two acrylic plates are rotated, giving users a unique experience they never experienced before.

Step 1: Just Line, Just Light #3

The motivation of the work was brought from the artwork. What interesting forms would this work take if it were to be overlapped? And that's what made this work.

Step 2: Project

Our team decided on three types of works and I made the third.

Step 3: Prototype

A number of prototypes have been produced and trial-and-error as to which shapes, colors, and movements can be added to show more interesting shapes, and which structures can be made effectively.

Step 4: Material Body

Step 5: Material Moving

Step 6: Material Power&wire

Step 7: Floor Plan

To design a structure suitable for this work, the drawings are made by cutting wood and ironing the rest of the parts

Step 8: HOW TO MAKE?

Step 9: ACRYLIC CUTTING

Step 10: Circuits

Step 11: Cording

#include
#include "hsv.h"

#define PIN 9 #define PIN2 10

#define CNT 102 #define CNT2 102

#define IN1 7 #define IN2 6 #define IN3 5 #define IN4 4

//L298N 속도 #define ENA 8 #define ENB 3

#define CH1 0 #define CH2 1 #define ALL_CH 2

int interval1=10; int interval2=8;

long preMillis1; long preMillis2;

int position = 0;

Adafruit_NeoPixel strip = Adafruit_NeoPixel(CNT, PIN, NEO_GRB + NEO_KHZ800); Adafruit_NeoPixel strip2 = Adafruit_NeoPixel(CNT2, PIN2, NEO_GRB + NEO_KHZ800);

enum { MOTOR_SPEED_OFF = 0, MOTOR_SPEED_1, MOTOR_SPEED_2, MOTOR_SPEED_3, MOTOR_SPEED_4, MOTOR_SPEED_5, MOTOR_SPEED_6, MOTOR_SPEED_7, MOTOR_SPEED_8, MOTOR_SPEED_9, MOTOR_SPEED_10, MOTOR_SPEED_11, MAX_MOTOR_SPEED };

//HC-SR04 거리 센서 PIN const int trigPin = 13; const int echoPin = 12;

long duration; int distance;

const unsigned char motorSpeed[MAX_MOTOR_SPEED] = { 0, 50, 60, 70, 80, 90, 100, 120, 140, 160, 180, 250};

//모터 속도 설정 void setMotorSpeed(unsigned char mode, unsigned char speed){ if(mode == CH1){ analogWrite(ENA, speed); }else if(mode == CH2){ analogWrite(ENB, speed); }else{ analogWrite(ENA, speed); analogWrite(ENB, speed); } }

//앞으로 void forward(){ digitalWrite(IN1, HIGH); digitalWrite(IN2, LOW); digitalWrite(IN3, HIGH); digitalWrite(IN4, LOW); }

//뒤로 void backward(){ digitalWrite(IN1, LOW); digitalWrite(IN2, HIGH); digitalWrite(IN3, LOW); digitalWrite(IN4, HIGH); }

//정지 void stopMotor(){ digitalWrite(IN1, HIGH); digitalWrite(IN2, HIGH); digitalWrite(IN3, HIGH); digitalWrite(IN4, HIGH); }

void setup() { strip.begin(); strip2.begin(); // 모터 설정 pinMode(IN1, OUTPUT); pinMode(IN2, OUTPUT); pinMode(IN3, OUTPUT); pinMode(IN4, OUTPUT);

pinMode(ENA, OUTPUT); pinMode(ENB, OUTPUT);

//HC-SR04 Pin 설정 pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT);

//Monitor Serial 시작 Serial.begin(9600); //초기 모터 속도 설정

}

void loop() { // 거리 측정 digitalWrite(trigPin, LOW); delayMicroseconds(2);

digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW);

duration = pulseIn(echoPin, HIGH);

distance = duration*0.034/2; //Cm //if Inch, duration *0.0133/2 if(distance>100){ distance=100; }

//거리 측정값 모니터 프로그램에 출력 Serial.print(duration); Serial.print(" Distance : "); Serial.print(distance); Serial.println("CM"); if(distance < 20){ setMotorSpeed(ALL_CH, motorSpeed[MOTOR_SPEED_11]); backward(); } else if(distance < 40 && distance >= 20){ setMotorSpeed(ALL_CH, motorSpeed[MOTOR_SPEED_11]); backward(); } else if(distance < 70 && distance >= 40){ setMotorSpeed(ALL_CH, motorSpeed[MOTOR_SPEED_9]); backward(); } else if(distance < 100 && distance >= 60){ setMotorSpeed(ALL_CH, motorSpeed[MOTOR_SPEED_8]); backward(); } else { stopMotor(); }

unsigned long curMillis = millis(); if (curMillis - preMillis1 > interval1) { preMillis1 = curMillis;

hsbanimation(); strip2.show();

if (curMillis - preMillis2 > interval2) { preMillis2 = curMillis; hsbanimation2(); strip.show(); } } }

void hsbanimation(){ for (int i = 102; i >=0; i—) strip2.setPixelColor((i + position) % CNT, getPixelColorHsv(i, 900, 500, strip2.gamma8(i * (255 / CNT2)+50))); strip2.show(); position++; position %= CNT; delay(distance); }

void hsbanimation2(){ for (int i = 0; i <CNT2; i++)

strip.setPixelColor((i + position) % CNT2, getPixelColorHsv(i,1200, 250, strip2.gamma8(i * (255 / CNT2)+50)));
strip.show(); position++; position %= CNT2; delay(distance); }