Help with integrating ZERGBA into Micropython 7 segment clock

Hello all. Brand new here, and just got my first project up and running on my esp8266 running last night, and of course, I went and broke it. What I’ve got is a large 3d printed six digit 7 segment clock that displays hours, minutes, seconds using neopixels. It is controlled via an esp8266 running Micropython.

I would like to be able to control the color of my neopixels with the zeRGBa slider on the Blynk app, but I am kind of lost as to how to get it to connect, or control.

I can not even get the program to connect to the Blynk app.

The code below is the working code with some of the Blynk stuff added. Any help would be appreciated.

SSID = 'XXX'           # WiFi ssid
PW   = 'XXX'           # WiFi password
TMZ_HOUR_OFFSET = -6 # timezone hour offset

import network, ntptime, utime, machine, neopixel
from machine import Pin, Timer  
import BlynkLib

blynk = BlynkLib.Blynk('XXXX')

np = neopixel.NeoPixel(machine.Pin(14), 46)
pix_color = (255,0,255)
blank = (0,0,0)
# dictionary for weekday names
weekday = ('Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday')


# dictionaries for neopixels and digits
zero = [0,4,5,6,2,1]
one = [4,0]
two = [5,4,2,3,1]
three = [5,3,1,4,0]
four = [6,3,4,0]
five = [5,6,3,0,1]
six = [5,6,2,1,0,3]
seven = [5,4,0,6]
eight = [0,1,2,3,4,5,6]
nine = [6,5,3,4,0]
colons = [14,15,30,31]

ten_sec_mult = 7               ## digit multipliers
min_mult = 16
ten_min_mult = 23
hour_mult = 32
ten_hour_mult = 39

digit_list = [zero, one, two, three, four, five, six, seven, eight, nine]
list_time = []

# setup and connect WiFi
wifi = network.WLAN(network.STA_IF)
wifi.active(True)
wifi.connect(SSID, PW)
while not wifi.isconnected():
    pass

#WRITE_EVENT_PRINT_MSG = "[WRITE_VIRTUAL_PIN_EVENT] Pin: V{} Value: '{}'"

@blynk.virtual_write(3)
def my_write_handler(value):
    print('current V3 value: {}'.format(value))

while True:
    blynk.run()

# time update function
def ntpUpdate(timer):
    while True:
        try:
            ntptime.settime() # query NTP server and update system time
            break
        except:
            utime.sleep(5) # try again if failed
# print update function
def clockUpdate(timer):
    list_time.clear()
    localTime = utime.localtime(utime.time() + TMZ_HOUR_OFFSET * 3600)
    #print(weekday[localTime[6]])
    #print('{0:04d}-{1:02d}-{2:02d}'.format(*localTime))
    form_time = ('{3:02d}{4:02d}{5:02d}'.format(*localTime))
    for char in form_time:
        list_time.append(char)
    for i in range(0, len(list_time)):
        list_time[i] = int(list_time[i])

        ##  Seconds for loop  (digit 5)
    sec = list_time[5]
    y = digit_list[sec]
    for x in y:
        np[x] = pix_color    

        ## ten seconds for loop  (digit 4)
    ten_sec = list_time[4]
    t = digit_list[ten_sec]
    res = [m + ten_sec_mult for m in t]
    for x in res:
        np[x] = pix_color    

        ## minute for loop  (digit 3)
    minute = list_time[3]
    t = digit_list[minute]
    res = [m + min_mult for m in t]
    for x in res:
        np[x] = pix_color    

        ## ten_minute for loop  (digit 2)
    ten_minute = list_time[2]
    t = digit_list[ten_minute]
    res = [m + ten_min_mult for m in t]
    for x in res:
        np[x] = pix_color    

            ## hour for loop  (digit 1)
    hour = list_time[1]
    t = digit_list[hour]
    res = [m + hour_mult for m in t]
    for x in res:
        np[x] = pix_color  

            ## ten_hour for loop  (digit 0)
    ten_hour = list_time[0]
    t = digit_list[ten_hour]
    res = [m + ten_hour_mult for m in t]
    for x in res:
        np[x] = pix_color    
  
        ##  Colon For Loop
    if sec % 2:
        for u in colons:
            np[u] = pix_color
    else:
        for u in colons:
            np[u] = blank


    np.write()
    for i in range(0, 45):
        np[i] = blank

    #print(form_time)
    #print(list_time)

# update time for the first time
ntpUpdate(None)

# start timers (coroutines)
timer_ntp, timer_display = Timer(-1), Timer(-1)
timer_ntp.init(mode=Timer.PERIODIC, period=900000, callback=ntpUpdate)
timer_display.init(mode=Timer.PERIODIC, period=100, callback=clockUpdate)


@00snyderman please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly.

The characters you have used are not triple backticks, so they don’t work.

Triple backticks look like this:
```

Pete.

My bad. That looks a little better.

Thanks!