Serial.println Problem

Thanks for all the guidance regarding the post on bluetooth! I was able to overcome that error, however another one has occur.

char b;
char string0='W';
char string1='A';

value0 = analogRead(flexPin0);         //Read and save analog value from potentiometer
value0 = map(value0, 700, 900, 0, 255);//Map value 0-1023 to 0-255 (PWM)
delay (100);

 value1 = analogRead(flexPin1);
 value1 = map(value1, 700, 900, 0, 255);//Map value 0-1023 to 0-255 (PWM)
 delay (100);

  if (value0 >= 620)
      { 
        b=string0;
        Serial.println(b);//Read and save analog value from potentiometer
      } else if (value1 >=620)
 { 
        b=string1;
        Serial.println(b);//Read and save analog value from potentiometer
      }

So the above is just segments of my overall code. As seen, value0 and value1 will be the value of sensors and once it reaches 620, the char b will be equal to string0 or value1, which holds the character 'W' and 'A'. However, it does not show up in the serial monitor.

value0 = analogRead(flexPin0);         //Read and save analog value from potentiometer
Serial.println(value0);               //Print value
  if (value0 >= 620)
  { 
    b=string0;
    Serial.println(b);
  }

This is the previous code that I used, and it works. However, during this stage, I was only using one sensor, where as now I am using four. Can someone help as to why the upper code will not print the char b?

value0 = map(value0, 700, 900, 0, 255);//Map value 0-1023 to 0-255 (PWM)

Mapping to a value between 0 and 255 then...

  if (value0 >= 620)

...checking if that value is greater than 620.

If the light bulb does not come on, read this post out loud.

I assure you that the value is not random, it reaches around 920 while the base value is around 590

As suggested, read this out loud

Mapping to a value between 0 and 255 then checking if that value is greater than 620.

UKHeliBob:
As suggested, read this out loud

As stated, the base value is around 590 while it can reach 900s.

Or does the mapping value effects it?

value0 = analogRead(flexPin0);         //Read and save analog value from potentiometer
Serial.println(value0);               //Print value
  if (value0 >= 620)
  { 
    b=string0;
    Serial.println(b);
  }

If so, then why did this code work ?? All the parameters are the same.

Izzy13:

value0 = analogRead(flexPin0);         //Read and save analog value from potentiometer

Serial.println(value0);              //Print value
  if (value0 >= 620)
  {
    b=string0;
    Serial.println(b);
  }




If so, then why did this code work ?? All the parameters are the same.

Because there is no map() here.

Probably not the takeaway I should be taking from this but after testing it out I've decided to simply remove map() from the code ;D

But just for future references, how should I have adjusted the value since the analog read is around 600?

But just for future references, how should I have adjusted the value since the analog read is around 600?

Use map() if you need to reduce the value the test the mapped value not the original value