Difficulty sending more than one variable from a Microchip microcontroller using BLE (HM-10) and MIT APP inventor

Hello Chris...
See attached... Thankful for screenshots as this would be difficult to describe with text only!

Ah well - thanks for trying! Looks like we cannot fool the extension Block, we must write data to it with BLE Characteristics. Still, at least it is possible to send a single string and split that into a csv List of the values.

Chris .. I am grateful for the help.
Can you look at another strange behavior with the MOD calculation?
Bluetooth not involved... pic not involved... use the slide bar to set a start time then press "start timer" watch it count down.
As the seconds count down, minutes -should- decrement when the seconds come to zero....however.... what happens is that the minutes decrement when the seconds drop below 30 !!!
is this an App inventor Bug?

demo_mod_error.aia (2.9 MB)

Most probably it is an error in your blocks

If you are asking for help, I recommend you to make it as easy for others to be able to help you ...
You probably will get more feedback then...

which means in your case post a screenshot of your relevant blocks...

To download the aia file, upload it to App Inventor, open it, do some bug hunting for you, etc... this takes time, and most people will not do that...
Thank you.

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.


sample run

At first sight, it looked fine to me.

I went back and reread your post, and now see that you fell victim to rounding in the format as decimal number block.

Try the quotient block instead, or the floor() block.

1 Like

ABG
I replaced "format as decimal number" with "floor" and it corrected the problem

Taifun
I would like to provide a picture of the blocks like others do on the forum... I am not sure how I can export them in such a way to place them on the forum. (like ABG did after your suggestion.)

Thanks to both of you for your insights.
Patrick

  • right click on "Cleanup Blocks" on an empty space on the Blocks Workspace
  • right click on Download Blocks as PNG on an empty space on the Blocks Workspace for all blocks, or
  • right click on individual blocks for Download Blocks as PNG for draggable blocks

http://ai2.appinventor.mit.edu/reference/other/download-pngs.html

Thank you...
I thought I would do the "Block download" to show the final result with the question regarding using the MODULO math function to make a down counter...
This works nicely

This Forum Topic, using BLE Characteristics, does send a compatible data list that is processed directly:

Thank you, Chris, I will look into it...
Patrick

1 Like