ESP8266 notifications triggered by push button

Hello. I have an ESP8266-01 that sends a notification to my phone via pushbullet and pushingbox. I am uploading code straight to the ESP8266-01. Is there any way that I can add a pushbutton to this setup so that the notification sends when the button is pressed? I am using an arduino uno aswell, but code is not being uploaded to it.

PUSHBULLET.ino (1.7 KB)

The sendNotification() function is called unconditionally from setup() Put it in loop(), read an input and only call the function when the input becomes LOW or HIGH depending on how you wire it

I am using an arduino uno aswell, but code is not being uploaded to it.

No surprise there as the Uno has no networking functionality built in

UKHeliBob: The sendNotification() function is called unconditionally from setup() Put it in loop(), read an input and only call the function when the input becomes LOW or HIGH depending on how you wire it No surprise there as the Uno has no networking functionality built in

How would I put it into the loop without it running over and over again?

How would I put it into the loop without it running over and over again?

The code to check whether the input has changed to signal that the function should be called will run over and over again. That is the whole point. When the input value [u]becomes[/u] triggered you call the function, but don't call it again unless/until the input is triggered again

UKHeliBob:
The code to check whether the input has changed to signal that the function should be called will run over and over again. That is the whole point. When the input value becomes triggered you call the function, but don’t call it again unless/until the input is triggered again

Thank you for your help. I have put it into a loop, but I still am having trouble determining what pin the button will be connected to since the arduino uno is not being used.

Thank you for your help. I have put it into a loop, but I still am having trouble determining what pin the button will be connected to since the arduino uno is not being used.

Accessing the esp8266-01 i/o as an input is tricky. https://www.instructables.com/id/ESP8266-Using-GPIO0-GPIO2-as-inputs/

You have another thread about connecting a different UNO running servos to the exp8266=01. https://forum.arduino.cc/index.php?topic=661970.msg4458976#msg4458976

Given you needs, I would consider changing your architecture so that use use a NodeMCU or Wemos D1 to run both the servos and the pushbullet/pushingbox.

Both of those development boards are more simple to use with i/o than the basic esp8266-01 with the Arduino passively used as a serial interface.