shiftregister turn specific led on

Hello,
For a couple of days im struggling with programming a shift register (74HC595). The main goal is to turn on/off a specific led behind the register.
So when i push button 1 led 1 had to turn on/off and so further.

i've added the code. hope someone can help me.
For test i've connected 1 led to pin 12 on the WEMOS and 1 led to position 1 at the shift register.

PROBLEM: The problem is that when pressing V1 (via Blynk) the led on pin 12 (on the WEMOS) is turning on but the led behind the shift register is turning on/off random. So at every press the led on the WEMOS is turning on/off but the other one is turning on after 4,6,8 presses. After the next press it is always turning off.

//#define BLYNK_DEBUG
#define BLYNK_PRINT Serial

#include <ArduinoOTA.h>
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <TimeLib.h>
#include <WidgetRTC.h>

#include <SPI.h>            // For SPI comm (needed for not getting compile error)


#include "settings_base.h"
#include "globals.h"
#include "functions.h"
#include "blynk_writes.h"


//Pin connected to ST_CP of 74HC595
const int latchPin = 15; //D8
//Pin connected to SH_CP of 74HC595
const int clockPin = 14; //D5
//Pin connected to DS of 74HC595
const int dataPin = 13; // D7


int totalRelays = 2; // Number of relays
int relayState = 0; // default state = off
int relayArr[] = {12, 16}; // Pins on the Wemos
char vbutton1 = V1; char vbutton2 = V2;
char relayVButtons[] = {V1,V2};
int zone = 0;
int relayVButton = 0;
byte data;
byte dataArray[10];


/*
   SETUP
*/
  BLYNK_WRITE(V1)
  {
    // Get the state of the VButton
    relayVButton = param.asInt();
    relayControl(relayVButton, 12); // Test led on Wemos pin
    digitalWrite(latchPin, LOW);
    shiftOut(dataPin,clockPin,0xFE); // go to shift function value is register position
    digitalWrite(latchPin, HIGH);
    
    Serial.println("V1 pressed"); 
  }

  BLYNK_WRITE(V2)
  {
    // Get the state of the VButton
    relayVButton = param.asInt();
    relayControl(relayVButton, 16); // Test led on Wemos pin
    returnToShiftRegister(0xFC); // go to shift function value is register position
    Serial.println("V2 pressed");
  }

void setup() {

    //Binary notation as comment
  dataArray[0] = 0xFF; //0b11111111
  dataArray[1] = 0xFE; //0b11111110
  dataArray[2] = 0xFC; //0b11111100
  dataArray[3] = 0xF8; //0b11111000
  dataArray[4] = 0xF0; //0b11110000
  dataArray[5] = 0xE0; //0b11100000
  dataArray[6] = 0xC0; //0b11000000
  dataArray[7] = 0x80; //0b10000000
  dataArray[8] = 0x00; //0b00000000
  dataArray[9] = 0xE0; //0b11100000

  
  pinMode(dataPin, OUTPUT);   // All 3 pins are output
  pinMode(clockPin, OUTPUT);  
  pinMode(latchPin, OUTPUT);
  
  // Do some loop through all the relays and buttons for pinMode
  for (int i=0; i<=totalRelays; i++){
    pinMode(relayArr[i], OUTPUT);
    digitalWrite(relayArr[i], 0);
    pinMode(relayVButtons[i], INPUT);
  }
  
  // COMMUNICATIONS
  Serial.begin(115200);
  WiFi.mode(WIFI_STA);
  // CONNECT TO BLYNK
  Blynk.begin(AUTH, WIFI_SSID, WIFI_PASS);
  while (Blynk.connect() == false) {}
  // OVER THE AIR UPDATES
  ArduinoOTA.setHostname(OTA_HOSTNAME);
  ArduinoOTA.begin();

  Serial.println(F("Blynk v" BLYNK_VERSION ": Device started"));

}
/*
   LOOP
*/
void loop() {
  Blynk.run();
  ArduinoOTA.handle();
  timer.run();
  
}


void relayControl(int onoff, int relayNumber){
if(onoff == 1) // Virtual button set to on
    {
      digitalWrite(relayNumber, HIGH);
      relayState = 1;
    }
    else
    {
      digitalWrite(relayNumber, LOW);
      relayState = 0;
    }
}
void returnToShiftRegister(int value)
{
    // take the latchPin low so 
    // the LEDs don't change while you're sending in bits:
    digitalWrite(latchPin, LOW);
    // shift out the bits:
    shiftOut(dataPin, clockPin, MSBFIRST, value);  // (shift left)
    //take the latch pin high so the LEDs will light up:
    digitalWrite(latchPin, HIGH);
}

void shiftOut(int myDataPin, int myClockPin, byte myDataOut) {
      //internal function setup
    int i=0;
    int pinState;

    //clear everything out just in case to
    //prepare shift register for bit shifting
    digitalWrite(myDataPin, 0);
    digitalWrite(myClockPin, 0);

    //cycle down through byte
    for (i=0; i>7; i--)  {
      digitalWrite(myClockPin, 0);
      //if the value passed to myDataOut and a bitmask result 
      // true then set pinState to 1.
      if ( myDataOut & (1<<i) ) {
        pinState= 1;
      }
      else {  
        pinState= 0;
      }
      //Sets the pin to HIGH or LOW depending on pinState
      digitalWrite(myDataPin, pinState);
      //register shifts bits on upstroke of clock pin  
      digitalWrite(myClockPin, 1);
      //zero the data pin after shift to prevent bleed through
      digitalWrite(myDataPin, 0);
    }
    //stop shifting
    digitalWrite(myClockPin, 0);
}

Where's the problem?
What is it not doing or doing that it shouldn't?
Are there compile errors?

DKWatson:
Where's the problem?
What is it not doing or doing that it shouldn't?
Are there compile errors?

uh yea smart :).. i've described the problem in the main post.

You catch more flies with honey than you do with vinegar.

Main post was edited. The PROBLEM statement was added after. No time for this. I'm gone.

DKWatson:
Main post was edited. The PROBLEM statement was added after. No time for this. I'm gone.

True.. the idea was to describe in one post instead of replying with a problem after that.

No hard feeling, hope you can help me