LoginSignup
0
0

More than 5 years have passed since last update.

GR-ADZUKIでKXSC7-2050を使おう

Posted at

GR-ADZUKIは、標準でKXSC7-2050を使用したAE-KXSC7-2050を使用出来るようになっています。

AE-KXSC7-2050のピンヘッダーをはんだ付けしましょう。
GR-ADZUKIのピンソケットにピンヘッダーを取り付けて状態でAE-KXSC7-2050の基板を置いた状態ではんだ付けします

GR-ADZUKI-GYRO-1.jpg
GR-ADZUKI-GYRO-2.jpg

コードは取り出すだけです。

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);//シリアルポートを初期化  
}

void loop() {
  // put your main code here, to run repeatedly: 
    float x = (analogRead(A3));//A3ポートはX軸
    float y = (analogRead(A4));//A4ポートはY軸
    float z = (analogRead(A5));//A5ポートはZ軸

    Serial.print("X: ");
    Serial.print(x);
    Serial.print("Y: ");
    Serial.print(y);
    Serial.print("Z: ");
    Serial.print(z);    
   Serial.print("\n");
    delay(100);
}

後で気づいたのですが、IDE for GRの中にサンプルがありましたw

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0