Rainbowduino API request ;)

Hey guys,

Can I ask for a couple of features on the Rainbowduino API?

Is it possible to have a function which, on the current frame sets a single pixel: I am trying to work with:
void set_current_frame_pixel(byte x, byte y, byte red, byte green, byte blue);

…but that seems to decrease in brightness/color as you increase Y.

and another function which would be useful is:
void get_frame_pixel(byte frame_nr, byte x, byte y, byte &red, byte &green, byte &blue);

… I had a bash at reverse engineering the set code but I ran a little short on getting it working.

Finally, would it be possible to write a quick example on shifting all pixels in a particular direction using a bitwise operation rather than setting/unsetting each pixel in the display.

Cheers,
Miles

Yes , it’s easy to set a dot , just modify 3X4Bit in the buffer where the position you want to set.

and get a dot is also just read back the data from buffer.

to just shit the particular direction is possible but it’s not so easy as below.

Would you mind writing an example of fetching a pixel and setting a pixel?

I don’t mind integrating that into the library :wink:

Hi Miles, look in the rainbow_plasma source (code.google.com/p/rainbowmcompat/) has SetPxClr and GetPixel[RGB] functions.

Cheers dave, will do