WS2812 아두이노 5050 RGB LED 모듈 12R
WS2812 기반 아두이노 RGB LED 모듈 / 작동 전압 : 5V / LED당 18mA 전류 소모 / 1-wire / -40도 ~ 85도 / 39 x 39 x 3.5mm
외관 이미지
구매 링크 : https://www.devicemart.co.kr/1327852/related/# 3,400원
사용법 링크 - WS2812 color LED 사용하기 https://arsviator.blogspot.kr/2015/04/ws2812-color-led.html
구매참고 링크 - https://ko.aliexpress.com/item/RGB-LED-12-WS2812-WS2812B-5050-RGB-LED-I2C/32837547125.html
데이터북 참고
연결은 데이터 입력핀에 적당한 아두이노 핀을 연결한다.
샘플코드 1
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 27 28 29 30 31 32 33 34 35 36 37 38 39 | // Example programs using the Adafruit Library // Ex1) Lighting the pixels one after the other #include <Adafruit_NeoPixel.h> #define pinPix 12 // WS2812에 연결하는데 사용하는 pin 번호 #define numPix 16 // 링에 연결되어 있는 WS2812 LED 갯수 // Parameter 1 = 링에 연결되어 있는 WS2812 LED 갯수 // Parameter 2 = WS2812에 연결하는데 사용하는 pin 번호 // Parameter 3 = pixel type flags, add together as needed: // NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs) // NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers) // NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products) // NEO_RGB Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2) Adafruit_NeoPixel myLeds = Adafruit_NeoPixel(numPix, pinPix, NEO_GRB + NEO_KHZ800); void setup() { myLeds.begin(); // Initialize the NeoPixel array in the Arduino's memory, myLeds.show(); // turn all pixels off, and upload to ring or string } void loop() { int pause = 100; for (int i=0; i<numPix; i++) { myLeds.setPixelColor(i,255,255,255); myLeds.show(); delay(pause); } for (int i=0; i<numPix; i++) { myLeds.setPixelColor(i,0,0,0); myLeds.show(); delay(pause); } } | cs |
샘플코드 2
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 27 28 | // Ex2) Lighting all the pixels simultaneosly #include <Adafruit_NeoPixel.h> // Library for NeoPixels #define pinPix 12 // Pin driving NeoPixel Ring or String #define numPix 16 // Number of NeoPixels in the Ring or Strip Adafruit_NeoPixel myLeds = Adafruit_NeoPixel(numPix, pinPix, NEO_GRB + NEO_KHZ800); void setup() { myLeds.begin(); // Initialize the NeoPixel array in the Arduino's memory, myLeds.show(); // turn all pixels off, and upload to ring or string } void loop() { for (int i=0; i<numPix; i++) { myLeds.setPixelColor(i,255,255,255); } myLeds.show(); delay(pause); for (int i=0; i<numPix; i++) { myLeds.setPixelColor(i,0,0,0); } myLeds.show(); delay(pause); } | cs |
'메이커 Maker' 카테고리의 다른 글
| 반응하는 인형 메이커 프로젝트 시작하기 1 (0) | 2018.07.02 |
|---|---|
| 반응하는 인형 센서 위치잡고 밑그림 조립방안 협의 (0) | 2018.06.21 |
| 아두이노우노와 아두이노메가 GPIO 핀 홀은 생각보다 작다. (0) | 2018.06.13 |
| 마을 기술센터 핸즈 프로그램 자료 (0) | 2018.02.05 |
| Wind Speed Sensor Voltage Type(0-5V) SKU:SEN0170 (0) | 2018.01.11 |
| 스마트 그린하우스 만들때 부품 리스트 약간 - 보완이 필요함 (1) | 2017.12.11 |
| 2017 과천시 사회적경제 한마당 행사에 디지털 창작집단 참가 (0) | 2017.09.05 |
| 메이커 스페이스를 시작하는 10 Tips (0) | 2017.08.22 |
취업, 창업의 막막함, 외주 관리, 제품 부재!
당신의 고민은 무엇입니까? 현실과 동떨어진 교육, 실패만 반복하는 외주 계약,
아이디어는 있지만 구현할 기술이 없는 막막함.
우리는 알고 있습니다. 문제의 원인은 '명확한 학습, 실전 경험과 신뢰할 수 있는 기술력의 부재'에서 시작됩니다.
이제 고민을 멈추고, 캐어랩을 만나세요!
코딩(펌웨어), 전자부품과 디지털 회로설계, PCB 설계 제작, 고객(시장/수출) 발굴과 마케팅 전략으로 당신을 지원합니다.
제품 설계의 고수는 성공이 만든 게 아니라 실패가 만듭니다. 아이디어를 양산 가능한 제품으로!
귀사의 제품을 만드세요. 교육과 개발 실적으로 신뢰할 수 있는 파트너를 확보하세요.
캐어랩
WS2812.pdf