SSブログ

RigExpert AA-30.ZERO サンプル・スケッチの不思議 [Arduino]

 RigExpert AA-30.ZERO サンプル・スケッチで不思議な現象に遭遇しています。

それはサンプル・スケッチが Arduino Uno では動くのですが、Arduino Mega 2560 では動かないのです。
それも簡単なスケッチです。
これです。
// UART bridge for data exchange between 
// RigExpert AA-30 ZERO antenna & cable analyzer and Arduino Uno
//
// Receives from the Arduino, sends to AA-30 ZERO.
// Receives from AA-30 ZERO, sends to the Arduino.
//
// 26 June 2017, Rig Expert Ukraine Ltd.
//
#include <SoftwareSerial.h>

SoftwareSerial ZERO(4, 7);  // RX, TX

void setup() {
  ZERO.begin(38400);        // init AA side UART
  ZERO.flush();
  Serial.begin(38400);      // init PC side UART
  Serial.flush();
}

void loop() {
  if (ZERO.available()) Serial.write(ZERO.read());    // data stream from AA to PC
  if (Serial.available()) ZERO.write(Serial.read());  // data stream from PC to AA
}



Arduino Mega 2560 ではソフトシリアルのサポートで Uno と異なるところや制限がどうなっているのかを調べてみようと思います。
接続の様子
DSC06606.JPG
nice!(0)  コメント(0) 
共通テーマ:趣味・カルチャー

nice! 0

コメント 0

コメントを書く

お名前:[必須]
URL:
コメント:
画像認証:
下の画像に表示されている文字を入力してください。