Port forwarding LED input to output

I’m using a arduino nano whit Adalight code for Ambilght behind my monitors,
now was i wondering can I ad in the code that wen no commands are send to do the ambilght,
it forwards the input from pin 13 to pin 3,
so I can use the signal from my motherboard so it nicely syncs up whit Aura

/* LEDstream_FastLED
/* Modified version of Adalight that uses the FastLED
/* library (http://fastled.io) for driving led strips.
/* http://github.com/dmadison/Adalight-FastLED
/* --------------------------------------------------------------------
/* This program is free software: you can redistribute it and/or modify
/* it under the terms of the GNU Lesser General Public License as published by
/* the Free Software Foundation, either version 3 of the License, or
/* (at your option) any later version.
 /* This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * GNU Lesser General Public License for more details.
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * --------------------------------------------------------------------

// --- General Settings
static const uint16_t 
  Num_Leds   =  80;        // strip length
static const uint8_t
  Brightness =  255;       // maximum brightness

// --- FastLED Setings
#define LED_TYPE     WS2812B // led strip type for FastLED
#define COLOR_ORDER  GRB     // color order for bitbang
#define PIN_DATA     3       // led data output pin

// --- Serial Settings
static const unsigned long
  SerialSpeed    = 115200; // serial port speed
static const uint16_t
  SerialTimeout  = 60;     // time before LEDs are shut off if no data (in seconds), 0 to disable

// --- Optional Settings (uncomment to add)
#define SERIAL_FLUSH         // Serial buffer cleared on LED latch
#define CLEAR_ON_START     // LEDs are cleared on reset
#define GROUND_PIN 1      // additional grounding pin (optional)
//#define CALIBRATE          // sets all LEDs to the color of the first

// --- Debug Settings (uncomment to add)
//#define DEBUG_LED 13       // toggles the Arduino's built-in LED on header match
//#define DEBUG_FPS 8        // enables a pulse on LED latch

// --------------------------------------------------------------------

#include <FastLED.h>

CRGB leds[Num_Leds];.
uint8_t * ledsRaw = (uint8_t *)leds;

// A 'magic word' (along with LED count & checksum) precedes each block
// of LED data; this assists the microcontroller in syncing up with the
// host-side software and properly issuing the latch (host I/O is
// likely buffered, making usleep() unreliable for latch). 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 values like 0 and 255 are
// avoided -- fewer false positives. The host software will need to
// generate a compatible header: immediately following the magic word
// are three bytes: a 16-bit count of the number of LEDs (high byte
// first) followed by a simple checksum value (high byte XOR low byte
// XOR 0x55). LED data follows, 3 bytes per LED, in order R, G, B,
// where 0 = off and 255 = max brightness.

static const uint8_t magic[] = {
#define MAGICSIZE  sizeof(magic)

// Check values are header byte # - 1, as they are indexed from 0
#define LOCHECK    (MAGICSIZE + 1)
#define CHECKSUM   (MAGICSIZE + 2)

enum processModes_t {Header, Data} mode = Header;

static int16_t
static uint16_t
static uint32_t
static unsigned long

// Debug macros initialized
#ifdef DEBUG_LED
  #define ON  1
  #define OFF 0

  #define D_LED(x) do {digitalWrite(DEBUG_LED, x);} while(0)
  #define D_LED(x)

#ifdef DEBUG_FPS
  #define D_FPS do {digitalWrite(DEBUG_FPS, HIGH); digitalWrite(DEBUG_FPS, LOW);} while (0)
  #define D_FPS

void setup(){
  #ifdef GROUND_PIN
    pinMode(GROUND_PIN, OUTPUT);
    digitalWrite(GROUND_PIN, LOW);

  #ifdef DEBUG_LED
    pinMode(DEBUG_LED, OUTPUT);
    digitalWrite(DEBUG_LED, LOW);

  #ifdef DEBUG_FPS
    pinMode(DEBUG_FPS, OUTPUT);

  #ifdef PIN_CLOCK
    FastLED.addLeds<LED_TYPE, PIN_DATA, PIN_CLOCK, COLOR_ORDER>(leds, Num_Leds);
    FastLED.addLeds<LED_TYPE, PIN_DATA, COLOR_ORDER>(leds, Num_Leds);


  Serial.print("Ada\n"); // Send ACK string to host

  lastByteTime = lastAckTime = millis(); // Set initial counters

void loop(){

void adalight(){ 
  t = millis(); // Save current time

  // If there is new serial data
  if((c = Serial.read()) >= 0){
    lastByteTime = lastAckTime = t; // Reset timeout counters

    switch(mode) {
      case Header:
      case Data:
  else {
    // No new data

void headerMode(){
  static uint8_t
    hi, lo, chk;

  if(headPos < MAGICSIZE){
    // Check if magic word matches
    if(c == magic[headPos]) {headPos++;}
    else {headPos = 0;}
    // Magic word matches! Now verify checksum
      case HICHECK:
        hi = c;
      case LOCHECK:
        lo = c;
      case CHECKSUM:
        chk = c;
        if(chk == (hi ^ lo ^ 0x55)) {
          // Checksum looks valid. Get 16-bit LED count, add 1
          // (# LEDs is always > 0) and multiply by 3 for R,G,B.
          bytesRemaining = 3L * (256L * (long)hi + (long)lo + 1L);
          outPos = 0;
          memset(leds, 0, Num_Leds * sizeof(struct CRGB));
          mode = Data; // Proceed to latch wait mode
        headPos = 0; // Reset header position regardless of checksum result

void dataMode(){
  // If LED data is not full
  if (outPos < sizeof(leds)){
  if(bytesRemaining == 0) {
    // End of data -- issue latch:
    mode = Header; // Begin next header search
    #ifdef SERIAL_FLUSH

void dataSet(){
  #ifdef CALIBRATE
    if(outPos < 3)
      ledsRaw[outPos++] = c;
      ledsRaw[outPos] = ledsRaw[outPos%3]; // Sets RGB data to first LED color
    ledsRaw[outPos++] = c; // Issue next byte

void timeouts(){
  // No data received. If this persists, send an ACK packet
  // to host once every second to alert it to our presence.
  if((t - lastAckTime) >= 1000) {
    Serial.print("Ada\n"); // Send ACK string to host
    lastAckTime = t; // Reset counter

    // If no data received for an extended time, turn off all LEDs.
    if(SerialTimeout != 0 && (t - lastByteTime) >= (uint32_t) SerialTimeout * 1000) {
      memset(leds, 0, Num_Leds * sizeof(struct CRGB)); //filling Led array by zeroes
      mode = Header;
      lastByteTime = t; // Reset counter

void serialFlush(){
  while(Serial.available() > 0) {

I’ve been playing around in a blank scetch whit this,
The led’s are going on white and doing some thing wen getting a signal on pin 13.
But not nearly what they sought do.

#include <FastLED.h>
#define LED_TYPE     WS2812B // led strip type for FastLED
#define COLOR_ORDER  GRB     // color order for bitbang
#define LED_PIN_IN 13
#define LED_PIN 3

void setup() {
  pinMode(LED_PIN_IN, INPUT);
  pinMode(LED_PIN, OUTPUT);
void loop() {
     digitalWrite(LED_PIN, digitalRead(LED_PIN_IN));

is it even possible or did I post in the wrong section of the forum?

sought I move my question to a different section? if so what would be the wright one? because related about port fording a signal that is for addressable leds I can not find much info or direction to deal whit it.

Would thought if the signal in is same as out then it would be just as any other digital signal, so the read can direct write.

also I'm having some other ideas related to forwarding a addressable leds signal and using it's signal. I want to work out a hole project, so any ideas or directions ware i can find some info in how to deal whit forwarding this signal would be appreciate

No, perfectly correct section.

It's just that your question is a bit obscure. :astonished:

ok good, but how so obscure?

The sreen capture mode for Ambilght is cool, but I aslo like to have the option to just turn it of and have Aura sync taking over, to have every thing in sync whit the rest of my argb fans and case leds from my pc.

I was thinking Aura sync is using a signal for WS2812B leds my arduino is controlling WS2812B leds can I combine this and have the best of both.

OK, well this is not my field but hopefully someone else will catch it. :grinning:

I'm abit perplex that I can not find much about this. I can think of a few implantation's ware using this signal can be handy.

for for example using a arduino to wireless sends the signal to a other adruinos using the NRF24l01, so your led lighting all over your room can be in sync.

or building a ARGB fan controller that splits up the incoming signal that is for about 120 leds. sends the signal for the first 14 to pin1 next 14 to pin2 and so on. of course their are controllers on the market that can do that but there pricey and have there limits. so far i have seen most controllers only can control 4 ARGB fan products individually. I think a arduino can do a better job for much less