no matching function for call to

Hi I am fairly new to arduino and I am trying to figure out why I am getting this error at the end of my script?

#include <RGBmatrixPanel.h>

#define CLK 11
#define OE 9
#define LAT 10
#define A A0
#define B A1
#define C A2
#define D A3

RGBmatrixPanel matrix(A, B, C, D, CLK, LAT, OE, false, 64);

int sensorPin = A3;
int sensorValue = 0;
int old_value = 0;

void setup() {

 Serial.begin(9600);
 matrix.begin();

 matrix.setTextSize(1);
 matrix.setTextWrap(false);

}

void loop() {

 sensorValue = analogRead(sensorPin);

 int bar_graph_width = map(sensorValue, 0, 1200, 0, matrix.width());

 if(abs(old_value - sensorValue) > 1){
   matrix.fillScreen(0);
   matrix.drawRect(matrix.Color333(7, 0, 7)));
 }

}
no matching function for call to 'RGBmatrixPanel::drawRect(uint16_t)'

What library are you using? Supply a link.

But it seems to me matrix.drawRect at least requires a rectangle to draw as a parameter. You are only passing a colour.

Possibly:

matrix.drawRect(matrix.Color333(7, 0, 7)));

has too many ')' brackets?

I removed the extra bracket and now its not doing what I want to do, I am trying to get a bar graph to show as I move a potentiometer. As I turn the potentiometer to the right the graph shows and as I turn it to the left the graph dissapears.

Whenever you create a new sketch, we can't guess what changes you made. So please repost the entire revised sketch.

Post it in a new message. Before you do that, please read the sticky posts at the top of the forum about how to post code.

#include <RGBmatrixPanel.h>

#define CLK 11
#define OE 9
#define LAT 10
#define A A0
#define B A1
#define C A2
#define D A3
#define E A4

RGBmatrixPanel matrix(A, B, C, D, CLK, LAT, OE, false, 64);

 int sensorPin = A4;
 int sensorValue = 0;
 int old_value = 0;

void setup() {

 Serial.begin(9600);
 matrix.begin();

 }


void loop() {

 sensorValue = analogRead(sensorPin);

 int bar_graph_width = map(sensorValue, 0, 1200, 0, matrix.width());

 if(abs(old_value - sensorValue) > 1){
   matrix.fillScreen(0);
   matrix.drawRect(0, 0, matrix.width(), matrix.height(), matrix.Color333(7, 1, 0));
   
   
   old_value = sensorValue;
   delay(100);
   
 }

}

Hey, where are the code tags? Did you read the forum guidelines?

Also, you told us what you want it to do, but not what it actually does (or doesn't do). That is also discouraged in the sticky posts at the top of the forum.

  int bar_graph_width = map(sensorValue, 0, 1200, 0, matrix.width());
    matrix.fillScreen(0);
    matrix.drawRect(0, 0, matrix.width(), matrix.height(), matrix.Color333(7, 1, 0));

You calculate bar_graph_width but you don't use it anywhere.

Thank you for the tags! You calculate 'bar_graph_width' and then never use it. Beat me to it!