How can I get a button to send out a certain amount (Submitted by the user) of Bluetooth signals?

Hi! I'm currently working on my counties maker challenge, and there is something that I am kind of stuck on.

For context, this app is connected via Bluetooth to a pill dispenser, and i want the user to be able to input the amount of pills dispensed by the machine, so that it is personalized to their needs, but so that they are not able to just dispense a different amount every time because we are marketing this towards high risk and old individuals, and this would defeat our purpose.

The approach I am trying to take is to have a screen that only shows up when signing up, that shows up before the main screen with a gui like this (attached image below) and I wanted to store the users inputs into a tinyDB and try to pull it out with like a bluetooth signal that will tell the motor to move the gear inside of our physical machine with repeat function feature, but I don't know if a feature like that exists or how to use it.

  • Sorry for the bad explanation, I tried my best to explain my issue in a easy to understand way.

What microcontroller/bluetooth module controls the pill dispenser?

its the Bluetoothcllient non visible component
.

To rephrase, what bluetooth receiver does your dispenser use (physical component; I'm not talking about the app)? Just search for the module name (or just "bluetooth") on this community, you should find tutorials describing how to send, receive, and manage bluetooth signals.