من به تازگی سنسور کدورت سنج مدل B1286 رو خریداری کردم و به ترتیب زیر به برد آردوینو uno و همینطور آردوینو نانو وصل کردم اما در serial monitor آردوینو خروجی فقط عدد 1023 است. مشکل از سنسور است یا کد من مشکل دارد؟
A/C : +5v , E : Analog Input , K: Gnd
کدی که استفاده کردم:
لینک سنسور در فروشگاه آفتاب رایانه:کد:int sensorPin = A0; // select the input pin for the potentiometer int ledPin = 13; // select the pin for the LED int sensorValue = 0; // variable to store the value coming from the sensor void setup() { // declare the ledPin as an OUTPUT: pinMode(ledPin, OUTPUT); } void loop() { // read the value from the sensor: sensorValue = analogRead(sensorPin); // turn the ledPin on digitalWrite(ledPin, HIGH); // stop the program for <sensorValue> milliseconds: delay(sensorValue); // turn the ledPin off: digitalWrite(ledPin, LOW); // stop the program for for <sensorValue> milliseconds: delay(sensorValue);}
سنسور تشخیص آلودگی ( کدری ) آب


 LinkBack URL
 About LinkBacks



					
					
					
						
  پاسخ با نقل قول
			