Matrix Creator Python Everloop

Hi everyone,

I’ve just got the matrix creator and would like to use python as my language on it,

I’ve found the following link, which shows me how to use python and has an everloop example.

I can’t understand this example as its too complicated, I’d be grateful if someone could provide me an everloop example just to turn the all the leds one colour and leave them that way.

Many thanks.

Hey @alley1245,

I posted a smaller example below and put it in a function to easily call. I hope this helps give you a better understanding of MATRIX Core. Let us know if you have any more questions. :slight_smile:

Everloop Documentation:

import zmq # Asynchronous messaging framework
from matrix_io.proto.malos.v1 import driver_pb2 # MATRIX Protocol Buffer drivers
from matrix_io.proto.malos.v1 import io_pb2 # MATRIX Protocol Buffer sensors

## Set Initial Variables ##
matrix_ip = '' # Local device ip
everloop_base_port = 20021

# Create & connect PUSH socket to Base Port
socket = zmq.Context().socket(zmq.PUSH)
socket.connect('tcp://{0}:{1}'.format(matrix_ip, everloop_base_port))

# Set all LEDs to one color
def led(color):  
    # Create a new driver config
    driver_config_proto = driver_pb2.DriverConfig()

    # For each LED (MATRIX Creator has 35 LEDs)
    everloop_image = []
    for _ in range(35):
        # Create an LED
        ledValue = io_pb2.LedValue()

        # Set LED color   = color["red"] = color["green"]  = color["blue"]
        ledValue.white = color["white"]

        # Add LED to everloop image

    # Store the Everloop image in driver config

    # Send driver config

    "red"   : 100,
    "blue"  : 100,
    "green" : 0,
    "white" : 0,