author
2Comments

Tell us about yourself!

  • As I said, the temboo code is being successfully uploaded to the Arduino UNO board. The problem is why the serial monitor is displaying Shield:FAIL.I also tried by connecting Rx-Tx and Tx-Rx of Arduino UNO-ESP8266-01 but the serial monitor still displays Shield:FAIL.Please let me know why the serial monitor is displaying Shield:FAIL despite of correct code and connections.

    Sorry, I just forgot to upload the file.The code is as below:#include <SPI.h>#include <WiFi.h>#include <WiFiClient.h>#include <Temboo.h>#include "TembooAccount.h" // Contains Temboo account informationWiFiClient client;// The number of times to trigger the action if the condition is met// We limit this so you won't use all of your Temboo calls while testingint maxCalls = 10;// The number of times this Choreo has been run so far in this sketchint calls = 0;int inputPin = A0;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) { ...

    see more »

    Sorry, I just forgot to upload the file.The code is as below:#include <SPI.h>#include <WiFi.h>#include <WiFiClient.h>#include <Temboo.h>#include "TembooAccount.h" // Contains Temboo account informationWiFiClient client;// The number of times to trigger the action if the condition is met// We limit this so you won't use all of your Temboo calls while testingint maxCalls = 10;// The number of times this Choreo has been run so far in this sketchint calls = 0;int inputPin = A0;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); } // Initialize pins pinMode(inputPin, INPUT); Serial.println("Setup complete.\n");}void loop() { int sensorValue = analogRead(inputPin); Serial.println("Sensor: " + String(sensorValue)); if (sensorValue >= 2) { if (calls < maxCalls) { Serial.println("\nTriggered! Calling SendEmail Choreo..."); runSendEmail(sensorValue); calls++; } else { Serial.println("\nTriggered! Skipping to save Temboo calls. Adjust maxCalls as required."); } } delay(250);}void runSendEmail(int sensorValue) { TembooChoreo SendEmailChoreo(client); // Set Temboo account credentials SendEmailChoreo.setAccountName(TEMBOO_ACCOUNT); SendEmailChoreo.setAppKeyName(TEMBOO_APP_KEY_NAME); SendEmailChoreo.setAppKey(TEMBOO_APP_KEY); // Set profile to use for execution SendEmailChoreo.setProfile("JigarFaria"); // Identify the Choreo to run SendEmailChoreo.setChoreo("/Library/Google/Gmail/SendEmail"); // Run the Choreo unsigned int returnCode = SendEmailChoreo.run(); // Read and print the error message while (SendEmailChoreo.available()) { char c = SendEmailChoreo.read(); Serial.print(c); } Serial.println(); SendEmailChoreo.close();}

    View Topic »