Trouble with reading bluetooth bytes

I haven't gotten to test it and hook it up to batteries yet, that'll be till the later stages of the project. Is why I'm having the battery value at a static 100 for the time being.

That's fine. The LED_Blink procedure (a) doesn't work and (b) would it not be better to have the LED on constantly to indicate low battery?

Try this modified Sketch:
main2.txt (4.8 KB)

I think that fixed it, I gave it a few mins of runtime and none of the buffer overflow issue occurred.
What would you say was causing it from my own implementation now that we know it was being caused by something from the Arduino side?

Holy shite though, it's such a relief that it's finally working. Thank you man!

Hi Aj, that's good news, hope all goes well now for you.

Your Sketch was largely correct, but I noticed that the values were being coerced into integers unnecessarily and just let them stay as floats (which gives the App more to calculate alternative units with anyway).

An odd thing was that Arduino.h was effectively included twice.

Finally, changing the position of the output in the code such that it is uninterrupted and last in the loop.

Sometimes we see issues that might be assumed to be software but are actually hardware or hardware related. I mentioned Anti-Virus and the possibility of of a hairline fracture of the phone's board but I didn't mention a common issue - the Arduino getting too hot and damaging the BT module and possibly sensors too. When testing, it's a good idea to have a desktop fan over the Arduino. Once it's boxed, include a fan (PC fans are super cheap).

That's good to know. I'll know what to look out for for future projects when any similar issues arise.
Again, thank you for putting the time out of your day to help me with this. It's very appreciated, Chris.
Hope you're having a good day!

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