Twitter search from IFTTT to Blynk with Arduino not working

I’ve created a private IFTTT applet to search twitter for a word to switch a virtual pin on Blynk. However, I just can’t get it to work.

the web request is
http://139.59.206.133/XXXXAuthcodeXXXXXX/pin/V1
Method is PUT
Content is Application/JSON
Body is “1”

Here’s my code.

#define BLYNK_DEBUG

#include <SPI.h>
#include <BlynkSimpleWiFiShield101.h>

#define WIFI_SSID "MYSSID"
#define WPA_PASSWORD "MYPASSWORD"

BlynkTimer timer;

void printWifiStatus()
{
	// print the SSID of the network you're attached to
	Serial.print("SSID: ");
	Serial.println(WiFi.SSID());

	// print your WiFi shield's IP address
	IPAddress ip = WiFi.localIP();
	Serial.print("IP Address: ");
	Serial.println(ip);

	// print the received signal strength
	long rssi = WiFi.RSSI();
	Serial.print("Signal strength (RSSI):");
	Serial.print(rssi);
	Serial.println(" dBm");
}
void setup() 
{
	Serial.begin(115200);
  	
	// setup wifi board connection pins
	WiFi.setPins(8, 7, 1);
	SPI.setSCK(14);
	
	// 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\nWiFi board:");
	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);
		
	}

	printWifiStatus();
	Serial.println("Setup complete.\n");
	
	//Blynk app auth token
	char auth[] = "xxxxxxAuthtokenxxxxxxxx";
	
	Blynk.config(auth); 
	while (Blynk.connect() == false)
	{
		// Wait until connected
	}
	Serial.println("Connected to Blynk.\n");
	
}
void loop() 
{
	Blynk.run();
	timer.run();
	
}

BLYNK_WRITE(V1) 
{
	String pinData = param.asString();
	Serial.println(pinData + "\n");
	Serial.println("Blynk Write V1\n");
}


The following is the debug output after the wifi has connected.


/ _ )/ /_ _____ / /__
/ _ / / // / _ / '/
/
//_, /////_
/
__/ v0.6.1 on Teensy 3.6

[11833] Connecting to blynk-cloud.com:80
[11957] <[1D|00|01|00]
[11958] <pdLfey77tSf-uvtgXsRwBHOEsacj8Wpq
[12022] >[00|00|01|00|C8]
[12022] Ready (ping: 64ms).
[12089] <[11|00|02|00]W
[12089] <ver[00]0.6.1[00]h-beat[00]10[00]buff-in[00]1024[00]dev[00]Teensy 3.6[00]con[00]WiFi101[00]build[00]Dec 29 2019 15:20:47[00]
Connected to Blynk.

[12148] >[00|00|02|00|C8]
[22090] <[06|00|03|00|00]
[22149] >[00|00|03|00|C8]
[32091] <[06|00|04|00|00]
[32150] >[00|00|04|00|C8]
[42092] <[06|00|05|00|00]
[42151] >[00|00|05|00|C8]

The debug output keeps outputting these lines.

At no time is the BLYNK_WRITE(V1) called, can anyone help ?

Exactly what hardware are you using for this?

Pete.

It’s a teensy 3.6 and an adafruit atwinc 1500 breakout board.

Do you know what those debug lines mean? It looks like it’s polling, transmit out and received data. Is there any documentation ?

Ok, sorted this. I hadn’t realised you have to touch the pin in the app to select a virtual pin, duh! Once I’d done this it all kicked off. The log output shows a ‘1’ and then a ‘0’ . So the V1 function is called once from a 0 to1 transition and again from a 0 to 1. Working great now!