Arduino as logic driver

This code is now working properly.
Outputs will change as input voltage rises 0V to 5V.
6 different situations.

void setup() {

  Serial.begin(9600);
  
  pinMode(22,OUTPUT);
  pinMode(23,OUTPUT);
  pinMode(24,OUTPUT);
  pinMode(25,OUTPUT);
  pinMode(26,OUTPUT);
  pinMode(27,OUTPUT);
  pinMode(28,OUTPUT);
  pinMode(29,OUTPUT);
  pinMode(30,OUTPUT);
  pinMode(31,OUTPUT);
  pinMode(32,OUTPUT);
  pinMode(33,OUTPUT);
  pinMode(34,OUTPUT);
  pinMode(35,OUTPUT);
  pinMode(36,OUTPUT);
  pinMode(37,OUTPUT);

  pinMode(A1, INPUT);
}

void loop() {

  int sensorValue = analogRead(A1);
  
  if (sensorValue <= 170.5 ) 
 {digitalWrite(22, LOW);
  digitalWrite(23, HIGH);
  digitalWrite(24, LOW);
  digitalWrite(25, LOW); 
  digitalWrite(26, HIGH);
  digitalWrite(27, LOW);
  digitalWrite(28, LOW);
  digitalWrite(29, HIGH);
  digitalWrite(30, LOW);
  digitalWrite(31, LOW);
  digitalWrite(32, HIGH);
  digitalWrite(33, LOW);
  digitalWrite(34, LOW);
  digitalWrite(35, HIGH);
  digitalWrite(36, LOW);
  digitalWrite(37, LOW);
 }
  if (sensorValue >= 170.6 && sensorValue < 341)
 {digitalWrite(22, LOW);
  digitalWrite(23, HIGH);
  digitalWrite(24, LOW);
  digitalWrite(25, LOW); 
  digitalWrite(26, HIGH);
  digitalWrite(27, LOW);
  digitalWrite(28, LOW);
  digitalWrite(29, HIGH);
  digitalWrite(30, LOW);
  digitalWrite(31, LOW);
  digitalWrite(32, HIGH);
  digitalWrite(33, LOW);
  digitalWrite(34, HIGH);
  digitalWrite(35, LOW);
  digitalWrite(36, HIGH);  
  digitalWrite(37, HIGH);
 }
  if (sensorValue >= 341.1 && sensorValue < 511.5)
 {digitalWrite(22, LOW);
  digitalWrite(23, HIGH);
  digitalWrite(24, LOW);
  digitalWrite(25, LOW);  
  digitalWrite(26, HIGH);
  digitalWrite(27, LOW);
  digitalWrite(28, LOW);
  digitalWrite(29, HIGH);
  digitalWrite(30, LOW);
  digitalWrite(31, HIGH);
  digitalWrite(32, LOW);
  digitalWrite(33, HIGH);
  digitalWrite(34, HIGH);
  digitalWrite(35, LOW);  
  digitalWrite(36, HIGH);
  digitalWrite(37, HIGH);
 } 
  if (sensorValue >= 511.6 && sensorValue < 682)
 {digitalWrite(22, LOW);
  digitalWrite(23, HIGH);
  digitalWrite(24, LOW);
  digitalWrite(25, LOW);  
  digitalWrite(26, HIGH);
  digitalWrite(27, LOW);
  digitalWrite(28, HIGH);
  digitalWrite(29, LOW);
  digitalWrite(30, HIGH);
  digitalWrite(31, HIGH);
  digitalWrite(32, LOW);
  digitalWrite(33, HIGH);  
  digitalWrite(34, HIGH);
  digitalWrite(35, LOW);
  digitalWrite(36, HIGH);
  digitalWrite(37, HIGH);
 }
  if (sensorValue >= 682.1 && sensorValue < 852.5)
 {digitalWrite(22, LOW);
  digitalWrite(23, HIGH);
  digitalWrite(24, LOW); 
  digitalWrite(25, HIGH);
  digitalWrite(26, LOW);
  digitalWrite(27, HIGH);
  digitalWrite(28, HIGH);
  digitalWrite(29, LOW);
  digitalWrite(30, HIGH);
  digitalWrite(31, HIGH);
  digitalWrite(32, LOW); 
  digitalWrite(33, HIGH);
  digitalWrite(34, HIGH);
  digitalWrite(35, LOW);
  digitalWrite(36, HIGH);
  digitalWrite(37, HIGH);
 }
  if (sensorValue >= 852.6 && sensorValue < 1023)
 {digitalWrite(22, HIGH);
  digitalWrite(23, LOW);
  digitalWrite(24, HIGH);
  digitalWrite(25, HIGH);
  digitalWrite(26, LOW);
  digitalWrite(27, HIGH);
  digitalWrite(28, HIGH);
  digitalWrite(29, LOW);
  digitalWrite(30, HIGH);  
  digitalWrite(31, HIGH);
  digitalWrite(32, LOW);
  digitalWrite(33, HIGH);
  digitalWrite(34, HIGH);
  digitalWrite(35, LOW);
  digitalWrite(36, HIGH);
  digitalWrite(37, HIGH);
 }}

Show your complete sketch.
Use CTRL T to format your code.
Attach your sketch between code tags
[code]Paste your sketch here[/code]

To start with, learn to use braces { }

See how to use the if/else syntax.
https://www.arduino.cc/reference/en/language/structure/control-structure/if/

Where are you defining your pins?

if (sensorValue >= 852,6What's that comma doing there?

AWOL:
if (sensorValue >= 852,6What's that comma doing there?

Im try to share analog input voltage information to 6 different case digital outputs. This is if voltage is 5/1023*852,6 amount.

Did you read:
https://www.arduino.cc/reference/en/language/structure/control-structure/if/

analogRead does not return a floating point value, and anyway in C, the comma is not a decimal point

larryd:
Did you read:
if - Arduino Reference

Not yet before I made post. This might help something. Thanks

What is a logic driver?

as for giving you a clue about the error msg.digitalWrite(pin23, HIGH); pin23 has not been declared as a variable but if you want to set pin 23 HIGHdigitalWrite(23, HIGH); will suffice.

larryd:
What is a logic driver?

With arduino we can replace quite amount of logic circuits and make same stuff as whole big logic circuit

You mean a Logic Gate.

Deva_Rishi:
as for giving you a clue about the error msg.

digitalWrite(pin23, HIGH);

pin23 has not been declared as a variable but if you want to set pin 23 HIGH

digitalWrite(23, HIGH);

will suffice.

Yes thank you very much, code passed check now. Thou need to test it still if it do what it should do.

larryd:
You mean a Logic Gate.

Gate is one circuit, arduino can "drive" whole circuit system

You might be thinking of a programmable device or PLA.