ความรู้แน่น ฟรีสำหรับชุมชน ArduinoAll ที่นี่เท่านั้น

ฟรีและดีที่สุด คอร์สอบรม Arduino + NodeMCU
ทำเพื่อแบ่งปัน ห้ามนำไปจำหน่าย หรือเก็บเงินค่าเรียน
  !!!


  


AllNewStep รับประกันคุณภาพทุกชิ้น วันจันทร์-ศุกร์แจ้งชำระสินค้าก่อน 14.00 จัดส่งทันทีวันนี้ค่ะ

กรุงเทพ /ภาคกลาง ได้พรุ่งนี้


*** สินค้าทุกชิ้น ถ้าสามารถทำรายการสั่งซื้อได้ แสดงว่ามีครบทุกรายการค่ะ *** 

พิมพ์ค้นหาบทความ หัวข้อกระทู้ และสินค้าในเว็บ AllNewStep ได้ที่นี่
QUOTE 

Single Phase Voltage Sensor โมดูลวัดโวลต์ AC 220v สูงสุด 250VAC

จ๊าบ

พี่ครับสอบถามหน่อยครับ มีcode การใช้งานเซนเซอร์วัดโวลท์ ตัวนี้ไหมครับ

QUOTE 
ความคิดเห็นที่ #1
จ๊าบ
QUOTE 
ความคิดเห็นที่ #2
เจ้าของร้าน

มีตัวอย่างในหน้าสินค้าด้วยครับ 

 

const int analogInPin = A0;  // Analog input pin that the potentiometer is attached to

const int analogOutPin = 9; // Analog output pin that the LED is attached to

 

int sensorValue = 0;        // value read from the pot

int outputValue = 0;        // value output to the PWM (analog out)

 

void setup() {

  // initialize serial communications at 9600 bps:

  Serial.begin(9600); 

}

 

void loop() {

  // read the analog in value:

  sensorValue = analogRead(analogInPin);            

  // map it to the range of the analog out:

  outputValue = map(sensorValue, 0, 1023, 0, 255);  

  // change the analog out value:

  analogWrite(analogOutPin, outputValue);           

 

  // print the results to the serial monitor:

  Serial.print("sensor = " );                       

  Serial.print(sensorValue);      

  Serial.print("\t output = ");      

  Serial.println(outputValue);   

 

  // wait 2 milliseconds before the next loop

  // for the analog-to-digital converter to settle

  // after the last reading:

  delay(2);                     

}

แสดงความคิดเห็นที่ 1-2 จากทั้งหมด 2 ความคิดเห็น
ขาย ARDUINO
คุณภาพ อันดับ 1

ได้รับรางวัลร้านยอดเยี่ยม
ตั้งแต่ปี 2558
ขาย Arduino
วีดีโอสอน Arduino

สอน esp8266

สอน Arduino IoT
สอน Arduino แบบเร็ว

สอน NodeMCU

อุปกรณ์ Arduino

MEMBER ZONE

พูดคุย-สอบถาม