Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signal: Help button, with support message #2

Closed
MisterChalmers opened this issue Apr 17, 2022 · 4 comments
Closed

Signal: Help button, with support message #2

MisterChalmers opened this issue Apr 17, 2022 · 4 comments
Assignees

Comments

@MisterChalmers
Copy link
Contributor

set dial button as a support button

  • if you hold down button for 5 seconds a special page comes up that says "SENDING FOR SUPPORT IN 5...4....3...2..1.."
    • then it sends chalmersproject a telegram message or something with the shelter name that asked for help

diagram on chalmers signal explaining you can hold down dial to send a HELP! SUPPORT message to chalmersproject


i've created a GuiSlice Page to trigger when button is pressed.
I'm creating an interrupt for when button is pressed.

added this to setup and also this interrupt

void ICACHE_RAM_ATTR encoder_button_trigger()
{
  encoder_button_pressed = true;
  Serial.println("encoder button pressed!");
}

//...

void setup()
{
//...
attachInterrupt(digitalPinToInterrupt(5), encoder_button_trigger, ONLOW);
//...
}
@MisterChalmers
Copy link
Contributor Author

MisterChalmers commented Apr 17, 2022

With commit 171332c signal now triggers "call for help screen with rotary encoder button is pressed.

WIP items

  • send telegram message
  • add a "sending support message" screen
  • add a "support message sent!" screen

@MisterChalmers
Copy link
Contributor Author

MisterChalmers commented Apr 19, 2022

signal telegram butotn now actually sends a message to a telegram support group. 83694a6

TODO:

  • pull sheltername from API and sub that name into the support message sent to telegram
  • add "sending telegram message, telegram message sent!" screens.
  • add error handling for telegram API and display error on screen
  • add logo to chalmers signal bot

@MisterChalmers MisterChalmers self-assigned this May 3, 2022
@MisterChalmers
Copy link
Contributor Author

opened PR with addition screens for message sending/message sent and refactor of handle_button function #3

@MisterChalmers
Copy link
Contributor Author

This feature is complete! Some to have improvements for this feature for later:

  • send phone number for shelter in telegram support message. Something like:
St. Felix Augusta's Spot Signal: NEED HELP!
Phone: (123) 213 2134
Address: 444 real address street, fake land
  • add confirmation screen to GUISLICE for telling user
support message sent!
someone will call or be by to help shortly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants