I have a old and very long (for me) script of 1000+ lines that I am updating/upgrading running on a ESP32. IRremote.h is used to control the functions with a switchcase. I am adding secondary control using bluetooth (MIT app Inventor). I would like to just add goto statements triggered from the bluetooth app to skip to the correlating and existing switch case functions as it will be very challenging to implement separate function. I have not worked with bluetooth before. Is this possible? If so, do you know of any tutorials? - I have looked without any luck. Thanks
If you are talking about classic Bluetooth it can be thought of as Serial communication without wires. If you can structure your code to do what you want it to do with Serial input from the monitor, then changing it to respond in the same fashion to bluetooth input is trivial.
I'm not sure about how your program is structured and why goto would make more sense than functions calls or switch case based on the Bluetooth inputs as well as the IR inputs.
even if your code is 1000+ lines long.
The best way to make suggestions is to show your complete code.
You can post code by using this method that adds the code-tags
There is an automatic function for doing this in the Arduino-IDE
just three steps
press Ctrl-T for autoformatting your code
do a rightclick with the mouse and choose "copy for forum"
paste clipboard into write-window of a posting
Give yourself a tap on your shoulder and encourage yourself to post your complete code.
If your code is well structured well done.
If your code is not so well structured learn something new how to structure code well
my standard method for searching is
googling with the word "arduino" and the words of interest. Even if there are 5 or 6 words like in this case
Thanks all for your input. I was extremely tired while working on this and writing my forum post. I was not able to find a good/simple method of calling a case inside of a switch with a separate input method. I ended up duplicating my switchcase and using two switchcases for the two separate input methods. it works well but it added 300+ lines of code and seems like a kludgy fix but it's done. Thanks for your help