pozyxLabs / Pozyx-Arduino-library

The Arduino library for use with the pozyx accurate indoor positioning system.
https://www.pozyx.io
MIT License
78 stars 53 forks source link

begin doesn't always work #34

Closed ivannunyadambiz closed 7 years ago

ivannunyadambiz commented 8 years ago

sometimes it just fails. i would add details, if i had any.

samuelvdv commented 8 years ago

Hello,

I would assume you can give some more details anyhow. What Arduino are you using and what do you mean with 'fails'? At what point does it fail?

Best regards, Samuel

ivannunyadambiz commented 8 years ago

if(Pozyx.begin(true) == POZYX_FAILURE)

it happens. randomly. it's a mega2560.

samuelvdv commented 8 years ago

Hi, I have tested it with the MEGA2560 and everything works fine here. So it cannot be a library issue.

ivannunyadambiz commented 8 years ago

we're talking about countless hours of automated testing of switching on power and setting up a network.

i'm afraid, your answer sounds to me as if you're relying on manual tests. what's your testbench setup and parameters?

cheers


Luke P. Dunwell Sent from my toaster

On Fri, Sep 2, 2016 at 10:43 AM, Samuel notifications@github.com wrote:

Hi, I have tested it with the MEGA2560 and everything works fine here. So it cannot be a library issue.

  • does it happen on all sketches? Also the example sketches included in the library?
  • Are the LED's blinking on the Pozyx device? (red one slowly and green Rx fast, The other leds should not be lit). Simply powering the device should make these LEDS blink
  • Is the jumper present on the pins BOOT0? If not, the pozyx device will not start
  • Is the firmware correctly updated?
  • In the Arduino IDE, have you selected 'Arduino Mega2560' as the target board (under tools)?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pozyxLabs/Pozyx-Arduino-library/issues/34#issuecomment-244318139, or mute the thread https://github.com/notifications/unsubscribe-auth/AFjWxLoGEukE6woPaFomAPgFQ8yXQ8JRks5ql-G1gaJpZM4Jt4n7 .

samuelvdv commented 8 years ago

Hello,

we have written numerous unit tests to test the functionality of the Pozyx device. Only a few have been released here (see the folder in the library), because other require a fixed setup with more control over the test environment. However, this is still a work in progress, and we don't claim it to be perfect: we are constantly working on improving this. Note that during production we also perform the selftest to see if each component on the board is working correctly.

The Arduino library is now divided in two parts, one that is platform dependent and another that is platform independent. The platform dependent test check if i2c communication and interrupts all work as expected. If this tests succeeds on a given Arduino platform, we can conclude that the Arduino platform is compatible with Pozyx. The platform independent tests are there to test the Pozyx functionalities. We do not test these on all different Arduino platforms as they are platform independent.

Considering this github issue, I have executed the platform dependent unit tests (which includes the begin() function) on the Arduino Mega with a Pozyx tag (firmware v1.0) to verify that the library is compatible with the Mega. This test was successful as you can see in the image below.

unit_test_core_mega2560

Because of this, I believe that the problem does not lie in software, but rather something else.