X9C103S Mạch Biến Trở Số 10 KOhm Cho Arduino X9C103S Mạch Biến Trở Số 10 KOhm Cho Arduino

X9C103S Mạch Biến Trở Số 10 KOhm Cho Arduino

Thương hiệu OEM
Mô tả Nguồn: 3.3-5VDC, dải trở: 0-10 KOhm
Hết hàng (Đặt mua để có hàng sớm)
Số lượng mua:
Min: 1
Bội số: 1
0 Phản hồi
Yêu thích
Số lượng mua (Cái)
Đơn giá (VND)
1+ 59.000
20+ 58.000
50+ 57.000

Giao hàng toàn quốc

Thanh toán khi nhận hàng

đổi trảCam kết đổi/trả hàng

Mô tả sản phẩm

X9C103S Mạch Biến Trở Số 10 KOhm Cho Arduino là một mạch chiết áp kỹ thuật số dùng Chip X9C103S bao gồm một dãy điện trở, các công tắc gạt, một phần điều khiển và bộ nhớ không thay đổi.

Thông số kỹ thuật:

  • Điện áp hoạt động: 3 - 5VDC
  • Chip: X9C103S
  • Kích thước: 27mm x 13mm
  • Dải trở: 0 đến 10K Ohm
  • Trở kháng: 40 Ohm

X9C103S Mạch Biến Trở Số 10 KOhm Cho Arduino


Sơ đồ kết nối và code mẫu

X9C103S Mạch Biến Trở Số 10 KOhm Cho Arduino

#define UD  2                          // OUTPUT

#define INC 3

#define CS  4

void up(){

  digitalWrite(UD, HIGH);

  digitalWrite(INC, HIGH);

  digitalWrite(CS, LOW);              // turn on the microcircuit

  delayMicroseconds(1);

  digitalWrite(INC, LOW);

  delayMicroseconds(1);

  digitalWrite(INC, HIGH);

  delayMicroseconds(1);

///digitalWrite(INC, LOW);            // in this case the position of the slider is not written

  digitalWrite(CS, HIGH);             // turn off the chip and write the position in the EEPROM

}

void down()

{

  digitalWrite(UD, LOW);

  digitalWrite(INC, HIGH);

  digitalWrite(CS, LOW);

  delayMicroseconds(1);

  digitalWrite(INC, LOW);

  delayMicroseconds(1);

  digitalWrite(INC, HIGH);

  delayMicroseconds(1);

  digitalWrite(CS, HIGH);

}

void setup() {

  Serial.begin(9600);

  pinMode(INC, OUTPUT);

  pinMode(UD, OUTPUT);

  pinMode(CS, OUTPUT);

  digitalWrite(CS, HIGH);                         // turn off the microcircuit

}

void loop() {

  if (Serial.available())

     if (Serial.read() == '0'){

      down();

      Serial.print("-1");

     }

     else {

      up();

      Serial.print("+1");

     }

  }

}

Đăng nhập

Chat