본문 바로가기
푸닥거리

아두이노 플랫폼을 활용한 코딩 기초(릴리패드)-10

by [김경민]™ ┌(  ̄∇ ̄)┘™ 2022. 4. 3.
728x90

https://www.makesandbox.cc/135

 

메이크샌드박스에 오신것을 환영합니다.

3-1. RallaPad 프레임워크 실습(아래 이미지 중 해당 번호를 클릭하면 해당 페이지로 넘어갑니다)

makesandbox.cc

5번

 

https://blog.naver.com/tesntes/222689289270

 

 

[#욜로#랄라패드] #RallaPad_FrameWork_Lib(Library,라이브러리)_실습_네오픽셀(Neo pixel)

안녕하세요! 누구나 원하는걸 만들어보는 메이크샌드박스 입니다! 오늘 소개해 드릴 내용은 저희가 이번에 ...

blog.naver.com

 

NEO PIXEL, RGB

 

 

 

 

// NeoPixel Ring simple sketch (c) 2013 Shae Erisson
// Released under the GPLv3 license to match the rest of the
// Adafruit NeoPixel library

#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
 #include <avr/power.h> // Required for 16 MHz Adafruit Trinket
#endif

// Which pin on the Arduino is connected to the NeoPixels?
#define PIN        12 // On Trinket or Gemma, suggest changing this to 1

// How many NeoPixels are attached to the Arduino?
#define NUMPIXELS 6 // Popular NeoPixel ring size

// When setting up the NeoPixel library, we tell it how many pixels,
// and which pin to use to send signals. Note that for older NeoPixel
// strips you might need to change the third parameter -- see the
// strandtest example for more information on possible values.
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);

#define DELAYVAL 500 // Time (in milliseconds) to pause between pixels

void setup() {
  // These lines are specifically to support the Adafruit Trinket 5V 16 MHz.
  // Any other board, you can remove this part (but no harm leaving it):
#if defined(__AVR_ATtiny85__) && (F_CPU == 16000000)
  clock_prescale_set(clock_div_1);
#endif
  // END of Trinket-specific code.

  pixels.begin(); // INITIALIZE NeoPixel strip object (REQUIRED)
}

void loop() {
  pixels.clear(); // Set all pixel colors to 'off'

  // The first NeoPixel in a strand is #0, second is 1, all the way up
  // to the count of pixels minus one.
  for(int i=0; i<NUMPIXELS; i++) { // For each pixel...

    // pixels.Color() takes RGB values, from 0,0,0 up to 255,255,255
    // Here we're using a moderately bright green color:
    pixels.setPixelColor(i, pixels.Color(255, 0, 0));

    pixels.show();   // Send the updated pixel colors to the hardware.

    delay(DELAYVAL); // Pause before next pass through loop
  }

 

https://blog.naver.com/tesntes/222216259456

 

[메이크 코딩-메이크 샌드박스] 아두이노에서 라이브러리 추가

안녕하세요! 누구나 원하는걸 만들어보는 메이크샌드박스 입니다! 아두이노 IDE에서 라이브러리를 추가...

blog.naver.com

 

 

http://www.makesandbox.cc/129

 

메이크샌드박스에 오신것을 환영합니다.

# 아두이노에 사용되는 라이브러리(Library) 모음

makesandbox.cc

 

 

 

 

 

 

 

 

 

 

 

 

728x90

댓글