原因がわかりません。教えてほしいです。 エラーメッセージでは、 Wire was not declared in this scope と表記されています。 include <Wire.h> void setup() { Wire.begin(); Serial.begin(9600); while (!Serial); } void loop() { Serial.print(getCO2ppm()); Serial.println(" ppm"); delay(3000); } long getCO2ppm() { byte tmpBuf[7]; sendCommand('R'); Wire.requestFrom(0x31, 7); for (int i = 0; Wire.available(); i++) { tmpBuf[i] = Wire.read(); delay(1); } if (tmpBuf[0] != 0x08 || tmpBuf[3] == 0xff || tmpBuf[4] == 0xff || tmpBuf[5] == 0xff || tmpBuf[6] == 0xff) { return 0; } return (tmpBuf[1] << 8) | tmpBuf[2]; } void sendCommand(byte val) { Wire.beginTransmission(0x31); Wire.write(val); Wire.endTransmission(); } void sleep() { sendCommand('S'); delay(4000); } void wakeup() { sendCommand('W'); delay(6000)