בעיית צבעים ב-adalight.

עשה זאת בעצמך, כולל הדפסות תלת מימד
שלח תגובה
BeN-T פותח השרשור
חבר שרק התחיל
חבר שרק התחיל
תגובות: 49
הצטרף: אוגוסט 2012
נתן תודות: 2 פעמים
קיבל תודות: 7 פעמים

שליחה #1 

שלום לכולם.

עבדתי לפי המדריך הנל :

http://learn.adafruit.com/adalight-diy- ... g/overview

זאת אומרת ב Processing IDE+Arduino IDE

רק לא אותם לדים אלה סטריפ לדים עם אותם צ'יפ WS2801 .

יש לי 2 בעיות.

1) כאשר יש רקע ירוק במסך הלדים מפיצים אור כחול, וכאשר יש לי רקע כחול במסך הם מפיצים ירוק.
זאת אומרת שהסדר הוא RBG במקום RGB

2)הבעיה השניה היא חוזק הלדים-משום מה זה נראה כאילו הלדים לא מפיצים מספיק אור לעומת סרטונים ברשת.
או כמו של levimadman

http://www.htisrael.co.il/modules.php?n ... sc&start=0



הסדר במדריך הוא להכניס את הקוד LEDstrem דרך arduino

קוד: בחירת הכל

// Arduino "bridge" code between host computer and WS2801-based digital
// RGB LED pixels (e.g. Adafruit product ID #322).  Intended for use
// with USB-native boards such as Teensy or Adafruit 32u4 Breakout;
// works on normal serial Arduinos, but throughput is severely limited.
// LED data is streamed, not buffered, making this suitable for larger
// installations (e.g. video wall, etc.) than could otherwise be held
// in the Arduino's limited RAM.

// Some effort is put into avoiding buffer underruns (where the output
// side becomes starved of data).  The WS2801 latch protocol, being
// delay-based, could be inadvertently triggered if the USB bus or CPU
// is swamped with other tasks.  This code buffers incoming serial data
// and introduces intentional pauses if there's a threat of the buffer
// draining prematurely.  The cost of this complexity is somewhat
// reduced throughput, the gain is that most visual glitches are
// avoided (though ultimately a function of the load on the USB bus and
// host CPU, and out of our control).

// LED data and clock lines are connected to the Arduino's SPI output.
// On traditional Arduino boards, SPI data out is digital pin 11 and
// clock is digital pin 13.  On both Teensy and the 32u4 Breakout,
// data out is pin B2, clock is B1.  LEDs should be externally
// powered -- trying to run any more than just a few off the Arduino's
// 5V line is generally a Bad Idea.  LED ground should also be
// connected to Arduino ground.

#include <SPI.h>

// LED pin for Adafruit 32u4 Breakout Board&#58;
//#define LED_DDR  DDRE
//#define LED_PORT PORTE
//#define LED_PIN  _BV&#40;PORTE6&#41;
// LED pin for Teensy&#58;
//#define LED_DDR  DDRD
//#define LED_PORT PORTD
//#define LED_PIN  _BV&#40;PORTD6&#41;
// LED pin for Arduino&#58;
#define LED_DDR  DDRB
#define LED_PORT PORTB
#define LED_PIN  _BV&#40;PORTB5&#41;

// A 'magic word' &#40;along with LED count & checksum&#41; precedes each block
// of LED data; this assists the microcontroller in syncing up with the
// host-side software and properly issuing the latch &#40;host I/O is
// likely buffered, making usleep&#40;&#41; unreliable for latch&#41;.  You may see
// an initial glitchy frame or two until the two come into alignment.
// The magic word can be whatever sequence you like, but each character
// should be unique, and frequent pixel va&#108;ues like 0 and 255 are
// avoided -- fewer false positives.  The host software will need to
// generate a compatible header&#58; immediately following the magic word
// are three bytes&#58; a 16-bit count of the number of LEDs &#40;high byte
// first&#41; followed by a simple checksum value &#40;high byte XOR low byte
// XOR 0x55&#41;.  LED data follows, 3 bytes per LED, in order R, G, B,
// where 0 = off and 255 = max brightness.

static const uint8_t magic&#91;&#93; = &#123;'A','d','a'&#125;;
#define MAGICSIZE  sizeof&#40;magic&#41;
#define HEADERSIZE &#40;MAGICSIZE + 3&#41;

#define MODE_HEADER 0
#define MODE_HOLD   1
#define MODE_DATA   2

// If no serial data is received for a while, the LEDs are shut off
// automatically.  This avoids the annoying "stuck pixel" look when
// quitting LED display programs on the host computer.
static const unsigned long serialTimeout = 15000; // 15 seconds

void setup&#40;&#41;
&#123;
  // Dirty trick&#58; the circular buffer for serial data is 256 bytes,
  // and the "in" and "out" indices are unsigned 8-bit types -- this
  // much simplifies the cases where in/out need to "wrap around" the
  // beginning/end of the buffer.  Otherwise there'd be a ton of bit-
  // masking and/or conditional code every time one of these indices
  // needs to change, slowing things down tremendously.
  uint8_t
    buffer&#91;256&#93;,
    indexIn       = 0,
    indexOut      = 0,
    mode          = MODE_HEADER,
    hi, lo, chk, i, spiFlag;
  int16_t
    bytesBuffered = 0,
    hold          = 0,
    c;
  int32_t
    bytesRemaining;
  unsigned long
    startTime,
    lastByteTime,
    lastAckTime,
    t;

  LED_DDR  |=  LED_PIN; // Enable output for LED
  LED_PORT &= ~LED_PIN; // LED off

  Serial.begin&#40;115200&#41;; // Teensy/32u4 disregards baud rate; is OK!

  SPI.begin&#40;&#41;;
  SPI.setBitOrder&#40;MSBFIRST&#41;;
  SPI.setDataMode&#40;SPI_MODE0&#41;;
  SPI.setClockDivider&#40;SPI_CLOCK_DIV16&#41;; // 1 MHz max, else flicker

  // Issue test pattern to LEDs on startup.  This helps verify that
  // wiring between the Arduino and LEDs is correct.  Not knowing the
  // actual number of LEDs connected, this sets all of them &#40;well, up
  // to the first 25,000, so as not to be TOO time consuming&#41; to red,
  // green, blue, then off.  Once you're confident everything is working
  // end-to-end, it's OK to comment this out and reprogram the Arduino.
  uint8_t testcolor&#91;&#93; = &#123; 0, 0, 0, 255, 0, 0 &#125;;
  for&#40;char n=3; n>=0; n--&#41; &#123;
    for&#40;c=0; c<25000; c++&#41; &#123;
      for&#40;i=0; i<3; i++&#41; &#123;
        for&#40;SPDR = testcolor&#91;n + i&#93;; !&#40;SPSR & _BV&#40;SPIF&#41;&#41;; &#41;;
      &#125;
    &#125;
    delay&#40;1&#41;; // One millisecond pause = latch
  &#125;

  Serial.print&#40;"Ada\n"&#41;; // Send ACK string to host

  startTime    = micros&#40;&#41;;
  lastByteTime = lastAckTime = millis&#40;&#41;;

  // loop&#40;&#41; is avoided as even that small bit of function overhead
  // has a measurable impact on this code's overall throughput.

  for&#40;;;&#41; &#123;

    // Implementation is a simple finite-state machine.
    // Regardless of mode, check for serial input each time&#58;
    t = millis&#40;&#41;;
    if&#40;&#40;bytesBuffered < 256&#41; && &#40;&#40;c = Serial.read&#40;&#41;&#41; >= 0&#41;&#41; &#123;
      buffer&#91;indexIn++&#93; = c;
      bytesBuffered++;
      lastByteTime = lastAckTime = t; // Reset timeout counters
    &#125; else &#123;
      // No data received.  If this persists, send an ACK packet
      // to host once every second to alert it to our presence.
      if&#40;&#40;t - lastAckTime&#41; > 1000&#41; &#123;
        Serial.print&#40;"Ada\n"&#41;; // Send ACK string to host
        lastAckTime = t; // Reset counter
      &#125;
      // If no data received for an extended time, turn off all LEDs.
      if&#40;&#40;t - lastByteTime&#41; > serialTimeout&#41; &#123;
        for&#40;c=0; c<32767; c++&#41; &#123;
          for&#40;SPDR=0; !&#40;SPSR & _BV&#40;SPIF&#41;&#41;; &#41;;
        &#125;
        delay&#40;1&#41;; // One millisecond pause = latch
        lastByteTime = t; // Reset counter
      &#125;
    &#125;

    switch&#40;mode&#41; &#123;

     case MODE_HEADER&#58;

      // In header-seeking mode.  Is there enough data to check?
      if&#40;bytesBuffered >= HEADERSIZE&#41; &#123;
        // Indeed.  Check for a 'magic word' match.
        for&#40;i=0; &#40;i<MAGICSIZE&#41; && &#40;buffer&#91;indexOut++&#93; == magic&#91;i++&#93;&#41;;&#41;;
        if&#40;i == MAGICSIZE&#41; &#123;
          // Magic word matches.  Now how about the checksum?
          hi  = buffer&#91;indexOut++&#93;;
          lo  = buffer&#91;indexOut++&#93;;
          chk = buffer&#91;indexOut++&#93;;
          if&#40;chk == &#40;hi ^ lo ^ 0x55&#41;&#41; &#123;
            // Checksum looks valid.  Get 16-bit LED count, add 1
            // &#40;# LEDs is always > 0&#41; and multiply by 3 for R,G,B.
            bytesRemaining = 3L * &#40;256L * &#40;long&#41;hi + &#40;long&#41;lo + 1L&#41;;
            bytesBuffered -= 3;
            spiFlag        = 0;         // No data out yet
            mode           = MODE_HOLD; // Proceed to latch wait mode
          &#125; else &#123;
            // Checksum didn't match; search resumes after magic word.
            indexOut  -= 3; // Rewind
          &#125;
        &#125; // else no header match.  Resume at first mismatched byte.
        bytesBuffered -= i;
      &#125;
      break;

     case MODE_HOLD&#58;

      // Ostensibly "waiting for the latch from the prior frame
      // to complete" mode, but may also revert to this mode when
      // underrun prevention necessitates a delay.

      if&#40;&#40;micros&#40;&#41; - startTime&#41; < hold&#41; break; // Still holding; keep buffering

      // Latch/delay complete.  Advance to data-issuing mode...
      LED_PORT &= ~LED_PIN;  // LED off
      mode      = MODE_DATA; // ...and fall through &#40;no break&#41;&#58;

     case MODE_DATA&#58;

      while&#40;spiFlag && !&#40;SPSR & _BV&#40;SPIF&#41;&#41;&#41;; // Wait for prior byte
      if&#40;bytesRemaining > 0&#41; &#123;
        if&#40;bytesBuffered > 0&#41; &#123;
          SPDR = buffer&#91;indexOut++&#93;;   // Issue next byte
          bytesBuffered--;
          bytesRemaining--;
          spiFlag = 1;
        &#125;
        // If serial buffer is threatening to underrun, start
        // introducing progressively longer pauses to allow more
        // data to arrive &#40;up to a point&#41;.
        if&#40;&#40;bytesBuffered < 32&#41; && &#40;bytesRemaining > bytesBuffered&#41;&#41; &#123;
          startTime = micros&#40;&#41;;
          hold      = 100 + &#40;32 - bytesBuffered&#41; * 10;
          mode      = MODE_HOLD;
	&#125;
      &#125; else &#123;
        // End of data -- issue latch&#58;
        startTime  = micros&#40;&#41;;
        hold       = 1000;        // Latch duration = 1000 uS
        LED_PORT  |= LED_PIN;     // LED on
        mode       = MODE_HEADER; // Begin next header search
      &#125;
    &#125; // end switch
  &#125; // end for&#40;;;&#41;
&#125;

void loop&#40;&#41;
&#123;
  // Not used.  See note in setup&#40;&#41; function.
&#125;
ואז להכניס את הקוד הזה: Colorswirl

קוד: בחירת הכל

// "Colorswirl" LED demo.  This is the host PC-side code written in
// Processing; intended for use with a USB-connected Arduino microcontroller
// running the accompanying LED streaming code.  Requires one strand of
// Digital RGB LED Pixels &#40;Adafruit product ID #322, specifically the newer
// WS2801-based type, strand of 25&#41; and a 5 Volt power supply &#40;such as
// Adafruit #276&#41;.  You may need to adapt the code and the hardware
// arrangement for your specific configuration.

import processing.serial.*;

int N_LEDS = 25; // Max of 65536

void setup&#40;&#41;
&#123;
  byte&#91;&#93; buffer = new byte&#91;6 + N_LEDS * 3&#93;;
  Serial myPort;
  int    i, hue1, hue2, bright, lo, r, g, b, t, prev, frame = 0;
  long   totalBytesSent = 0;
  float  sine1, sine2;

  noLoop&#40;&#41;;

  // Assumes the Arduino is the first/only serial device.  If this is not the
  // case, change the device index here.  println&#40;Serial.list&#40;&#41;&#41;; can be used
  // to get a list of available serial devices.
  myPort = new Serial&#40;this, Serial.list&#40;&#41;&#91;0&#93;, 115200&#41;;

  // A special header / magic word is expected by the corresponding LED
  // streaming code running on the Arduino.  This only needs to be initialized
  // once because the number of LEDs remains constant&#58;
  buffer&#91;0&#93; = 'A';                                // Magic word
  buffer&#91;1&#93; = 'd';
  buffer&#91;2&#93; = 'a';
  buffer&#91;3&#93; = byte&#40;&#40;N_LEDS - 1&#41; >> 8&#41;;            // LED count high byte
  buffer&#91;4&#93; = byte&#40;&#40;N_LEDS - 1&#41; & 0xff&#41;;          // LED count low byte
  buffer&#91;5&#93; = byte&#40;buffer&#91;3&#93; ^ buffer&#91;4&#93; ^ 0x55&#41;; // Checksum

  sine1 = 0.0;
  hue1  = 0;
  prev  = second&#40;&#41;; // For bandwidth statistics

  for &#40;;;&#41; &#123;
    sine2 = sine1;
    hue2  = hue1;

    // Start at position 6, after the LED header/magic word
    for &#40;i = 6; i < buffer.length; &#41; &#123;
      // Fixed-point hue-to-RGB conversion.  'hue2' is an integer in the
      // range of 0 to 1535, where 0 = red, 256 = yellow, 512 = green, etc.
      // The high byte &#40;0-5&#41; corresponds to the sextant within the color
      // wheel, while the low byte &#40;0-255&#41; is the fractional part between
      // the primary/secondary colors.
      lo = hue2 & 255;
      switch&#40;&#40;hue2 >> 8&#41; % 6&#41; &#123;
      case 0&#58;
        r = 255;
        g = lo;
        b = 0;
        break;
      case 1&#58;
        r = 255 - lo;
        g = 255;
        b = 0;
        break;
      case 2&#58;
        r = 0;
        g = 255;
        b = lo;
        break;
      case 3&#58;
        r = 0;
        g = 255 - lo;
        b = 255;
        break;
      case 4&#58;
        r = lo;
        g = 0;
        b = 255;
        break;
      default&#58;
        r = 255;
        g = 0;
        b = 255 - lo;
        break;
      &#125;

      // Resulting hue is multiplied by brightness in the range of 0 to 255
      // &#40;0 = off, 255 = brightest&#41;.  Gamma corrrection &#40;the 'pow' function
      // here&#41; adjusts the brightness to be more perceptually linear.
      bright      = int&#40;pow&#40;0.5 + sin&#40;sine2&#41; * 0.5, 2.8&#41; * 255.0&#41;;
      buffer&#91;i++&#93; = byte&#40;&#40;r * bright&#41; / 255&#41;;
      buffer&#91;i++&#93; = byte&#40;&#40;g * bright&#41; / 255&#41;;
      buffer&#91;i++&#93; = byte&#40;&#40;b * bright&#41; / 255&#41;;

      // Each pixel is slightly offset in both hue and brightness
      hue2  += 40;
      sine2 += 0.3;
    &#125;

    // Slowly rotate hue and brightness in opposite directions
    hue1   = &#40;hue1 + 4&#41; % 1536;
    sine1 -= .03;

    // Issue color data to LEDs and keep track of the byte and frame counts
    myPort.write&#40;buffer&#41;;
    totalBytesSent += buffer.length;
    frame++;

    // Update statistics once per second
    if &#40;&#40;t = second&#40;&#41;&#41; != prev&#41; &#123;
      print&#40;"Average frames/sec&#58; "&#41;;
      print&#40;int&#40;&#40;float&#41;frame / &#40;float&#41;millis&#40;&#41; * 1000.0&#41;&#41;;
      print&#40;", bytes/sec&#58; "&#41;;
      println&#40;int&#40;&#40;float&#41;totalBytesSent / &#40;float&#41;millis&#40;&#41; * 1000.0&#41;&#41;;
      prev = t;
    &#125;
  &#125;
&#125;

void draw&#40;&#41;
&#123;
&#125;
ואז את הקוד adalight ששיניתי בהתאם למספר הלדים שיש לי וחלוקה.

קוד: בחירת הכל

// "Adalight" is a do-it-yourself facsimile of the Philips Ambilight concept
// for desktop computers and home theater PCs.  This is the host PC-side code
// written in Processing, intended for use with a USB-connected Arduino
// microcontroller running the accompanying LED streaming code.  Requires one
// or more strands of Digital RBG LED Pixels &#40;Adafruit product ID #322,
// specifically the newer WS2801-based type, strand of 25&#41; and a 5 Volt power
// supply &#40;such as Adafruit #276&#41;.  You may need to adapt the code and the
// hardware arrangement for your specific display configuration.
// Screen capture adapted from code by Cedrik Kiefer &#40;processing.org forum&#41;

import java.awt.*;
import java.awt.image.*;
import processing.serial.*;

// CONFIGURABLE PROGRAM CONSTANTS --------------------------------------------

// Minimum LED brightness; some users prefer a small amount of backlighting
// at all times, regardless of screen content.  Higher va&#108;ues are brighter,
// or set to 0 to disable this feature.

static final short minBrightness = 150;

// LED transition speed; it's sometimes distracting if LEDs instantaneously
// track screen contents &#40;such as during bright flashing sequences&#41;, so this
// feature enables a gradual fade to each new LED state.  Higher numbers yield
// slower transitions &#40;max of 255&#41;, or set to 0 to disable this feature
// &#40;immediate transition of all LEDs&#41;.

static final short fade = 75;

// Pixel size for the live preview image.

static final int pixelSize = 20;

// Depending on many factors, it may be faster either to capture full
// screens and process only the pixels needed, or to capture multiple
// smaller sub-blocks bounding each region to be processed.  Try both,
// look at the reported frame rates in the Processing output console,
// and run with whichever works best for you.

static final boolean useFullScreenCaps = true;

// Serial device timeout &#40;in milliseconds&#41;, for locating Arduino device
// running the corresponding LEDstream code.  See notes later in the code...
// in some situations you may want to entirely comment out that block.

static final int timeout = 5000; // 5 seconds

// PER-DISPLAY INFORMATION ---------------------------------------------------

// This array contains details for each display that the software will
// process.  If you have screen&#40;s&#41; attached that are not among those being
// "Adalighted," they should not be in this list.  Each triplet in this
// array represents one display.  The first number is the system screen
// number...typically the "primary" display on most systems is identified
// as screen #1, but since arrays are indexed from zero, use 0 to indicate
// the first screen, 1 to indicate the second screen, and so forth.  This
// is the ONLY place system screen numbers are used...ANY subsequent
// references to displays are an index into this list, NOT necessarily the
// same as the system screen number.  For example, if you have a three-
// screen setup and are illuminating only the third display, use '2' for
// the screen number here...and then, in subsequent section, '0' will be
// used to refer to the first/only display in this list.
// The second and third numbers of each triplet represent the width and
// height of a grid of LED pixels attached to the perimeter of this display.
// For example, '9,6' = 9 LEDs across, 6 LEDs down.

static final int displays&#91;&#93; &#91;&#93; = new int&#91;&#93;&#91;&#93; &#123;
   &#123;0,42,27&#125; // Screen 0,40 LEDs across, 25 LEDs down
//,&#123;1,9,6&#125; // Screen 1, also 9 LEDs across and 6 LEDs down
&#125;;

// PER-LED INFORMATION -------------------------------------------------------

// This array contains the 2D coordinates corresponding to each pixel in the
// LED strand, in the order that they're connected &#40;i.e. the first element
// here belongs to the first LED in the strand, second element is the second
// LED, and so forth&#41;.  Each triplet in this array consists of a display
// number &#40;an index into the display array above, NOT necessarily the same as
// the system screen number&#41; and an X and Y coordinate specified in the grid
// units given for that display.  &#123;0,0,0&#125; is the top-left corner of the first
// display in the array.
// For our example purposes, the coordinate list below forms a ring around
// the perimeter of a single screen, with a one pixel gap at the bottom to
// accommodate a monitor stand.  Modify this to match your own setup&#58;

static final int leds&#91;&#93;&#91;&#93; = new int&#91;&#93;&#91;&#93; &#123;
   &#123;0,1,0&#125;, &#123;0,2,0&#125;, &#123;0,3,0&#125;, &#123;0,4,0&#125;, &#123;0,5,0&#125;, &#123;0,6,0&#125;, &#123;0,7,0&#125;, &#123;0,8,0&#125;, &#123;0,9,0&#125;, &#123;0,10,0&#125;, &#123;0,11,0&#125;, &#123;0,12,0&#125;, &#123;0,13,0&#125;, &#123;0,14,0&#125;, &#123;0,15,0&#125;,&#123;0,16,0&#125;, &#123;0,17,0&#125;, &#123;0,18,0&#125;, &#123;0,19,0&#125;, &#123;0,20,0&#125;, // Top edge
  &#123;0,21,0&#125;, &#123;0,22,0&#125;, &#123;0,23,0&#125;, &#123;0,24,0&#125;, &#123;0,25,0&#125;, &#123;0,26,0&#125;, &#123;0,27,0&#125;, &#123;0,28,0&#125;, &#123;0,29,0&#125;, &#123;0,30,0&#125;, &#123;0,31,0&#125;, &#123;0,32,0&#125;, &#123;0,33,0&#125;, &#123;0,34,0&#125;, &#123;0,35,0&#125;,&#123;0,36,0&#125;, &#123;0,37,0&#125;, &#123;0,38,0&#125;, &#123;0,39,0&#125;, &#123;0,40,0&#125;, // More top edge
  &#123;0,41,0&#125;, &#123;0,41,1&#125;, &#123;0,42,2&#125;, &#123;0,41,3&#125;, &#123;0,41,4&#125;, &#123;0,41,5&#125;, &#123;0,41,6&#125;, &#123;0,41,7&#125;, &#123;0,41,8&#125;, &#123;0,41,9&#125;, &#123;0,41,10&#125;, &#123;0,41,11&#125;, &#123;0,41,12&#125;, &#123;0,42,13&#125;, &#123;0,41,14&#125;,&#123;0,41,15&#125;, &#123;0,41,16&#125;, &#123;0,41,17&#125;, &#123;0,41,18&#125;,&#123;0,41,19&#125;, &#123;0,41,20&#125;, &#123;0,41,21&#125;, &#123;0,41,22&#125;, &#123;0,41,23&#125;, &#123;0,41,24&#125;, // Right edge
  &#123;0,40,24&#125;, &#123;0,39,24&#125;, &#123;0,38,24&#125;, &#123;0,37,24&#125;, &#123;0,36,24&#125;, &#123;0,35,24&#125;, &#123;0,34,24&#125;, &#123;0,33,24&#125;, &#123;0,32,24&#125;, &#123;0,31,24&#125;, &#123;0,30,24&#125;, &#123;0,29,24&#125;, &#123;0,28,24&#125;, &#123;0,27,24&#125;, &#123;0,26,24&#125;, &#123;0,25,24&#125;,&#123;0,24,24&#125;, &#123;0,23,24&#125;, &#123;0,22,24&#125;, &#123;0,21,24&#125;,  // Bottom edge, right half
  &#123;0,20,24&#125;, &#123;0,19,24&#125;, &#123;0,18,24&#125;, &#123;0,17,24&#125;, &#123;0,16,24&#125;,&#123;0,15,24&#125;, &#123;0,14,24&#125;, &#123;0,13,24&#125;, &#123;0,12,24&#125;,&#123;0,11,24&#125;, &#123;0,10,24&#125;, &#123;0,9,24&#125;, &#123;0,8,24&#125;,&#123;0,7,24&#125;, &#123;0,6,24&#125;, &#123;0,5,24&#125;, &#123;0,4,24&#125;, &#123;0,3,24&#125;, &#123;0,2,24&#125;, &#123;0,1,24&#125;, // Bottom edge, left half
  &#123;0,0,24&#125;, &#123;0,0,23&#125;, &#123;0,0,22&#125;, &#123;0,0,21&#125;,&#123;0,0,20&#125;, &#123;0,0,19&#125;, &#123;0,0,18&#125;, &#123;0,0,17&#125;,&#123;0,0,16&#125;, &#123;0,0,15&#125;, &#123;0,0,14&#125;, &#123;0,0,13&#125;,&#123;0,0,12&#125;, &#123;0,0,11&#125;, &#123;0,0,10&#125;, &#123;0,0,9&#125;,&#123;0,0,8&#125;, &#123;0,0,7&#125;, &#123;0,0,6&#125;, &#123;0,0,5&#125;,&#123;0,0,4&#125;, &#123;0,0,3&#125;, &#123;0,0,2&#125;, &#123;0,0,1&#125;, &#123;0,0,0&#125;, // Left edge

  

/* Hypothetical second display has the same arrangement as the first.
   But you might not want both displays completely ringed with LEDs;
   the screens might be positioned where they share an edge in common.
 ,&#123;1,3,5&#125;, &#123;1,2,5&#125;, &#123;1,1,5&#125;, &#123;1,0,5&#125;, // Bottom edge, left half
  &#123;1,0,4&#125;, &#123;1,0,3&#125;, &#123;1,0,2&#125;, &#123;1,0,1&#125;, // Left edge
  &#123;1,0,0&#125;, &#123;1,1,0&#125;, &#123;1,2,0&#125;, &#123;1,3,0&#125;, &#123;1,4,0&#125;, // Top edge
           &#123;1,5,0&#125;, &#123;1,6,0&#125;, &#123;1,7,0&#125;, &#123;1,8,0&#125;, // More top edge
  &#123;1,8,1&#125;, &#123;1,8,2&#125;, &#123;1,8,3&#125;, &#123;1,8,4&#125;, // Right edge
  &#123;1,8,5&#125;, &#123;1,7,5&#125;, &#123;1,6,5&#125;, &#123;1,5,5&#125;  // Bottom edge, right half
*/
&#125;;

// GLOBAL VARIABLES ---- You probably won't need to modify any of this -------

byte&#91;&#93;           serialData  = new byte&#91;6 + leds.length * 3&#93;;
short&#91;&#93;&#91;&#93;        ledColor    = new short&#91;leds.length&#93;&#91;3&#93;,
                 prevColor   = new short&#91;leds.length&#93;&#91;3&#93;;
byte&#91;&#93;&#91;&#93;         gamma       = new byte&#91;256&#93;&#91;3&#93;;
int              nDisplays   = displays.length;
Robot&#91;&#93;          bot         = new Robot&#91;displays.length&#93;;
Rectangle&#91;&#93;      dispBounds  = new Rectangle&#91;displays.length&#93;,
                 ledBounds;  // Alloc'd only if per-LED captures
int&#91;&#93;&#91;&#93;          pixelOffset = new int&#91;leds.length&#93;&#91;256&#93;,
                 screenData; // Alloc'd only if full-screen captures
PImage&#91;&#93;         preview     = new PImage&#91;displays.length&#93;;
Serial           port;
DisposeHandler   dh; // For disabling LEDs on exit

// INITIALIZATION ------------------------------------------------------------

void setup&#40;&#41; &#123;
  GraphicsEnvironment     ge;
  GraphicsConfiguration&#91;&#93; gc;
  GraphicsDevice&#91;&#93;        gd;
  int                     d, i, totalWidth, maxHeight, row, col, rowOffset;
  int&#91;&#93;                   x = new int&#91;16&#93;, y = new int&#91;16&#93;;
  float                   f, range, step, start;

  dh = new DisposeHandler&#40;this&#41;; // Init DisposeHandler ASAP

  // Open serial port.  As written here, this assumes the Arduino is the
  // first/only serial device on the system.  If that's not the case,
  // change "Serial.list&#40;&#41;&#91;0&#93;" to the name of the port to be used&#58;
  port = new Serial&#40;this, Serial.list&#40;&#41;&#91;0&#93;, 115200&#41;;
  // a&#108;ternately, in certain situations the following line can be used
  // to detect the Arduino automatically.  But this works ONLY with SOME
  // Arduino boards and versions of Processing!  This is so convoluted
  // to explain, it's easier just to test it yourself and see whether
  // it works...if not, leave it commented out and use the prior port-
  // opening technique.
  // port = openPort&#40;&#41;;
  // And finally, to test the software alone without an Arduino connected,
  // don't open a port...just comment out the serial lines above.

  // Initialize screen capture code for each display's dimensions.
  dispBounds = new Rectangle&#91;displays.length&#93;;
  if&#40;useFullScreenCaps == true&#41; &#123;
    screenData = new int&#91;displays.length&#93;&#91;&#93;;
    // ledBounds&#91;&#93; not used
  &#125; else &#123;
    ledBounds  = new Rectangle&#91;leds.length&#93;;
    // screenData&#91;&#93;&#91;&#93; not used
  &#125;
  ge = GraphicsEnvironment.getLocalGraphicsEnvironment&#40;&#41;;
  gd = ge.getScreenDevices&#40;&#41;;
  if&#40;nDisplays > gd.length&#41; nDisplays = gd.length;
  totalWidth = maxHeight = 0;
  for&#40;d=0; d<nDisplays; d++&#41; &#123; // For each display...
    try &#123;
      bot&#91;d&#93; = new Robot&#40;gd&#91;displays&#91;d&#93;&#91;0&#93;&#93;&#41;;
    &#125;
    catch&#40;AWTException e&#41; &#123;
      System.out.println&#40;"new Robot&#40;&#41; failed"&#41;;
      continue;
    &#125;
    gc              = gd&#91;displays&#91;d&#93;&#91;0&#93;&#93;.getConfigurations&#40;&#41;;
    dispBounds&#91;d&#93;   = gc&#91;0&#93;.getBounds&#40;&#41;;
    dispBounds&#91;d&#93;.x = dispBounds&#91;d&#93;.y = 0;
    preview&#91;d&#93;      = createImage&#40;displays&#91;d&#93;&#91;1&#93;, displays&#91;d&#93;&#91;2&#93;, RGB&#41;;
    preview&#91;d&#93;.loadPixels&#40;&#41;;
    totalWidth     += displays&#91;d&#93;&#91;1&#93;;
    if&#40;d > 0&#41; totalWidth++;
    if&#40;displays&#91;d&#93;&#91;2&#93; > maxHeight&#41; maxHeight = displays&#91;d&#93;&#91;2&#93;;
  &#125;

  // Precompute locations of every pixel to read when downsampling.
  // Saves a bunch of math on each frame, at the expense of a chunk
  // of RAM.  Number of samples is now fixed at 256; this allows for
  // some crazy optimizations in the downsampling code.
  for&#40;i=0; i<leds.length; i++&#41; &#123; // For each LED...
    d = leds&#91;i&#93;&#91;0&#93;; // Corresponding display index

    // Precompute columns, rows of each sampled point for this LED
    range = &#40;float&#41;dispBounds&#91;d&#93;.width / &#40;float&#41;displays&#91;d&#93;&#91;1&#93;;
    step  = range / 16.0;
    start = range * &#40;float&#41;leds&#91;i&#93;&#91;1&#93; + step * 0.5;
    for&#40;col=0; col<16; col++&#41; x&#91;col&#93; = &#40;int&#41;&#40;start + step * &#40;float&#41;col&#41;;
    range = &#40;float&#41;dispBounds&#91;d&#93;.height / &#40;float&#41;displays&#91;d&#93;&#91;2&#93;;
    step  = range / 16.0;
    start = range * &#40;float&#41;leds&#91;i&#93;&#91;2&#93; + step * 0.5;
    for&#40;row=0; row<16; row++&#41; y&#91;row&#93; = &#40;int&#41;&#40;start + step * &#40;float&#41;row&#41;;

    if&#40;useFullScreenCaps == true&#41; &#123;
      // Get offset to each pixel within full screen capture
      for&#40;row=0; row<16; row++&#41; &#123;
        for&#40;col=0; col<16; col++&#41; &#123;
          pixelOffset&#91;i&#93;&#91;row * 16 + col&#93; =
            y&#91;row&#93; * dispBounds&#91;d&#93;.width + x&#91;col&#93;;
        &#125;
      &#125;
    &#125; else &#123;
      // Calc min bounding rect for LED, get offset to each pixel within
      ledBounds&#91;i&#93; = new Rectangle&#40;x&#91;0&#93;, y&#91;0&#93;, x&#91;15&#93;-x&#91;0&#93;+1, y&#91;15&#93;-y&#91;0&#93;+1&#41;;
      for&#40;row=0; row<16; row++&#41; &#123;
        for&#40;col=0; col<16; col++&#41; &#123;
          pixelOffset&#91;i&#93;&#91;row * 16 + col&#93; =
            &#40;y&#91;row&#93; - y&#91;0&#93;&#41; * ledBounds&#91;i&#93;.width + x&#91;col&#93; - x&#91;0&#93;;
        &#125;
      &#125;
    &#125;
  &#125;

  for&#40;i=0; i<prevColor.length; i++&#41; &#123;
    prevColor&#91;i&#93;&#91;0&#93; = prevColor&#91;i&#93;&#91;1&#93; = prevColor&#91;i&#93;&#91;2&#93; =
      minBrightness / 3;
  &#125;

  // Preview window shows all screens side-by-side
  size&#40;totalWidth * pixelSize, maxHeight * pixelSize, JAVA2D&#41;;

  // A special header / magic word is expected by the corresponding LED
  // streaming code running on the Arduino.  This only needs to be initialized
  // once &#40;not in draw&#40;&#41; loop&#41; because the number of LEDs remains constant&#58;
  serialData&#91;0&#93; = 'A';                              // Magic word
  serialData&#91;1&#93; = 'd';
  serialData&#91;2&#93; = 'a';
  serialData&#91;3&#93; = &#40;byte&#41;&#40;&#40;leds.length - 1&#41; >> 8&#41;;   // LED count high byte
  serialData&#91;4&#93; = &#40;byte&#41;&#40;&#40;leds.length - 1&#41; & 0xff&#41;; // LED count low byte
  serialData&#91;5&#93; = &#40;byte&#41;&#40;serialData&#91;3&#93; ^ serialData&#91;4&#93; ^ 0x55&#41;; // Checksum

  // Pre-compute gamma correction tab&#108;e for LED brightness levels&#58;
  for&#40;i=0; i<256; i++&#41; &#123;
    f           = pow&#40;&#40;float&#41;i / 255.0, 2.8&#41;;
    gamma&#91;i&#93;&#91;0&#93; = &#40;byte&#41;&#40;f * 255.0&#41;;
    gamma&#91;i&#93;&#91;1&#93; = &#40;byte&#41;&#40;f * 240.0&#41;;
    gamma&#91;i&#93;&#91;2&#93; = &#40;byte&#41;&#40;f * 220.0&#41;;
  &#125;
&#125;

// Open and return serial connection to Arduino running LEDstream code.  This
// attempts to open and read from each serial device on the system, until the
// matching "Ada\n" acknowledgement string is found.  Due to the serial
// timeout, if you have multiple serial devices/ports and the Arduino is late
// in the list, this can take seemingly forever...so if you KNOW the Arduino
// will always be on a specific port &#40;e.g. "COM6"&#41;, you might want to comment
// out most of this to bypass the checks and instead just open that port
// directly!  &#40;Modify last line in this method with the serial port name.&#41;

Serial openPort&#40;&#41; &#123;
  String&#91;&#93; ports;
  String   ack;
  int      i, start;
  Serial   s;

  ports = Serial.list&#40;&#41;; // List of all serial ports/devices on system.

  for&#40;i=0; i<ports.length; i++&#41; &#123; // For each serial port...
    System.out.format&#40;"Trying serial port %s\n",ports&#91;i&#93;&#41;;
    try &#123;
      s = new Serial&#40;this, ports&#91;i&#93;, 115200&#41;;
    &#125;
    catch&#40;Exception e&#41; &#123;
      // Can't open port, probably in use by other software.
      continue;
    &#125;
    // Port open...watch for acknowledgement string...
    start = millis&#40;&#41;;
    while&#40;&#40;millis&#40;&#41; - start&#41; < timeout&#41; &#123;
      if&#40;&#40;s.available&#40;&#41; >= 4&#41; &&
        &#40;&#40;ack = s.readString&#40;&#41;&#41; != null&#41; &&
        ack.contains&#40;"Ada\n"&#41;&#41; &#123;
          return s; // Got it!
      &#125;
    &#125;
    // Connection timed out.  Close port and move on to the next.
    s.stop&#40;&#41;;
  &#125;

  // Didn't locate a device returning the acknowledgment string.
  // Maybe it's out there but running the old LEDstream code, which
  // didn't have the ACK.  Can't say for sure, so we'll take our
  // changes with the first/only serial device out there...
  return new Serial&#40;this, ports&#91;0&#93;, 115200&#41;;
&#125;


// PER_FRAME PROCESSING ------------------------------------------------------

void draw &#40;&#41; &#123;
  BufferedImage img;
  int           d, i, j, o, c, weight, rb, g, sum, deficit, s2;
  int&#91;&#93;         pxls, offs;

  if&#40;useFullScreenCaps == true &#41; &#123;
    // Capture each screen in the displays array.
    for&#40;d=0; d<nDisplays; d++&#41; &#123;
      img = bot&#91;d&#93;.createScreenCapture&#40;dispBounds&#91;d&#93;&#41;;
      // Get location of source pixel data
      screenData&#91;d&#93; =
        &#40;&#40;DataBufferInt&#41;img.getRaster&#40;&#41;.getDataBuffer&#40;&#41;&#41;.getData&#40;&#41;;
    &#125;
  &#125;

  weight = 257 - fade; // 'Weighting factor' for new frame vs. old
  j      = 6;          // Serial led data follows header / magic word

  // This computes a single pixel value filtered down from a rectangular
  // section of the screen.  While it would seem tempting to use the native
  // image scaling in Processing/Java, in practice this didn't look very
  // good -- either too pixelated or too blurry, no happy medium.  So
  // instead, a "manual" downsampling is done here.  In the interest of
  // speed, it doesn't actually sample every pixel within a block, just
  // a selection of 256 pixels spaced within the block...the results still
  // look reasonably smooth and are handled quickly enough for video.

  for&#40;i=0; i<leds.length; i++&#41; &#123;  // For each LED...
    d = leds&#91;i&#93;&#91;0&#93;; // Corresponding display index
    if&#40;useFullScreenCaps == true&#41; &#123;
      // Get location of source data from prior full-screen capture&#58;
      pxls = screenData&#91;d&#93;;
    &#125; else &#123;
      // Capture section of screen &#40;LED bounds rect&#41; and locate data&#58;&#58;
      img  = bot&#91;d&#93;.createScreenCapture&#40;ledBounds&#91;i&#93;&#41;;
      pxls = &#40;&#40;DataBufferInt&#41;img.getRaster&#40;&#41;.getDataBuffer&#40;&#41;&#41;.getData&#40;&#41;;
    &#125;
    offs = pixelOffset&#91;i&#93;;
    rb = g = 0;
    for&#40;o=0; o<256; o++&#41; &#123;
      c   = pxls&#91;offs&#91;o&#93;&#93;;
      rb += c & 0x00ff00ff; // Bit trickery&#58; R+B can accumulate in one var
      g  += c & 0x0000ff00;
    &#125;

    // Blend new pixel value with the value from the prior frame
    ledColor&#91;i&#93;&#91;0&#93;  = &#40;short&#41;&#40;&#40;&#40;&#40;rb >> 24&#41; & 0xff&#41; * weight +
                               prevColor&#91;i&#93;&#91;0&#93;     * fade&#41; >> 8&#41;;
    ledColor&#91;i&#93;&#91;1&#93;  = &#40;short&#41;&#40;&#40;&#40;&#40; g >> 16&#41; & 0xff&#41; * weight +
                               prevColor&#91;i&#93;&#91;1&#93;     * fade&#41; >> 8&#41;;
    ledColor&#91;i&#93;&#91;2&#93;  = &#40;short&#41;&#40;&#40;&#40;&#40;rb >>  8&#41; & 0xff&#41; * weight +
                               prevColor&#91;i&#93;&#91;2&#93;     * fade&#41; >> 8&#41;;

    // Boost pixels that fall below the minimum brightness
    sum = ledColor&#91;i&#93;&#91;0&#93; + ledColor&#91;i&#93;&#91;1&#93; + ledColor&#91;i&#93;&#91;2&#93;;
    if&#40;sum < minBrightness&#41; &#123;
      if&#40;sum == 0&#41; &#123; // To avoid divide-by-zero
        deficit = minBrightness / 3; // Spread equally to R,G,B
        ledColor&#91;i&#93;&#91;0&#93; += deficit;
        ledColor&#91;i&#93;&#91;1&#93; += deficit;
        ledColor&#91;i&#93;&#91;2&#93; += deficit;
      &#125; else &#123;
        deficit = minBrightness - sum;
        s2      = sum * 2;
        // Spread the "brightness deficit" back into R,G,B in proportion to
        // their individual contribition to that deficit.  Rather than simply
        // boosting all pixels at the low end, this allows deep &#40;but saturated&#41;
        // colors to stay saturated...they don't "pink out."
        ledColor&#91;i&#93;&#91;0&#93; += deficit * &#40;sum - ledColor&#91;i&#93;&#91;0&#93;&#41; / s2;
        ledColor&#91;i&#93;&#91;1&#93; += deficit * &#40;sum - ledColor&#91;i&#93;&#91;1&#93;&#41; / s2;
        ledColor&#91;i&#93;&#91;2&#93; += deficit * &#40;sum - ledColor&#91;i&#93;&#91;2&#93;&#41; / s2;
      &#125;
    &#125;

    // Apply gamma curve and place in serial output buffer
    serialData&#91;j++&#93; = gamma&#91;ledColor&#91;i&#93;&#91;0&#93;&#93;&#91;0&#93;;
    serialData&#91;j++&#93; = gamma&#91;ledColor&#91;i&#93;&#91;1&#93;&#93;&#91;1&#93;;
    serialData&#91;j++&#93; = gamma&#91;ledColor&#91;i&#93;&#91;2&#93;&#93;&#91;2&#93;;
    // Update pixels in preview image
    preview&#91;d&#93;.pixels&#91;leds&#91;i&#93;&#91;2&#93; * displays&#91;d&#93;&#91;1&#93; + leds&#91;i&#93;&#91;1&#93;&#93; =
     &#40;ledColor&#91;i&#93;&#91;0&#93; << 16&#41; | &#40;ledColor&#91;i&#93;&#91;1&#93; << 8&#41; | ledColor&#91;i&#93;&#91;2&#93;;
  &#125;

  if&#40;port != null&#41; port.write&#40;serialData&#41;; // Issue data to Arduino

  // Show live preview image&#40;s&#41;
  scale&#40;pixelSize&#41;;
  for&#40;i=d=0; d<nDisplays; d++&#41; &#123;
    preview&#91;d&#93;.updatePixels&#40;&#41;;
    image&#40;preview&#91;d&#93;, i, 0&#41;;
    i += displays&#91;d&#93;&#91;1&#93; + 1;
  &#125;

  println&#40;frameRate&#41;; // How are we doing?

  // Copy LED color data to prior frame array for next pass
  arraycopy&#40;ledColor, 0, prevColor, 0, ledColor.length&#41;;
&#125;


// CLEANUP -------------------------------------------------------------------

// The DisposeHandler is called on program exit &#40;but before the Serial library
// is shutdown&#41;, in order to turn off the LEDs &#40;reportedly more reliable than
// stop&#40;&#41;&#41;.  Seems to work for the window close box and escape key exit, but
// not the 'Quit' menu option.  Thanks to phi.lho in the Processing forums.

public class DisposeHandler &#123;
  DisposeHandler&#40;PApplet pa&#41; &#123;
    pa.registerDispose&#40;this&#41;;
  &#125;
  public void dispose&#40;&#41; &#123;
    // Fill serialData &#40;after header&#41; with 0's, and issue to Arduino...
    Arrays.fill&#40;serialData, 6, serialData.length, &#40;byte&#41;0&#41;;
    if&#40;port != null&#41; port.write&#40;serialData&#41;;
  &#125;
&#125;
לאחר בדיקות בפורום של adafruit הם לא נענים לי שלא רכש מהם את המוצרים.:(
תודה רבה לעוזרים.

בן.

--בעת סיום הפרויקט אני יעלה תמונות וסרטון על הבניה--

levimadman
חבר פעיל
חבר פעיל
תגובות: 99
הצטרף: יוני 2009
נתן תודות: 8 פעמים
קיבל תודות: 6 פעמים

שליחה #2 

האמת, אני לא ככ מכיר את הקוד ואין לי יותר מדי זמן להתעמק, אבל מה שאתה יכול לנסות ולעשות מהסתכלות מהירה

בקוד של processing (הקוד שנראה כמו Java)
השורות הבאות:

קוד: בחירת הכל

ledColor&#91;i&#93;&#91;0&#93;  = &#40;short&#41;&#40;&#40;&#40;&#40;rb >> 24&#41; & 0xff&#41; * weight + 
                               prevColor&#91;i&#93;&#91;0&#93;     * fade&#41; >> 8&#41;; 
    ledColor&#91;i&#93;&#91;1&#93;  = &#40;short&#41;&#40;&#40;&#40;&#40; g >> 16&#41; & 0xff&#41; * weight + 
                               prevColor&#91;i&#93;&#91;1&#93;     * fade&#41; >> 8&#41;; 
    ledColor&#91;i&#93;&#91;2&#93;  = &#40;short&#41;&#40;&#40;&#40;&#40;rb >>  8&#41; & 0xff&#41; * weight + 
                               prevColor&#91;i&#93;&#91;2&#93;     * fade&#41; >> 8&#41;; 

נסה להחליף לדבר הבא:

קוד: בחירת הכל

ledColor&#91;i&#93;&#91;2&#93;  = &#40;short&#41;&#40;&#40;&#40;&#40;rb >> 24&#41; & 0xff&#41; * weight + 
                               prevColor&#91;i&#93;&#91;2&#93;     * fade&#41; >> 8&#41;; 
    ledColor&#91;i&#93;&#91;1&#93;  = &#40;short&#41;&#40;&#40;&#40;&#40; g >> 16&#41; & 0xff&#41; * weight + 
                               prevColor&#91;i&#93;&#91;1&#93;     * fade&#41; >> 8&#41;; 
    ledColor&#91;i&#93;&#91;0&#93;  = &#40;short&#41;&#40;&#40;&#40;&#40;rb >>  8&#41; & 0xff&#41; * weight + 
                               prevColor&#91;i&#93;&#91;0&#93;     * fade&#41; >> 8&#41;; 

ותעדכן ...

BeN-T פותח השרשור
חבר שרק התחיל
חבר שרק התחיל
תגובות: 49
הצטרף: אוגוסט 2012
נתן תודות: 2 פעמים
קיבל תודות: 7 פעמים

שליחה #3 

מצוין זה עזר!!

רק עם שינוי קטן אתה החלפת לי בין האדום לכחול-הבנתי את המשחק עם ה-0-אדום 1-ירוק ו-2 כחול.

וזה השינוי הנכון

קוד: בחירת הכל

ledColor&#91;i&#93;&#91;0&#93;  = &#40;short&#41;&#40;&#40;&#40;&#40;rb >> 24&#41; & 0xff&#41; * weight + 
                               prevColor&#91;0&#93;&#91;2&#93;     * fade&#41; >> 8&#41;; 
    ledColor&#91;i&#93;&#91;2&#93;  = &#40;short&#41;&#40;&#40;&#40;&#40; g >> 16&#41; & 0xff&#41; * weight + 
                               prevColor&#91;i&#93;&#91;2&#93;     * fade&#41; >> 8&#41;; 
    ledColor&#91;i&#93;&#91;1&#93;  = &#40;short&#41;&#40;&#40;&#40;&#40;rb >>  8&#41; & 0xff&#41; * weight + 
                               prevColor&#91;i&#93;&#91;1&#93;     * fade&#41; >> 8&#41;;
המון תודה.
רק נשאר לי בעיה אחרונה-רמת האור נמוכה (לעומת שלך וסרטונים ברשת)
מה יכול להיות הבעיה?
ספק 5V 10A
האם זה משהו גם כן בקוד?

BeN-T פותח השרשור
חבר שרק התחיל
חבר שרק התחיל
תגובות: 49
הצטרף: אוגוסט 2012
נתן תודות: 2 פעמים
קיבל תודות: 7 פעמים

שליחה #4 

levimadman

הייתי רוצה לנסות את הקומבינציה שלך. מהיות ונורא התרשמתי מהתוצאות שלך.

אני אשמח אם תדריך אותי מה לעשות-ראיתי שבסוף הלכת על boblight+atmoduino .

תודה רבה.
בן.

levimadman
חבר פעיל
חבר פעיל
תגובות: 99
הצטרף: יוני 2009
נתן תודות: 8 פעמים
קיבל תודות: 6 פעמים

שליחה #5 

אהמ אין בעיה... פירטתי בthread הזה בצורה כמעט מלאה איפה אפשר למצוא הכל..

http://www.hometheater.co.il/vt170743.% ... -atmoduino

BeN-T פותח השרשור
חבר שרק התחיל
חבר שרק התחיל
תגובות: 49
הצטרף: אוגוסט 2012
נתן תודות: 2 פעמים
קיבל תודות: 7 פעמים

שליחה #6 

היי.
באיחור קצת מחוסר זמן.

ניסיתי אך ללא הצלחה-חייב את עזרתך! :roll:

לא פרפקציוניסט-אך ה-Adalight שזה בעצם Processing+Arduino לא סיפק אותי כלכך.

עם איזה קומבינציה אני יכול לעבוד כדי לקבל תוצאות טובות.
לצפיית סרטים אני משתמש ב-MPC.

תודה.
בן.

BeN-T פותח השרשור
חבר שרק התחיל
חבר שרק התחיל
תגובות: 49
הצטרף: אוגוסט 2012
נתן תודות: 2 פעמים
קיבל תודות: 7 פעמים

שליחה #7 

לילה טוב ושקט לכולם.

לאחר ניסיון של יום שלם בAtmowin - Atmoduino mod

חצי יום לקח לי לעלות את ה-fastspi ל Arduino וזה פועל תמידית בכך שהוא מפעיל r-g-b ב fade
ואז כאילו הלדים רודפים אחד אחרי השני.

ופשוט לא מצליח לסנכרן עם atmowin.

בקיצור לא הבנתי איך לעשות זאת חייב את עזרתך!

תודה רבה.
בן.

שלח תגובה

חזור אל “DIY והדפסות 3D”