Rainbowduino ParticleSys error

I get this error and cannot compile the code I downloaded from Github.
no matching function for call to 'ParticleSys::ParticleSys(const byte&, Particle_Fixed [70], Emitter_Fountain*)'
Can anyone point me to a fix?
Thanks in advance.

Please post the full sketch, using code tags when you do, and a link to where you downloaded it from

Sorry but I don't know what CODE TAGS are.

/*

  • Copyright (C) 2013 Gilad Dayagi. All rights reserved.
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU Lesser General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version.
    */

/*

  • An example for the Arduino particle system library
  • Creates a spinning galaxy effect
    */

//'r' for rainbowduino, 'c' for colorduino
#define BOARD 'r'

#if BOARD == 'c'
#include <Colorduino.h>
#else
#include <Rainbowduino.h>
#endif

#include "ParticleSys.h"
#include "Particle_Bounce.h"
#include "Emitter_Spin.h"
#include "PartMatrix.h"

const byte numParticles = 60;

Particle_Bounce particles[numParticles];
Emitter_Spin emitter(112, 112, 5, 7);
ParticleSys pSys(numParticles, particles, &emitter); // this is where the error pops up
PartMatrix pMatrix;

/**

  • Render the particles into a low-resolution matrix
    */
    void drawMatrix(){
    pMatrix.fade();
    pMatrix.render(particles, numParticles);
    //update the actual LED matrix
    for (byte y=0;y<PS_PIXELS_Y;y++) {
    for(byte x=0;x<PS_PIXELS_X;x++) {
    #if BOARD == 'c'
    Colorduino.SetPixel(x, y, pMatrix.matrix[x][y].r, pMatrix.matrix[x][y].g, pMatrix.matrix[x][y].b);
    #else
    Rb.setPixelXY(x, y, pMatrix.matrix[x][y].r, pMatrix.matrix[x][y].g, pMatrix.matrix[x][y].b);
    #endif
    }
    }
    }

void setup()
{
#if BOARD == 'c'
Colorduino.Init(); // initialize the board

// compensate for relative intensity differences in R/G/B brightness
// array of 6-bit base values for RGB (0~63)
// whiteBalVal[0]=red
// whiteBalVal[1]=green
// whiteBalVal[2]=blue
byte whiteBalVal[3] = {36,63,7}; // for LEDSEE 6x6cm round matrix
Colorduino.SetWhiteBal(whiteBalVal);
#else
Rb.init();
#endif

randomSeed(analogRead(0));

pMatrix.reset();
PartMatrix::isOverflow = true;

emitter.oscilate = true;
}

void loop()
{
pSys.update();
drawMatrix();
#if BOARD == 'c'
Colorduino.FlipPage();
#endif
delay(30);
}

Retrevied from this site:
https://raw.githubusercontent.com/giladaya/arduino-particle-sys/master/examples/Spin/Spin.ino

Check marks are: [x]Preformatted text

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination

Okay I think I understand now.

type or paste code here:
/* 
 * Copyright (C) 2013 Gilad Dayagi.  All rights reserved.
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 */

 /*
  * An example for the Arduino particle system library
  * Creates a spinning galaxy effect
  */

//'r' for rainbowduino, 'c' for colorduino
#define BOARD 'r'

#if BOARD == 'c'
#include <Colorduino.h>
#else
#include <Rainbowduino.h>
#endif

#include "ParticleSys.h"
#include "Particle_Bounce.h"
#include "Emitter_Spin.h"
#include "PartMatrix.h"

const byte numParticles = 60;

Particle_Bounce particles[numParticles];
Emitter_Spin emitter(112, 112, 5, 7);
ParticleSys pSys(numParticles, particles, &emitter);  // error is here
PartMatrix pMatrix;

/**
 * Render the particles into a low-resolution matrix
 */
void drawMatrix(){
    pMatrix.fade();
    pMatrix.render(particles, numParticles);
    //update the actual LED matrix
    for (byte y=0;y<PS_PIXELS_Y;y++) {
        for(byte x=0;x<PS_PIXELS_X;x++) {
#if BOARD == 'c'
            Colorduino.SetPixel(x, y, pMatrix.matrix[x][y].r, pMatrix.matrix[x][y].g, pMatrix.matrix[x][y].b);
#else
            Rb.setPixelXY(x, y, pMatrix.matrix[x][y].r, pMatrix.matrix[x][y].g, pMatrix.matrix[x][y].b);
#endif
        }
    }
}

void setup()
{
#if BOARD == 'c'    
  Colorduino.Init(); // initialize the board
  
  // compensate for relative intensity differences in R/G/B brightness
  // array of 6-bit base values for RGB (0~63)
  // whiteBalVal[0]=red
  // whiteBalVal[1]=green
  // whiteBalVal[2]=blue
  byte whiteBalVal[3] = {36,63,7}; // for LEDSEE 6x6cm round matrix
  Colorduino.SetWhiteBal(whiteBalVal);
#else
    Rb.init();
#endif

  randomSeed(analogRead(0));
  
  pMatrix.reset();
  PartMatrix::isOverflow = true;
  
  emitter.oscilate = true;
}

void loop()
{
    pSys.update();
    drawMatrix();
#if BOARD == 'c'    
    Colorduino.FlipPage();
#endif 
    delay(30);
}


Yes it worked. Now I understand. Thanks

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.