Skip to content

4inch Spectra 6 (E6) 600×400 Pixels, ask to parse matrix of pixels #405

Description

@JeremieRousseau

Hello,

I try to play with Spectra 6 Waveshare 600x400 on a Raspberry Pi.

My ask is where is the x,y =>0,0 and so the matrix go from 0 to 599 or from 0 to 600

other ask, can i do something as that:

// pseudo code below
for(x=0; x <= 600; x++ )
{
  for(y=0; y <= 400; y++ )
  {
  i = x+y*600; //
  array[i] = color1;
  array[i+1] = color2;
  picture += "x"+array[i]+array[i+1]+","
  }
}

That i understand, it's that work as:

for(x=0; x <= 400; x++ )
{
  for(y=0; y <= 600; y++ )
  {
   // but what i write for i 
    i = ???
    array[i] = color1;
    array[i+1] = color2;
    picture += "x"+array[i]+array[i+1]+","
  }
}

Thank, if someone help!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions