boscha Geschrieben January 9, 2013 at 16:37 Geschrieben January 9, 2013 at 16:37 First of all, hello everybody! I am new to this board and hope my question hasn't been asked a hundred times already (I did search). I have a problem with a newly arrived IMU brick. Simply: Brickv shows the data, but if I try to use the C example, I don't get any data. More specifically, after turning on the return codes (imu_set_response_expected_all), I seem to know that I get timeouts. Any ideas what could be wrong? (I already flashed a new firmware, etc.) Bests Boris Code: // Enable debugging, i.e. turn on return codes imu_set_response_expected_all(&imu, true); // Set period for quaternion callback to 1s ret = imu_set_quaternion_period(&imu, 10); if (ret != E_OK) { fprintf(stderr,"Error: imu_set_quaternion_period (%d)\n",ret); exit(ret); } Returns: Error: imu_set_quaternion_period (-1) Zitieren
batti Geschrieben January 9, 2013 at 16:59 Geschrieben January 9, 2013 at 16:59 hi boscha, do you have connected to the right UID? Do you can post the full source code? Cheers, Bastian Zitieren
photron Geschrieben January 9, 2013 at 17:17 Geschrieben January 9, 2013 at 17:17 imu_set_response_expected_all is new in protocol v2, so you're using the C bindings for protocol v2 here. Did you do this on purpose, or accidently by getting the latest code from git? You need to use brickd, brickv, firmwares and bindings in either for protocol v1 or v2, you cannot mix them. Currently v2 is still in beta. If you got the C bindings in v2 by accident then just get the latest v1 version from here: http://www.tinkerforge.com/doc/Downloads.html If you decided to use v2 on purpose then ensure that brickd, brickv and the firmware flashed on the IMU Brick is v2. If that's already the case then you might be using the wrong UID, ensure that you use the UID shown for the IMU Brick in brickv. Zitieren
boscha Geschrieben January 9, 2013 at 18:07 Autor Geschrieben January 9, 2013 at 18:07 Ah, thanks. I thought about trying the 2.0 beta, but I didn't expect it to be the master of the regular trunk (I used the GIT code in combination with the .deb of brickd). I have looked for version information in the code and only found the API version information in imu_create, which was set to 1.0.1 (afterwards I was just assuming that it would be related to the version of brickd/brickv). Same version information is also in the "old" code that you pointed me to, maybe it would be nice to have some kind of "general" version match/check/information. Thanks for the fast help, now it works like a charm, Boris Zitieren
photron Geschrieben January 9, 2013 at 18:33 Geschrieben January 9, 2013 at 18:33 The 1.0.1 is the API version of the IMU Brick. We have plenty of version numbers: the API version, the bindings version, the firmware version, etc We should raise the API version to v2 too, thanks for reporting this. You can still use git to get the bindings for protocol v1 you just need to switch to the v1.x.y branch using 'git checkout v1.x.y'. Zitieren
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.