Assigning ID's to textboxes

Hello, complete beginner here, currently I'm working on a project for app-compatible arduino alarm clocks, and I want to set 2 different alarms. How can I make it so that the textbox inputs have ids assigned to them so that my code will be able to differentiate between the two alarms? Ex: Alarm 1 has id of 0, Alarm 2 has id of 1.


You might send a positive number for one of the alarms, and a negative number for the other alarm.

Alternatively, use a text JOIN to add a prefix to the message, like
A:nnn
B:nnn
where nnn is the timer value.

Either way, you would need more code in the Arduino to pick out the message parts.

1 Like

Hi, could you clarify how to execute your idea? Code-wise in the MIT App Inventor, what would I have to do? Apologies for asking, I am a complete beginner to this

Is this how to execute the join idea you mentioned? Let's say if my text in textbox1 is 08:30, and my text in textbox2 is 09:00, would the app send 0:08:30 and 1:09:00 respectively? If not, what would it send?

Is there any other information I could provide? Is my code in the latest post alright?

Yes.

1 Like

Alright, thank you!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.