Pages: [1]   Go Down
Author Topic: strange behavior of a qprox  (Read 285 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 24
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


i'm working with a qt110 chip.

so, when i try to read it just normal with the analog input tutorial, everything is fine. i check out the serial monitor, and i see the right values rollin. 1024 if no touch, 0 when i touch it.

but as i built it into my program, i never get a clear value. and the value, that it reads changes very oftly. here my reading function:

void position(){
  int links;
  int rechts;
  links = analogRead(linkerPin);
  rechts = analogRead(rechterPin);
  if(links < 500){
    if(positionValue < 64){
      int neuePos = positionValue << 1;
      positionValue = neuePos;

  if(rechts < 500){
    if(positionValue > 1){
      int neuePos = positionValue >> 1;
      positionValue = neuePos;


how can it be? is there something in general i have forgotten? any suggestions?

thanks for any reply

Pages: [1]   Go Up
Jump to: