0

私は Temboo の新しいユーザーです。Choreo を使用して Arduino や Twitter とやり取りしようとしています。Temboo からコードを生成し、Arduino IDE で検証しようとすると、これらのエラーが発生します。

UserTimeline_Twitter.ino: In function 'void loop()':
UserTimeline_Twitter:52: error: 'TembooChoreo' was not declared in this scope
UserTimeline_Twitter:52: error: expected `;' before 'MentionsChoreo'
UserTimeline_Twitter:55: error: 'MentionsChoreo' was not declared in this scope

このエラーが発生する理由を誰か説明してもらえますか? ありがとう、

以下はコード例です。

 #include <SPI.h>
#include <WiFi.h>
#include <WiFiClient.h>
#include <Temboo.h>
#include "TembooAccount.h" // Contains Temboo account information

WiFiClient client;

int numRuns = 1;   // Execution count, so this doesn't run forever
int maxRuns = 10;   // Maximum number of times the Choreo should be executed

void setup() {
  Serial.begin(9600);

  // For debugging, wait until the serial console is connected.
  delay(4000);
  while(!Serial);

  int wifiStatus = WL_IDLE_STATUS;

  // Determine if the WiFi Shield is present.
  Serial.print("\n\nShield:");
  if (WiFi.status() == WL_NO_SHIELD) {
    Serial.println("FAIL");

    // If there's no WiFi shield, stop here.
    while(true);
  }

  Serial.println("OK");

  // Try to connect to the local WiFi network.
  while(wifiStatus != WL_CONNECTED) {
    Serial.print("WiFi:");
    wifiStatus = WiFi.begin(WIFI_SSID, WPA_PASSWORD);

    if (wifiStatus == WL_CONNECTED) {
      Serial.println("OK");
    } else {
      Serial.println("FAIL");
    }
    delay(5000);
  }

  Serial.println("Setup complete.\n");
}

void loop() {
  if (numRuns <= maxRuns) {
    Serial.println("Running Mentions - Run #" + String(numRuns++));

    TembooChoreo MentionsChoreo(client);

    // Invoke the Temboo client
    MentionsChoreo.begin();

    // Set Temboo account credentials
    MentionsChoreo.setAccountName(TEMBOO_ACCOUNT);
    MentionsChoreo.setAppKeyName(TEMBOO_APP_KEY_NAME);
    MentionsChoreo.setAppKey(TEMBOO_APP_KEY);

    // Set profile to use for execution
    MentionsChoreo.setProfile("TwitterAccount");

    // Set Choreo inputs
    String CountValue = "5";
    MentionsChoreo.addInput("Count", CountValue);

    // Identify the Choreo to run
    MentionsChoreo.setChoreo("/Library/Twitter/Timelines/Mentions");

    // Run the Choreo; when results are available, print them to serial
    MentionsChoreo.run();

    while(MentionsChoreo.available()) {
      char c = MentionsChoreo.read();
      Serial.print(c);
    }
    MentionsChoreo.close();
  }

  Serial.println("\nWaiting...\n");
  delay(30000); // wait 30 seconds between Mentions calls
}
4

1 に答える 1