Error 515 and other questions

I am a newbie and try to make an App showing the Voltage/Current/mAH and time from the Arduino board to the phone thru Bluetooth. I am using the Arduino Pro mini with HC-05 bluetooth module and MCP3424 ADC thru I2C. This is my first APP..

I have a couple of errors and questions and need your help. I tried to solve the problem by serching Frequently asked Q&A but in vain.

  1. Language - As soon as I open the Inventor, the default language is not English. Is there any way to change the default language as English??

  2. I try to fix error 515 and could improve a lot by inserting delimiter byte as 10, using Serial.println in the last data. BUT I still see Error 515 especially in 1~2 minutes of operation after start.

  3. The bottom area of the phone display is very Bright and this is annoying. How can I change the bottom area inversed? See App inventor Screen 1 which has dark bottom area.

  4. I wanted to get 7 variables from Arduino. Up to 6 variables, it worked just fine BUT if I add 7th data, I see " List index too Large" error.


    Is there any way to send / receive 7 variables?? Attached below is the blocks getting 6 variables.


  1. I attach aia and Arduino code as below which has 6 variables which has 2) and 3) problems.eBike_1v02.aia (56.2 KB) .
    BT_1V1_ino.txt (4.3 KB)

Thanks in advance for your kind advice. Young LEE

You can start by receiving all the data.' Bytes Available To Receive' is just a flag. To specify Receive all bytes, use a math block containing -1.

Ensure that the App Inventor Clock Timer gives enough time to process. You should always aim to use the longest time interval acceptable for the project, which is important for both comms success and the longevity of the hardware. The Ardunio main loop time interval must be about 20% slower than the App Inventor interval, to avoid data overlap.

...concerning the 515:

  1. Ensure the device (phone) is well within Bluetooth range
  2. Get the time intervals right as discussed above
  3. Ensure the Arduino is kept cool. Add a PC Case fan above the board or if running in open air, a desktop fan will do. So many people, (including myself) have lost their Arduino to over heating!

Dear Chris,

Thanks for the advice. I changed the block as below BUT I still have the same List index too large error. Sorry to bother you but please help.. Cheers, Young Lee


Arduino_code.txt (1.4 KB)

The Clock1 interval is 1000mSec.

I'll take a look at your Script.

If you run the App in the Companion, you can right-mouse click "do it" the "set input to" Block to see what has been received - which might reveal an error you would recognise.

That's not the complete code, though the snippet itself has typographical errors and design faults too.

I am a beginner and started App inventor two days ago for the first time in my life.. Sorry..I do not know how to run app in Companion.. I will try..

If you can teach me the typo error and design faults, it will be great..

I need to see the whole script!
Also, If you post your clock timer 1 block as an .aia file, I can edit that too. Copy Block to BackPack, create new file, paste from Backpack, save that file to your pc drive.

However, none of that will be necessary if you can get Do It to work and spot the faults in the data stream yourself.

This question is unrelated to your Bluetooth question and should be a seperate Forum Topic.

Will it be Okay to post whole .aia file of the project?? I am not familiar with backpack yet.. Thanks..eBike_1v03.aia (56.4 KB)

Got it. I understand..

...........Any luck?

Not yet. Please download my project .aia and review/comment. As I am a novice, I don't have the analysis capability.. This is my first trial and there should be many mistakes even though I was able to get up to 6 variables. The problem, List index too large happens with 7th variables.

Hi

I need the Script too - can't fix comms with only one end of the string :upside_down_face:

What do you mean by script?? Is it Arduino code?? Re the app, I sent project .aia..

BT_1V3_ino.txt (4.9 KB)

...Taking a dinner break, get back to you later this evening (UK time)

What do you get if you disable Labels (2, 5, 8 ... 17) and put a
Label2.Text = input