I am working on a project in which I will use Google Calendar events as input to turn on LED lights. I attached a Wifi shield (WINC1500 MODEL B) to my Arduino Uno and successfully connected to the WPA network. The library I use is WIFI101 version 0.15.2, and shield's firmware version is 19.5.4.
I created a new Google account and calendar and a new Temboo account, and followed instructions to make the Google API with Temboo choreo. Temboo generated a GetAllEvent code and header for me and I copied those in Arduino IDE 1.8.5. However, I encountered a series of stray errors. I have tried to clear out all the space and retype the symbols (ex, "" and _) but I haven't been able to solve the problem.
I need help. Here is the error message:
Arduino: 1.8.5 (Mac OS X), Board: "Arduino/Genuino Uno"
GetAllEvents_b:50: error: stray '\302' in program
GetAllEventsChoreo.setAccountName(TEMBOO_ACCOUNT);
^
GetAllEvents_b:50: error: stray '\240' in program
GetAllEvents_b:50: error: stray '\302' in program
GetAllEvents_b:50: error: stray '\240' in program
GetAllEvents_b:51: error: stray '\302' in program
GetAllEventsChoreo.setAppKeyName(TEMBOO_APP_KEY_NAME);
^
GetAllEvents_b:51: error: stray '\240' in program
GetAllEvents_b:51: error: stray '\302' in program
GetAllEvents_b:51: error: stray '\240' in program
GetAllEvents_b:52: error: stray '\302' in program
GetAllEventsChoreo.setAppKey(TEMBOO_APP_KEY);
^
GetAllEvents_b:52: error: stray '\240' in program
GetAllEvents_b:52: error: stray '\302' in program
GetAllEvents_b:52: error: stray '\240' in program
exit status 1
stray '\302' in program
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
The code has invisible Unicode (2 byte) characters in it, usually cause by copying code from a Web page.
Post the complete code here using code tags when you do then copy it from your post back into the IDE and try compiling again.
#include <SPI.h>
#include <WiFi101.h>
#include <WiFiSSLClient.h>
#include <TembooSSL.h>
#include "TembooAccount.h"// Contains Temboo account information
WiFiSSLClient client;
int calls = 1;// Execution count, so this doesn't run forever
int maxCalls = 2;// 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 (calls <= maxCalls) {
Serial.println("Running GetAllEvents - Run #" + String(calls++));
TembooChoreoSSL GetAllEventsChoreo(client);
// Invoke the Temboo client
GetAllEventsChoreo.begin();
// Set Temboo account credentials
GetAllEventsChoreo.setAccountName(TEMBOO_ACCOUNT);
GetAllEventsChoreo.setAppKeyName(TEMBOO_APP_KEY_NAME);
GetAllEventsChoreo.setAppKey(TEMBOO_APP_KEY);
GetAllEventsChoreo.setDeviceType(TEMBOO_DEVICE_TYPE);
// Set profile to use for execution
GetAllEventsChoreo.setProfile("GoogleCalendarAccount");
// Set Choreo inputs
String CalendarIDValue = "6fqpe60r34f7komikovpgaa0mk@group.calendar.google.com";
GetAllEventsChoreo.addInput("CalendarID", CalendarIDValue);
// Identify the Choreo to run
GetAllEventsChoreo.setChoreo("/Library/Google/Calendar/GetAllEvents");
// Run the Choreo; when results are available, print them to serial
GetAllEventsChoreo.run();
while (GetAllEventsChoreo.available()) {
char c = GetAllEventsChoreo.read();
Serial.print(c);
}
GetAllEventsChoreo.close();
}
Serial.println("\nWaiting...\n");
delay(30000); // wait 30 seconds between GetAllEvents calls
}
Copied my code in the code tag and compiled it again but it didn't work. I got the same issue.
But that actually reminds me one thing. My teammate sent me those codes through iMessage and Slack after copying them from Temboo. Do you think that causes any problem?