Forum Replies Created
-
AuthorPosts
-
MysticForceMember
Hello Michael,
I changed it to 11 because I was using it on my mega. The code is all original and I hadn’t changed anything else, but that because it says to change to pin 11 if your using it with a mega board. That is how I know my 32×32 RGB Board works because I wired it up for use with my arduino mega 2560 board and the only change I made was that pin 11.-Dave
MysticForceMemberHello Michael,
Please explain, I thought I was using the one from adafruit? There is another one or something? I am sorry for being slow. I am using a wrong plasma version? Can you please point me in the right direction? Also is there a paceman demo that does work on this v2 board?MysticForceMemberHello Micheal,
I made that change and it does look like plasma, but now it is changing really slow like it is stuck on 1 frame per second. You can actually see the refresh rate. It is just not quite right. Is the other pins correct? Sorry to drive you crazy about this just want to see it working.-Dave
MysticForceMemberHello Michael,
everything lights up but it isn’t working right. Here is the code I am using. Am I doing something wrong? Thanks for any help.-Dave
// plasma demo for Adafruit RGBmatrixPanel library.
// Demonstrates unbuffered animation on our 32x32 RGB LED matrix:
// http://www.adafruit.com/products/607
// Written by Limor Fried/Ladyada & Phil Burgess/PaintYourDragon
// for Adafruit Industries.
// BSD license, all text above must be included in any redistribution.
#include// Core graphics library
#include// Hardware-specific library
#include
// If your 32x32 matrix has the SINGLE HEADER input,
// use this pinout:
#define CLK 11 // MUST be on PORTB! (Use pin 11 on Mega)
#define OE 9
#define LAT 10
#define A A0
#define B A1
#define C A2
#define D A3
// If your matrix has the DOUBLE HEADER input, use:
//#define CLK 8 // MUST be on PORTB! (Use pin 11 on Mega)
//#define LAT 9
//#define OE 10
//#define A A3
//#define B A2
//#define C A1
//#define D A0
RGBmatrixPanel matrix(A, B, C, D, CLK, LAT, OE, false);
static const int8_t PROGMEM sinetab[256] = {
0, 2, 5, 8, 11, 15, 18, 21,
24, 27, 30, 33, 36, 39, 42, 45,
48, 51, 54, 56, 59, 62, 65, 67,
70, 72, 75, 77, 80, 82, 85, 87,
89, 91, 93, 96, 98, 100, 101, 103,
105, 107, 108, 110, 111, 113, 114, 116,
117, 118, 119, 120, 121, 122, 123, 123,
124, 125, 125, 126, 126, 126, 126, 126,
127, 126, 126, 126, 126, 126, 125, 125,
124, 123, 123, 122, 121, 120, 119, 118,
117, 116, 114, 113, 111, 110, 108, 107,
105, 103, 101, 100, 98, 96, 93, 91,
89, 87, 85, 82, 80, 77, 75, 72,
70, 67, 65, 62, 59, 56, 54, 51,
48, 45, 42, 39, 36, 33, 30, 27,
24, 21, 18, 15, 11, 8, 5, 2,
0, -3, -6, -9, -12, -16, -19, -22,
-25, -28, -31, -34, -37, -40, -43, -46,
-49, -52, -55, -57, -60, -63, -66, -68,
-71, -73, -76, -78, -81, -83, -86, -88,
-90, -92, -94, -97, -99,-101,-102,-104,
-106,-108,-109,-111,-112,-114,-115,-117,
-118,-119,-120,-121,-122,-123,-124,-124,
-125,-126,-126,-127,-127,-127,-127,-127,
-128,-127,-127,-127,-127,-127,-126,-126,
-125,-124,-124,-123,-122,-121,-120,-119,
-118,-117,-115,-114,-112,-111,-109,-108,
-106,-104,-102,-101, -99, -97, -94, -92,
-90, -88, -86, -83, -81, -78, -76, -73,
-71, -68, -66, -63, -60, -57, -55, -52,
-49, -46, -43, -40, -37, -34, -31, -28,
-25, -22, -19, -16, -12, -9, -6, -3
};
void setup() {
matrix.begin();
}
const float radius1 = 16.3, radius2 = 23.0, radius3 = 40.8, radius4 = 44.2,
centerx1 = 16.1, centerx2 = 11.6, centerx3 = 23.4, centerx4 = 4.1,
centery1 = 8.7, centery2 = 6.5, centery3 = 14.0, centery4 = -2.9;
float angle1 = 0.0, angle2 = 0.0, angle3 = 0.0, angle4 = 0.0;
long hueShift = 0;
void loop() {
int x1, x2, x3, x4, y1, y2, y3, y4, sx1, sx2, sx3, sx4;
unsigned char x, y;
long value;
sx1 = (int)(cos(angle1) * radius1 + centerx1);
sx2 = (int)(cos(angle2) * radius2 + centerx2);
sx3 = (int)(cos(angle3) * radius3 + centerx3);
sx4 = (int)(cos(angle4) * radius4 + centerx4);
y1 = (int)(sin(angle1) * radius1 + centery1);
y2 = (int)(sin(angle2) * radius2 + centery2);
y3 = (int)(sin(angle3) * radius3 + centery3);
y4 = (int)(sin(angle4) * radius4 + centery4);
for(y=0; yx1 = sx1; x2 = sx2; x3 = sx3; x4 = sx4;
for(x=0; xvalue = hueShift
+ (int8_t)pgm_read_byte(sinetab + (uint8_t)((x1 * x1 + y1 * y1) >> 2))
+ (int8_t)pgm_read_byte(sinetab + (uint8_t)((x2 * x2 + y2 * y2) >> 2))
+ (int8_t)pgm_read_byte(sinetab + (uint8_t)((x3 * x3 + y3 * y3) >> 3))
+ (int8_t)pgm_read_byte(sinetab + (uint8_t)((x4 * x4 + y4 * y4) >> 3));
matrix.drawPixel(x, y, matrix.ColorHSV(value * 3, 255, 255, true));
x1--; x2--; x3--; x4--;
}
y1--; y2--; y3--; y4--;
}
angle1 += 0.03;
angle2 -= 0.07;
angle3 += 0.13;
angle4 -= 0.15;
hueShift += 2;
}
MysticForceMemberHello Michael,
Hopefully I will be able to test that out today. I have been stuck to my bed for last few days and I am hoping I will be able to get up and work on a few things today. Thanks for responding. I am handicap and right now having some trouble with my heart.-Dave
MysticForceMemberHello Michael,
I talked to Adafruit and they are now going to stock both. So that is why the new order with v2 in it. You are correct in that they never claim it would work with the 32×32, but there technical link led you here and that was how I came to know about the v2 board. They even were so kind as to hook me up with a discount on the new board. So all is good. Thanks for the reply and your time. If I might add could you give some more code examples as I am trying so hard to learn the arduino code,but as of right now I suck. Getting better as I go, but still for some reason programming is the one thing that seems to give me a tough time. I have been working with computers since about 1984 and I can do a lot with them,but programming made me pull my hair out and seeing how I am not getting any younger thought I would put a back seat to programming while a head. Some good code examples and things I would love to do with my 32×32 board is put up some cool gif’s or icons, scroll some text and the best thing I think would rule is like having some stick figures running and jumping like they were in a moving background or something. Not sure how hard that stuff would be to code, but sure would show off what that awesome version 2 nootropic board could do. ;D Thanks.
-Dave -
AuthorPosts