UART (시리얼 통신)를 USB로 변환시켜주는 모듈이다.
USB로부터 전원을 끌어 올 경우에만 3.3V 또는 5.0V를 연결해 준다.
모듈의 TX는 아두이노의 RX에, 모듈의 RX는 아두이노의 TX에 서로 교차시켜서 연결해 준다.
GND는 아두이노의 GND에 연결해 준다.
- Imported new original control chip PL2303HX, stable high-speed brush
- With 500mA resettable fuse overcurrent 2. Set the two lights can be real-time monitoring data transmission data transmission status
- Reserved 3.3V and 5V pin interface to facilitate the needs of different voltage supply systems brush
- Interface pin parallel with the board, and the board instead of a vertical installation, leads Dupont line convenience brush
- the entire circuit board using high-quality heat shrink tubing transparent coating so that the PCB with the outside world into the insulating state to protect accidental short circuit board is a metal and burning, the use of a transparent material, it does not affect the access panel opening screen viewing and monitoring Performance Indicators 6. the finished packaging using static bag sealed package, to ensure that the board the quality is not destroyed before the unused 7. supports XP, WIN7 and other systems
int firstSensor = 0; // first analog sensor int secondSensor = 0; // second analog sensor int thirdSensor = 0; // digital sensor int inByte = 0; // incoming serial byte void setup() { // start serial port at 9600 bps and wait for port to open: Serial.begin(9600); while (!Serial) { ; // wait for serial port to connect. Needed for native USB port only } pinMode(2, INPUT); // digital sensor is on digital pin 2 establishContact(); // send a byte to establish contact until receiver responds } void loop() { // if we get a valid byte, read analog ins: if (Serial.available() > 0) { // get incoming byte: inByte = Serial.read(); // read first analog input: firstSensor = analogRead(A0); // read second analog input: secondSensor = analogRead(A1); // read switch, map it to 0 or 255 thirdSensor = map(digitalRead(2), 0, 1, 0, 255); // send sensor values: Serial.print(firstSensor); Serial.print(","); Serial.print(secondSensor); Serial.print(","); Serial.println(thirdSensor); } }
'IT > Hardware' 카테고리의 다른 글
[SHZ-EK024] DHT11 온습도 센서 모듈 (0) | 2018.08.28 |
---|---|
샤오미 보조배터리 10400 분해 (0) | 2018.08.28 |
(아두이노 나노 호환) 오렌지 보드 나노 (0) | 2018.08.28 |
NAS DS216j 하드디스크 충돌함 (0) | 2017.12.08 |
시놀로지 나스에 외부 도메인 사용하기 (0) | 2016.04.21 |