加速度センサーをNMEA0183フォーマットで出力するため 下記サイトで製作例を見つけた。
https://forum.pololu.com/t/lsm303d-a-star-32u4-nmea-0183-compass/7838
サイトにありますスケッチをダウンロードしてIDEにてコンパイルを行うとエラーを確認しました。
エラーの内容は下記です。
Arduino:1.8.6 (Windows 7), ボード:"Arduino/Genuino Uno"
C:\Users\user\Downloads\Compass\Compass.ino: In function 'void setup()':
Compass:10:3: error: 'Serial1' was not declared in this scope
Serial1.begin(38400); //On a A-Star 32U4 this is the serial port on pins 0 (RX) and 1 (TX)
^
C:\Users\user\Downloads\Compass\Compass.ino: In function 'void nmea_csum(char*)':
C:\Users\user\Downloads\Compass\Compass.ino:71:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for ( int n=1; n < strlen(nmea); n++ ) { //XOR of the characters between the $ and the *
^
C:\Users\user\Downloads\Compass\Compass.ino: In function 'void loop()':
Compass:110:5: error: 'Serial1' was not declared in this scope
Serial1.print( nmea );
^
Compass:120:3: error: 'Serial1' was not declared in this scope
Serial1.print( nmea );
^
exit status 1
'Serial1' was not declared in this scope
ここまで。