24.12.02 ์งํ ์์
24.12.20 2์ฐจ ์งํ ๋ฐ ์ ๋ก๋. ์ฌ์ง ๋ฐ ๋งํฌ๋ฅผ ์์ง ์ ๋ก๋ ์ํจ
24.12.24 ์ต์ข ์ฌ์ง ์ ๋ก๋ ๋ฐ ์ฝ๋๋ธ๋ญ ์ ๊ธฐ
--- INDEX ---
0. ์ค๋น๋ฌผ
1. ์ฝ๋ฉ
2. ํ๋ก
3. ๋ชจ๋ธ๋ง
4. 3dํ๋ฆฐํ
5. ์๋ฃ
--- --- --- ---
0. ์ค๋น๋ฌผ
์ฐ์ ๋ด๊ฐ ๋ง๋ค๊ณ ์ถ์๊ฑด, ๋ด ์ ์ฅ์ ์์๊ฒ ๊พธ๋ฉฐ์ค LED๋ค. LED๋ ์๊ณ ๋ก ์ฌ๋ฌ๊ฐ์ง ๋ฐ์ง์์ด ์๋ ํธ์ด ์์๋ค. ์์ ํ ๊บผ์ก๋ค ์ผ์ง์ด ์๋๋๋ผ๋, ๋ฐ๊ธฐ ์กฐ์ ๋ง์ผ๋ก๋ ๋จ์กฐ๋ก์์ ํด๊ฒฐํด ์ค ์ ์๋ค. ๋ฐ๋ผ์ ์ด๋ฅผ ๋ณํ์ํฌ ์ ์๋ ๋จ์ํ ๊ตฌ์กฐ๋ฌผ์ ๋ง๋ค์ด ๋ณด์๋ค.
0.1 LED
์ฐ์ ๋ด๊ฐ ๋ง๋ค๊ณ ์ถ์๊ฑด, ๋ด ์ ์ฅ์ ์์๊ฒ ๊พธ๋ฉฐ์ค LED๋ค.
LED๋ ์ง์ ๋ง๋ค๊ณ ๋ฏ์ด๊ณ ์น๋๊ฑฐ ๋ณด๋ค ๋ค์ด์์ 3์ฒ๋์ด๋ฉด ์์ฒญ๋ง์ led strip์ ํ๋งคํ๋, ์ด๊ฑธ ์์ฌ๋์.

0.2 ์๋์ด๋ ธ
์ง์์ ํ๋์ฉ ๊ตด๋ฌ๋ค๋๋ ์๋์ด๋
ธ ๋๋
ธ๋ฅผ ์ค๋นํ๋ค. -> ์ง์์ ๊ตด๋ฌ๋จน๋๊ฒ ์ฌ์ค ์ฃฝ์๊ฑฐ์๋ค๋.. ์ ์ข
์ผ ๋ป์ง๋ง ํ๋ค๊ฐ ์๋์ด๋
ธ ์ฐ๋
ธ๋ก ๋์์๋ค. ๋๋ถ์ ์ฌ์ด์ฆ๊ฐ ์์ฒญ ์ปค์ง๊ฑด ๋น๋ฐ..
0.3 ํ๋ฆฐํ ์ฌ๋ฃ
ํฐ์ PLA+์ 3dํ๋ฆฐํฐ๋ฅผ ์ค๋นํ๋ค.
ํ์์ ๊ฒฝ์ฐ๋, ๋ฑ๋ถ X1 ์นด๋ณธ ๋ชจ๋ธ์ ์ด์ฉํ๋ค.
0.4 arduino oled
์ ์ด ๋ง์๊ฑด ๋ณต์กํ๋ SPI๋ง๊ณ I2C๊ฐ ์ง์๋๋ ์๋์ด๋ ธ oled๋ฅผ ์ค๋นํ๋ค.
1. ์ฝ๋ฉ
์ฌ์ค ์ฝ๋ฉ์ ๊ทธ๋ฅ ์ด๋ ค์ด๊ฒ ์๋๋ผ, ๋จ์ํ arduino PWM๊ตฌํ๋ฐ์ ์๋ค. ๋ฒํผ์ ๋๋ ์ ๋, ๋ชจ๋๋ฅผ ๋ณ๊ฒฝํด ์ค ๋๋ฐ์ด์ฑ์ ๋ค.



์ฐ์ led strip์ ๋์์กฐ๊ฑด์ ํ์ธํด๋ดค๋ค.
aa๊ฑด์ ์ง ๋๊ฐ์ ํด๋นํ๋ 3V์์๋ 0.26a๋ฐ์ ์ฌ์ฉ๋์ง ์๋๋ค. ํ์ง๋ง ์๋์ด๋ ธ์ ์ถ๋ ฅ์ 5v 500mA ์ด๊ธฐ ๋๋ฌธ์ 5V๋ฅผ ๋ฃ์ด๋ณด๋, cc๊ฐ ๊ฑธ๋ฆฌ๋๋ผ.. cc๋ฅผ ํ์ด์ฃผ๋ 2.38A๊น์ง ์น์์ผ๋ฉฐ ๋งค์ฐ ๋ฐ์์ก๋ค.
์ด๋ฐ ๊ฒฝ์ฐ๋ led์ ์๋ ์ถ๋ ฅ๋ณด๋ค ๋ฎ์ ์ ์์ ์ผ๊ธฐ ๋๋ฌธ์ AA๊ฑด์ ์ง ๋๊ฐ ๋ง์ผ๋ก๋ ์ ์ ํ ์ ๋ฅ๊ฐ ๋ฐ์ณ์คฌ๋ ๊ฒ ๊ฐ๋ค. ์๋ led๋ ์ ์์ ๋์ด๋ฉด ์ํ์ด๊ฐ ๋ ๊ฐํ๋ฅด๊ฒ ์ฌ๋ผ๊ฐ๋ ๊ฒ์ ์ ์ ์๋๋ฐ, ์ด๋ฌํ ์์ ์ฅ์น๊ฐ ์๋ ๊ฒฝ์ฐ์๋ ๊ณผ์ด๋๊ฑฐ๋ ๊นจ์ง ์ ์์ผ๋ ์กฐ์ฌํ๋ค.
์ํผ, ํ์๋ 5๊ฐ์ ๋ชจ๋๋ฅผ ๋ง๋ค์๋ค.
๊ทธ๋ฅ ์ผ์ ธ์๋๊ฒ๊ณผ ๊น๋นก์ด๋ ์๋๋ฅผ ์กฐ์ ํ๋ค.
์ผ๋จ ์ฝ๋ ์ ๋ฌธ์ ์ฌ๋ ค๋ณด์๋ฉด,
์ฝ๋๋ธ๋ญ์ ๋๋ฌด ๊ธธ์ด, ๊ธ์ด ๋๋ฌด ๊ธธ์ด๋ณด์ธ๋ค. ๋ฐ๋ผ์ ์ ์ด๋์๋ค.
์๋์ ๋๋ณด๊ธฐ๋ฅผ ๋๋ฅด๋ฉด ์ฝ๋๊ฐ ๋์จ๋ค.
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
#define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin)
#define SCREEN_ADDRESS 0x3C ///< See datasheet for Address; 0x3D for 128x64, 0x3C for 128x32
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
#define NUMFLAKES 10 // Number of snowflakes in the animation example
#define LOGO_HEIGHT 16
#define LOGO_WIDTH 16
#define XPOS 0 // Indexes into the 'icons' array in function below
#define YPOS 1
#define DELTAY 2
const int mode_changer = 2;
const int oled_changer = 3;
const int led = 11;
bool btn_flag = false;
bool oled_flag = true;
unsigned long current_time = millis();
unsigned long prev_time = millis();
unsigned long current_time_led = millis();
unsigned long prev_time_led = millis();
unsigned long prev_mode_change_time = millis();
unsigned long current_mode_change_time = millis();
volatile int finite_state = 0;
bool fliker_state = HIGH;
bool increasing = true;
bool char_flag = false;
int char_flag_cnt = 0;
int brightness = 0;
int8_t f, icons[NUMFLAKES][3];
static const unsigned char PROGMEM logo_bmp[] =
{ 0b00000000, 0b11000000,
0b00000001, 0b11000000,
0b00000001, 0b11000000,
0b00000011, 0b11100000,
0b11110011, 0b11100000,
0b11111110, 0b11111000,
0b01111110, 0b11111111,
0b00110011, 0b10011111,
0b00011111, 0b11111100,
0b00001101, 0b01110000,
0b00011011, 0b10100000,
0b00111111, 0b11100000,
0b00111111, 0b11110000,
0b01111100, 0b11110000,
0b01110000, 0b01110000,
0b00000000, 0b00110000 };
void setup() {
pinMode(led,OUTPUT);
pinMode(mode_changer, INPUT);
pinMode(oled_changer, INPUT);
attachInterrupt(digitalPinToInterrupt(mode_changer), interrupt_mode, RISING);
attachInterrupt(digitalPinToInterrupt(oled_changer), interrupt_oled, RISING);
Serial.begin(9600);
if(!display.begin(SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS)) {
Serial.println(F("SSD1306 allocation failed"));
for(;;); // Don't proceed, loop forever
}
for(f=0; f< NUMFLAKES; f++) {
icons[f][XPOS] = random(1 - LOGO_WIDTH, display.width());
icons[f][YPOS] = -LOGO_HEIGHT;
icons[f][DELTAY] = random(1, 6);
}
display.display();
delay(2000); // Pause for 2 seconds
display.clearDisplay();
Serial.println("init clear");
}
void loop() {
//0 is always ON mode ( full power )
//1 is always ON mode ( half power )
//2 is slow fliker mode
//3 is more slow fliker mode
//4 is super slow non off fliker mode
if (finite_state == 0) {
digitalWrite(led,HIGH);
btn_flag = false;
Serial.println("state 0 ");
current_mode_change_time = millis();
if ((current_mode_change_time - prev_mode_change_time) <= 1500) {
display.clearDisplay(); // Clear the display buffer
display.display();
delay(1);
display.clearDisplay(); // Clear the display buffer
display.setTextSize(2); // Normal 1:1 pixel scale
display.setTextColor(SSD1306_WHITE); // Draw white text
display.setCursor(0,0); // Start at top-left corner
display.println(F("State0"));
display.setTextSize(2); // Normal 1:1 pixel scale
display.setTextColor(SSD1306_WHITE); // Draw white text
display.setCursor(0,16); // Start at top-left corner
display.println(F("Always ON"));
display.setCursor(0,32); // Start at top-left corner
display.println(F("FULL POWER"));
display.setTextColor(SSD1306_WHITE);
display.display();
char_flag = true;
delay(1500);
}
else if (oled_flag == true) {
display.clearDisplay(); // Clear the display buffer
// Draw each snowflake:
for(f=0; f< NUMFLAKES; f++) {
display.drawBitmap(icons[f][XPOS], icons[f][YPOS], logo_bmp, LOGO_WIDTH, LOGO_HEIGHT, SSD1306_WHITE);
}
display.display(); // Show the display buffer on the screen
// delay(200); // Pause for 1/10 second
// Then update coordinates of each flake...
for(f=0; f< NUMFLAKES; f++) {
icons[f][YPOS] += icons[f][DELTAY];
// If snowflake is off the bottom of the screen...
if (icons[f][YPOS] >= display.height()) {
// Reinitialize to a random position, just off the top
icons[f][XPOS] = random(1 - LOGO_WIDTH, display.width());
icons[f][YPOS] = -LOGO_HEIGHT;
icons[f][DELTAY] = random(1, 6);
}
}
}
else {
display.clearDisplay(); // Clear the display buffer
delay(10);
// display.display();
display.fillRect(0, 0, display.width(), display.height(), SSD1306_BLACK);
delay(10);
display.display();
}
}
else if(finite_state == 1) {
Serial.println("state 1 ");
analogWrite(led,127);
btn_flag = false;
current_mode_change_time = millis();
if ((current_mode_change_time - prev_mode_change_time) <= 1500) {
display.clearDisplay(); // Clear the display buffer
display.display();
delay(1);
display.clearDisplay(); // Clear the display buffer
display.setTextSize(2); // Normal 1:1 pixel scale
display.setTextColor(SSD1306_WHITE); // Draw white text
display.setCursor(0,0); // Start at top-left corner
display.println(F("State1"));
display.setTextSize(2); // Normal 1:1 pixel scale
display.setTextColor(SSD1306_WHITE); // Draw white text
display.setCursor(0,16); // Start at top-left corner
display.println(F("Always ON"));
display.setCursor(0,32); // Start at top-left corner
display.println(F("HALF POWER"));
display.setTextColor(SSD1306_WHITE);
display.display();
char_flag = true;
delay(1500);
}
else if (oled_flag == true) {
char_flag = false;
display.clearDisplay(); // Clear the display buffer
Serial.println("in else if");
// Draw each snowflake:
for(f=0; f< NUMFLAKES; f++) {
display.drawBitmap(icons[f][XPOS], icons[f][YPOS], logo_bmp, LOGO_WIDTH, LOGO_HEIGHT, SSD1306_WHITE);
}
display.display(); // Show the display buffer on the screen
// delay(200); // Pause for 1/10 second
// Then update coordinates of each flake...
for(f=0; f< NUMFLAKES; f++) {
icons[f][YPOS] += icons[f][DELTAY];
// If snowflake is off the bottom of the screen...
if (icons[f][YPOS] >= display.height()) {
// Reinitialize to a random position, just off the top
icons[f][XPOS] = random(1 - LOGO_WIDTH, display.width());
icons[f][YPOS] = -LOGO_HEIGHT;
icons[f][DELTAY] = random(1, 6);
}
}
}
else {
Serial.println("warnning : in else ");
display.clearDisplay(); // Clear the display buffer
delay(10);
// display.display();
display.fillRect(0, 0, display.width(), display.height(), SSD1306_BLACK);
delay(10);
display.display();
}
}
else if(finite_state == 2) {
Serial.println("state 2 ");
btn_flag = false;
current_time_led = millis();
if (current_time_led >= prev_time_led + 1){
if (increasing == true) {
brightness++;
if (brightness >= 230) {
increasing = false;
}
}
else {
brightness--;
if (brightness <= 0) {
increasing = true;
}
}
analogWrite(led,brightness);
if (btn_flag == true) {
return;
}
prev_time_led = millis();
}
current_mode_change_time = millis();
if ((current_mode_change_time - prev_mode_change_time) <= 1500) {
display.clearDisplay(); // Clear the display buffer
display.display();
delay(1);
display.clearDisplay(); // Clear the display buffer
display.setTextSize(2); // Normal 1:1 pixel scale
display.setTextColor(SSD1306_WHITE); // Draw white text
display.setCursor(0,0); // Start at top-left corner
display.println(F("State2"));
display.setTextSize(2); // Normal 1:1 pixel scale
display.setTextColor(SSD1306_WHITE); // Draw white text
display.setCursor(0,16); // Start at top-left corner
display.println(F("Fliker"));
display.setCursor(0,32); // Start at top-left corner
display.println(F("FAST"));
display.setTextColor(SSD1306_WHITE);
display.display();
char_flag = true;
delay(1500);
}
else if (oled_flag == true) {
display.clearDisplay(); // Clear the display buffer
// Draw each snowflake:
for(f=0; f< NUMFLAKES; f++) {
display.drawBitmap(icons[f][XPOS], icons[f][YPOS], logo_bmp, LOGO_WIDTH, LOGO_HEIGHT, SSD1306_WHITE);
}
display.display(); // Show the display buffer on the screen
// delay(200); // Pause for 1/10 second
// Then update coordinates of each flake...
for(f=0; f< NUMFLAKES; f++) {
icons[f][YPOS] += icons[f][DELTAY];
// If snowflake is off the bottom of the screen...
if (icons[f][YPOS] >= display.height()) {
// Reinitialize to a random position, just off the top
icons[f][XPOS] = random(1 - LOGO_WIDTH, display.width());
icons[f][YPOS] = -LOGO_HEIGHT;
icons[f][DELTAY] = random(1, 6);
}
}
}
else {
display.clearDisplay(); // Clear the display buffer
delay(10);
// display.display();
display.fillRect(0, 0, display.width(), display.height(), SSD1306_BLACK);
delay(10);
display.display();
}
}
else if(finite_state == 3) {
Serial.println("state 3 ");
btn_flag = false;
current_time_led = millis();
if (current_time_led >= prev_time_led + 5){
if (increasing == true) {
brightness++;
if (brightness >= 230) {
increasing = false;
}
}
else {
brightness--;
if (brightness <= 0) {
increasing = true;
}
}
analogWrite(led,brightness);
if (btn_flag == true) {
return;
}
prev_time_led = millis();
}
current_mode_change_time = millis();
if ((current_mode_change_time - prev_mode_change_time) <= 1500) {
display.clearDisplay(); // Clear the display buffer
display.display();
delay(1);
display.clearDisplay(); // Clear the display buffer
display.setTextSize(2); // Normal 1:1 pixel scale
display.setTextColor(SSD1306_WHITE); // Draw white text
display.setCursor(0,0); // Start at top-left corner
display.println(F("State3"));
display.setTextSize(2); // Normal 1:1 pixel scale
display.setTextColor(SSD1306_WHITE); // Draw white text
display.setCursor(0,16); // Start at top-left corner
display.println(F("Fliker"));
display.setCursor(0,32); // Start at top-left corner
display.println(F("SLOW"));
display.setTextColor(SSD1306_WHITE);
display.display();
char_flag = true;
delay(1500);
}
else if (oled_flag == true) {
display.clearDisplay(); // Clear the display buffer
// Draw each snowflake:
for(f=0; f< NUMFLAKES; f++) {
display.drawBitmap(icons[f][XPOS], icons[f][YPOS], logo_bmp, LOGO_WIDTH, LOGO_HEIGHT, SSD1306_WHITE);
}
display.display(); // Show the display buffer on the screen
// delay(200); // Pause for 1/10 second
// Then update coordinates of each flake...
for(f=0; f< NUMFLAKES; f++) {
icons[f][YPOS] += icons[f][DELTAY];
// If snowflake is off the bottom of the screen...
if (icons[f][YPOS] >= display.height()) {
// Reinitialize to a random position, just off the top
icons[f][XPOS] = random(1 - LOGO_WIDTH, display.width());
icons[f][YPOS] = -LOGO_HEIGHT;
icons[f][DELTAY] = random(1, 6);
}
}
}
else {
display.clearDisplay(); // Clear the display buffer
delay(10);
// display.display();
display.fillRect(0, 0, display.width(), display.height(), SSD1306_BLACK);
delay(10);
display.display();
}
}
else if(finite_state == 4) {
Serial.println("state 4 ");
btn_flag = false;
current_time_led = millis();
if (current_time_led >= prev_time_led + 7){
if (increasing == true) {
brightness++;
if (brightness >= 200) {
increasing = false;
}
}
else {
brightness--;
if (brightness <= 25) {
increasing = true;
}
}
analogWrite(led,brightness);
if (btn_flag == true) {
return;
}
prev_time_led = millis();
}
current_mode_change_time = millis();
if ((current_mode_change_time - prev_mode_change_time) <= 1500) {
display.clearDisplay(); // Clear the display buffer
display.display();
delay(1);
display.clearDisplay(); // Clear the display buffer
display.setTextSize(2); // Normal 1:1 pixel scale
display.setTextColor(SSD1306_WHITE); // Draw white text
display.setCursor(0,0); // Start at top-left corner
display.println(F("State4"));
display.setTextSize(2); // Normal 1:1 pixel scale
display.setTextColor(SSD1306_WHITE); // Draw white text
display.setCursor(0,16); // Start at top-left corner
display.println(F("Fliker"));
display.setCursor(0,32); // Start at top-left corner
display.println(F("SUPER SLOW"));
display.setTextColor(SSD1306_WHITE);
display.display();
char_flag = true;
delay(1500);
}
else if (oled_flag == true) {
display.clearDisplay(); // Clear the display buffer
// Draw each snowflake:
for(f=0; f< NUMFLAKES; f++) {
display.drawBitmap(icons[f][XPOS], icons[f][YPOS], logo_bmp, LOGO_WIDTH, LOGO_HEIGHT, SSD1306_WHITE);
}
display.display(); // Show the display buffer on the screen
// delay(200); // Pause for 1/10 second
// Then update coordinates of each flake...
for(f=0; f< NUMFLAKES; f++) {
icons[f][YPOS] += icons[f][DELTAY];
// If snowflake is off the bottom of the screen...
if (icons[f][YPOS] >= display.height()) {
// Reinitialize to a random position, just off the top
icons[f][XPOS] = random(1 - LOGO_WIDTH, display.width());
icons[f][YPOS] = -LOGO_HEIGHT;
icons[f][DELTAY] = random(1, 6);
}
}
}
else {
display.clearDisplay(); // Clear the display buffer
delay(10);
// display.display();
display.fillRect(0, 0, display.width(), display.height(), SSD1306_BLACK);
delay(10);
display.display();
}
}
else {
Serial.println("incorrect state");
}
}
void interrupt_mode() {
current_time = millis();
if (digitalRead(mode_changer) > 0 ){
if(current_time > (prev_time + 200)) {
btn_flag = true;
if( finite_state >= 4) {
finite_state = 0;
}
else {
finite_state++;
}
prev_time = current_time;
prev_mode_change_time = millis();
}
}
}
void interrupt_oled() {
Serial.println("interrupted");
current_time = millis();
if (digitalRead(oled_changer) > 0 ){
if(current_time > (prev_time + 200)) {
if (oled_flag == true) {
oled_flag = false;
}
else {
Serial.println("clear!");
for(f=0; f< NUMFLAKES; f++) {
icons[f][XPOS] = random(1 - LOGO_WIDTH, display.width());
icons[f][YPOS] = -LOGO_HEIGHT;
icons[f][DELTAY] = random(1, 6);
}
// display.display();
oled_flag = true;
}
prev_time = current_time;
}
}
}
void testanimate_step(const uint8_t *bitmap, uint8_t w, uint8_t h) {
static int8_t icons[NUMFLAKES][3]; // Snowflake data (persistent across calls)
static bool initialized = false; // Ensure icons are initialized only once
// Initialize snowflakes only once
if (!initialized) {
for (int f = 0; f < NUMFLAKES; f++) {
icons[f][XPOS] = random(1 - LOGO_WIDTH, display.width());
icons[f][YPOS] = -LOGO_HEIGHT;
icons[f][DELTAY] = random(1, 6);
}
initialized = true;
}
display.clearDisplay(); // Clear the display buffer
// Draw each snowflake:
for (int f = 0; f < NUMFLAKES; f++) {
display.drawBitmap(icons[f][XPOS], icons[f][YPOS], bitmap, w, h, SSD1306_WHITE);
}
display.display(); // Show the display buffer on the screen
// Update coordinates of each flake
for (int f = 0; f < NUMFLAKES; f++) {
icons[f][YPOS] += icons[f][DELTAY];
if (icons[f][YPOS] >= display.height()) {
icons[f][XPOS] = random(1 - LOGO_WIDTH, display.width());
icons[f][YPOS] = -LOGO_HEIGHT;
icons[f][DELTAY] = random(1, 6);
}
}
}
์ด๋ ๊ฒ ์กฐ๊ธ ๊ธด ์ฝ๋๊ฐ ์์ฑ๋์๋ค.
์ฌ์ค led๋ง ์ฌ์ฉํ๋ฉด ์ด๋ ๊ฒ ๊ธธ์ด์ง ์ด์ ๊ฐ ์์ง๋ง, oled๋ฅผ ์ฌ์ฉํด ์กฐ๊ธ ๊ธธ์ด์ก๋ค.
๋์ถฉ ๋์์ ์ค๋ช ํ๋ฉด, ๋ฒํผ์ ๋ ๊ฐ ๋ง๋ค์ด์ ํ๋๋ oled์ ํผ๋ก๋๋ฅผ ์๋ผ๊ธฐ ์ํด ์ผ๊ณ ๋๋ ๋ฒํผ์ ๋ง๋ค์๊ณ , ํ๋๋ led strip์ state๋ฅผ ๋ณ๊ฒฝํ๋ ๋ฒํผ์ ๋ง๋ค์๋ค. oled์ ํผ๋ก๋๋ฅผ ์๊ฐํ๊ฒ ๋๊ฑด, ์ฌ์ค ์๋์ ๊ฐ์ด ๋ณ๋ค์ด ๋ฌด์ํ ๋จ์ด์ง๋ ์์งค์ ๋ฃ์๊ธฐ ๋๋ฌธ์ธ๋ฐ, ์ด๊ฒ ์์ ์ ์์๋๋ฐ ํฌ๋ฆฌ์ค๋ง์ค์ ์ข ์ด์ธ๋ฆฌ๋ ๋ฏ ํ์ฌ ๊ทธ๋๋ก ๊ฐ์ ธ์ค๊ฒ ๋์๋ค.


๋ณ๊ณผ ๊ธ์จ๊ฐ ์๋ฆฌ๋ ์ด์ ๋ ๋จ์ํ ์ฃผ์ฌ์จ ๋๋ฌธ์ด๋ค.
2. ํ๋ก
์ฌ์ค ์ด๋ฐ ํ๋ก์ ํธ์์ ํ๋ก๋, ๋ฉ๋์ ํด์ผํ๊ธฐ์ ๊ธฐ์กด์ ๊ฐ์ง ์ค๊ณ ํด๋ก ๊ตฌ์๊ณผ ํ ์คํธ๋ฅผ ์งํํด์ผ ํ์ง๋ง, ์ด ํ๋ก์ ํธ๋ ํ๋ก๊ฐ ๋๋ฌด ๋จ์ํด ๊ทธ๋ฅ ๊ทธ์๋ฆฌ์์ ์ฆ์์ผ๋ก ํด๋ฒ๋ ธ๋ค. ๊ตฌ์๋ถํฐ ๋ฉ๋ ๋ฐ ํ ์คํธ๊น์ง ๋ค์๊ฐ ์ ๋ ๊ฑธ๋ ธ๋ ๊ฒ ๊ฐ๋ค.

๋จ์ํ 3.3V๋ฅผ ์ฌ์ฉํ๊ณ ํ๋ค์ด ์ ํญ์ ์ด์ฉํด interrupt๋ฅผ ๊ตฌํํ ๋ฒํผ ๋๊ฐ์ oled๋ฅผ ํ๋ ์ฅ์ฐฉํ๋ค. ์์ชฝ์ ๋ณด๋ฉด ํ๋ค์ด์ ์ํ 1k ohm ์ ํญ ๋๊ฐ๊ฐ ๋ณด์ผ๊ฒ์ด๋ค.
3. ๋ชจ๋ธ๋ง
๋ค์์ ๋ชจ๋ธ๋ง์ด๋ค. ์๋ฌด๋ฆฌ ๋ด์ฉ๋ฌผ์ด ์ข๋ค ํ๋๋ผ๋ ์์์๋ฉด ๋ง์งฑ ๋๋ฃจ๋ฌต์ด๋ค.
์ ๋นํ ์ผ์ด์ค๋ฅผ ๋ง๋ค๊ณ , ์๋์ด๋ ธ๋ฅผ ๋ผ์๋ฃ์ ์ ์๋๋ก ์๋์ด๋ ธ์ ์๋ ๋์ฌ๊ตฌ๋ช ๋ค๊ฐ์ ์์น๋ฅผ ๋ฒ๋์ด์บ๋ฆฌํผ๋ก ์ธก์ ํด ๋ง๋ค์๋ค. ์ฌ์ค ์ด ๋ชจ๋ธ๋ง์ printingํ๊ธฐ ์ํด์๋ ๋ณธ์ธ์ด ๊ฐ๊ณ ์๋ ํ๋ฆฐํฐ์ ์ถ๋ ฅ๊ณต์ฐจ๋ฅผ ์๊ณ ์์ด์ผ ํ๋๋ฐ, ํ์์ ๊ฒฝ์ฐ๋ ์ฒ์ ์ฐ๋ ํ๋ฆฐํฐ๋ฅผ ์ฌ์ฉํ๊ธฐ ๋๋ฌธ์ ์ธ ๋ฒ ์ ๋์ ์ํ์ฐฉ์ค๋ฅผ ๊ฑฐ์ณค๋ค. ์์์ ๋ฐ๋ผ์ ์ถ๋ ฅ๊ณต์ฐจ๋ ์์ถ๋ฅ ์ด ๋ฐ๋๋๊ฒ๋ ์๊ณ ์์ด์ผ ํ๋ค.

์ด๋ ๊ฒ ์ผ์ด์ค์ ๋ฒํผ์ ๋ชจ๋ธ๋ง ํ๋ค.
๋ฒํผ์ ๋ฐ๊นฅ์์ ๋๋ฅด๊ฑฐ๋ ์ก์๋น๊ฒผ์ ๋ ๋น ์ง์ง ์๋๋ก T์ํ์ผ๋ก ์ค๊ณํ๋ค.
4. 3dํ๋ฆฐํ

์๊ฐ๋ณด๋ค ์ ๋์๊ณ , ๋ฐ๋ก ์๋์ด๋ ธ๊ฐ ๋ผ์์ง ์ฑ ๊ณ ์ ์ด ๋๋ค.
5. ์๋ฃ

xrated ๊ธ๋ผ์ค๋ ๋ณ๋ก ์ธ ์ผ์ด ์์ด์ ๊ทธ๋ฅ led strip์ ๋จ๋ ๋ถ๋ถ์ ์ ๋ถ ์ค์ ๋ฃ์๋ค
์ด๋ ๊ฒ ๋ณด๋, ์์ธต์ ์ ์ฅ์ด ์ ์๋ณด์ด์ง๋ง ๊ทธ๋ฅ ์ธ๋ จ๋ค..
๋ฒํผ์ผ๋ก ๋ชจ๋ ๋ณ๊ฒฝํ๊ณ oled๋ ๊ป๋ค์ผฐ๋ค ํ ์ ์์ผ๋ ์ฌ๋ฌ ๋ชจ๋๋ฅผ ์ฆ๊ธฐ๊ณ , oled์ ์๋ช ๋ ๊ณ ๋ คํ ์ ์๋ค.
์ด๋ ๊ฒ ๋ณด๋ฉด ์ฝ๊ฐ์ ๋ญ๋ง์ด ์์ง ์์๊ฐ
์ฌ๋ด
์ด๊ณต๊ณ๋ค์ ์ฌ์ค ๋ญ๋ง์ ์ถ๊ตฌํ ์ ์๋๋ฐ ์ถ๊ตฌํ์ง ์๋๋ค. ๊ทธ๋ค์ ๋์ฒด๋ก ๊ธฐ๋ฅ์ฃผ์์ ์ด๋ฉฐ, ๋ณธ์ง์ ๋ํ ์ดํด๋ฅผ ์ถ๊ตฌํ๋ ์ฌ๊ณ ๋ฅผ ํ๊ธฐ ๋๋ฌธ์ ๊ทธ๋ค์ด ์ถ๊ตฌํ๋ ๋ญ๋ง์ ๋ค๋ฅธ ์ฌ๋๋ค์ด ์๊ฐํ๋ ๊ฒ๊ณผ๋ ์กฐ๊ธ ๋ค๋ฅธ ๊ณณ์ ์๋ค. ํ์ง๋ง ์ด๋ฐ ๋ญ๋ง๋ค์ ๋ณธ์ง์ ์ผ๋ก ์ถ๊ตฌํ๋ ๋ฐ๊ฐ ๊ฐ์ผ๋ฉฐ, ์ด๊ณต๊ณ๋ ์์ฒด๋ฅ์ด๋ ์๋ก์ ๋ญ๋ง์ ์กด์คํด์ฃผ๊ธฐ ๋ฐ๋ผ๋ฉฐ, ํ์๋ ๊ฐ ๋ถ์ผ์ ๋ญ๋ง๋ค์ด ์ตํฉ๋ ๋ ๋น๋ก์ ์๋ฒฝํ ๋ญ๋ง์ด ๋์ฌ ์ ์๋ค๊ณ ์๊ฐํ๋ค. ๊ทธ๋ฌํ ์์๋ค์ด ๋์์ธ๊ณผ ๊ณตํ์ ๊ฒฐํฉ์ฒด์ธ ์ ํ๋ค์ด๋ค.
'Projects' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
| [VScode & Git] windows์์ VScode์ git์ ์ฐ๋ํด๋ณด์. (0) | 2025.04.24 |
|---|