I'm trying to use (2) textboxes to send data over a Bluetooth connection to an Arduino.
What's the best way to accomplish this? I tried a single button, however it send the 2 boxes' data concatenated which will not work. Currently I'm using this extension App Inventor Extensions: Textbox | Pura Vida Apps and it will send any changes whether it's an erasure of a single character or an erasure of all characters with an empty textbox.
I have 2 textboxes like this and would rather not have a button for each box to initialize a serial data send. Is there another way to do this with a textbox losing focus or can a single button send 2 different textbox values over serial, one after the other, so that I can differentiate them when receiving the values into the Arduino?
You really don't need an extension, just 2 TextBoxes, 1 Button and a short procedure that collects the data from each box and sends it. I would suggest concatenation with a delimiter may be the way to go:
TextBox1_text + "|" + TextBox2_text - separating the two values in the Arduino Sketch.
Hi Chris, thanks for the response. I'm going to use 2 buttons, that's not my preference however I do not want to concatenate and so 2 buttons seems like my best option.