This is an old revision of the document!
Table of Contents
시리얼 포트 사용방법
FADUINO-18TA
UNO를 기반으로 설계된 FADUINO-18TA모델은 시리얼포트가 하나만 있습니다.
따라서 Serial.begin이나 Serial.print명령에 숫자를 기입하지 않아도 됩니다.
- 채널0 : 업로드와 겸용. 업로드가 끝나면 케이블을 바꿔서 다른 장비와 통신가능.
int ADI_Value0; int ADV_Value4; void setup() { Serial.begin(9600); // 채널0 } void loop() { ADI_Value0 = analogRead(A0); delay(100); ADV_Value4 = analogRead(A4); delay(100); Serial.print(" CH 0 = "); Serial.print(ADI_Value0); Serial.print("₩n" ); Serial.print(" CH 4 = "); Serial.print(ADV_Value4); Serial.print("₩n₩n" ); delay(200); }
FADUINO-18TA 외 다른 모델
아래 소스는 18TA를 제외한 나머지 FADUINO용입니다. 이 제품들은 MEGA를 기반으로 설계되었기 때문에 3개의 시리얼포트가 존재합니다. 따라서 Serial.begin이나 Serial.print명령에 숫자가 포함됩니다. 이 숫자가 채널번호를 의미합니다. 아래 소스를 잘 살펴보시기 바랍니다.
- 채널0 : 업로드용. 다른 채널이 있기 때문에 채널0은 업로드전용으로만 사용.
- 채널1 : RS232C
- 채널2 : RS485
int ADI_Value0; int ADV_Value4; void setup() { Serial1.begin(9600); // 채널1 } void loop() { ADI_Value0 = analogRead(A0); delay(100); ADV_Value4 = analogRead(A4); delay(100); Serial1.print(" CH 0 = "); Serial1.print(ADI_Value0); Serial1.print("₩n" ); Serial1.print(" CH 4 = "); Serial1.print(ADV_Value4); Serial1.print("₩n₩n" ); delay(200); }
기술지원 정책
당사에서는 고객께서 작성하신 사용자 소스에 대한 분석 및 수정 서비스는 제공하지 않고 있음을 양해 부탁드립니다. 기술지원은 당사에서 제공한 하드웨어와 관련된 사항에 한하여 지원이 가능합니다.
본 샘플 소스는 사전에 정상 동작이 확인된 예제입니다.
