Skip to main content
added 10 characters in body
Source Link
j0h
  • 902
  • 4
  • 13
  • 31

ok, once I got the idea I would need to do it in code, it became simpler to solve. In looking around the terms of quantization, the term thresh-holding came up, and I realized how to solve the problem.

I created a threshold value, and compared the difference between old and new variables.

int threshold =3;
int xVariance = abs(sensorValX-oldX;oldX);
int yVariance = abs(sensorValY-oldY;oldY);
if (xVariance >=threshold && yVariance >= threshold ||xVariance >=threshold || yVariance >=threshold){
  Serial.print(sensorValX);
  Serial.print(",");
  Serial.print(sensorValY);
  Serial.print(",");
 oldX=sensorValX;
 oldY=sensorValY; 
  
}else{
; //dont do shi.
 // Serial.println(delbutton);
delay(1000);
    } 

now, when I turn either potentiometer, I get a response, and output I desire, but not while the device is just sitting there.

ok, once I got the idea I would need to do it in code, it became simpler to solve. In looking around the terms of quantization, the term thresh-holding came up, and I realized how to solve the problem.

I created a threshold value, and compared the difference between old and new variables.

int threshold =3;
int xVariance = sensorValX-oldX;
int yVariance = sensorValY-oldY;
if (xVariance >=threshold && yVariance >= threshold ||xVariance >=threshold || yVariance >=threshold){
  Serial.print(sensorValX);
  Serial.print(",");
  Serial.print(sensorValY);
  Serial.print(",");
 oldX=sensorValX;
 oldY=sensorValY; 
  
}else{
; //dont do shi.
 // Serial.println(delbutton);
delay(1000);
    } 

now, when I turn either potentiometer, I get a response, and output I desire, but not while the device is just sitting there.

ok, once I got the idea I would need to do it in code, it became simpler to solve. In looking around the terms of quantization, the term thresh-holding came up, and I realized how to solve the problem.

I created a threshold value, and compared the difference between old and new variables.

int threshold =3;
int xVariance = abs(sensorValX-oldX);
int yVariance = abs(sensorValY-oldY);
if (xVariance >=threshold && yVariance >= threshold ||xVariance >=threshold || yVariance >=threshold){
  Serial.print(sensorValX);
  Serial.print(",");
  Serial.print(sensorValY);
  Serial.print(",");
 oldX=sensorValX;
 oldY=sensorValY; 
  
}else{
; //dont do shi.
 // Serial.println(delbutton);
delay(1000);
    } 

now, when I turn either potentiometer, I get a response, and output I desire, but not while the device is just sitting there.

Source Link
j0h
  • 902
  • 4
  • 13
  • 31

ok, once I got the idea I would need to do it in code, it became simpler to solve. In looking around the terms of quantization, the term thresh-holding came up, and I realized how to solve the problem.

I created a threshold value, and compared the difference between old and new variables.

int threshold =3;
int xVariance = sensorValX-oldX;
int yVariance = sensorValY-oldY;
if (xVariance >=threshold && yVariance >= threshold ||xVariance >=threshold || yVariance >=threshold){
  Serial.print(sensorValX);
  Serial.print(",");
  Serial.print(sensorValY);
  Serial.print(",");
 oldX=sensorValX;
 oldY=sensorValY; 
  
}else{
; //dont do shi.
 // Serial.println(delbutton);
delay(1000);
    } 

now, when I turn either potentiometer, I get a response, and output I desire, but not while the device is just sitting there.