Forum Rule: Always post complete source code & details to reproduce any issue!
Page 7 of 7 FirstFirst ... 5 6 7
Results 151 to 164 of 164

Thread: Sparkfun BNO080 - Teensy 3.6 >> 4.0

  1. #151
    Quote Originally Posted by KurtE View Post
    Sorry I have not been following as much right now...

    But the interrupt pin:
    Code:
    boolean BNO080::begin(uint8_t deviceAddress, TwoWire &wirePort, uint8_t intPin)
    {
    	_deviceAddress = deviceAddress; //If provided, store the I2C address from user
    	_i2cPort = &wirePort;			//Grab which port the user wants us to use
    	_int = intPin;					//Get the pin that the user wants to use for interrupts. By default, it's NULL and we'll not use it in dataAvailable() function.
    My guess is that they have not properly setup in this case in the SPI case the do set the pin to input pullup...
    pinMode(_int, INPUT_PULLUP);

    My guess is that is what should be in this case as well.

    However it should also test that pin is not 255:
    Code:
    	boolean begin(uint8_t deviceAddress = BNO080_DEFAULT_ADDRESS, TwoWire &wirePort = Wire, uint8_t intPin = 255); //By default use the default I2C addres, and use Wire port, and don't declare an INT pin
    My guess is it might be used in either SPI or I2C mode as a way for the device to signal to tell you it has data ready...

    But again I have not really read through their code enough to know if you can say please start to get me this data and let me know when it is ready and then api to get it now...

    Sorry not much help here.
    Hi. thanks!

    Do you meant that the int wire is needed and it has been removed in the reworked code and that that might be creating the freezing?

    I am getting it right ?

  2. #152
    Quote Originally Posted by mjs513 View Post
    Ok - ran the motionTracker sketch again and saw the same thing after 15mins of running - then i ran my test sketch and its still running after 15mins with no issue. Has to be something with that application. Since I don't have a similar setup to yours I can't really debug further. Only the developer and really do that one - maybe he has seen that issue before.

    One other thing - becareful with that shield you are using its designed for a 5v Arduino and the T4 is NOT 5v tolerate if for some reason the pot presents itself that way. The project does look interesting.

    EDIT: just as an aside probably would have used a T4.1 and used the USBHost connections to attach a PS4 But that would require rewriting a bunch of the code which right at this moment I can't play with maybe in a day or 2.
    The digipshield is connected to the teensy, from 3.3v of the teensy to the 5v of the digishield.

    Regarding the ps4, would u be bale to bypass the softare limitations of the ps4 that blocks any other usb peripheral different than theirs to work on their console?

    I am following the idea of the hardware hack , to avoid any software limitations imposed by steamvr (in case of vr use) or ps4/ps5 .

    I am looking as next step the injection in steamvr of this arduino based project. For now for vr , I hacked a knuckles controllerClick image for larger version. 

Name:	knuckles connections.jpg 
Views:	11 
Size:	99.3 KB 
ID:	21963

    I made the previous part of the project public on github

    https://github.com/marcob2178/Arduin...ame-Locomotion

    The code you have been working on right now is not posted yet there.

    Would love if you would become more and more interested in this and make the whole thing better.
    My goal was/is to make an arduio based locomotion multisystem to use on most of devices.

    I tested the previous code on:

    xbox/pc/ps4/oculus quest/custom vive tracker controller/custom xinput controller

  3. #153
    Quote Originally Posted by mjs513 View Post
    I agree @KurtE. Should be usable in both cases just never checked it out, that was one of the reasons I suggested adding pinMode(int pin, INPUT). But INPUT_PULLUP is probably better but in the modified sketch I removed the use of the int pin all together = unless its somewhere else in the code. So very tempted to rewrite the darn thing to use USBHost just to see what happens. Another distraction for after painting.
    I think the int was used in the code I sent you and it had a purpose. Not sure what purpose, but maybe that is the reason why we get the error now ?

  4. #154
    Just giving an update. We replaced the bno080 with the bno055 and mounted it on the 2nd bus and there is no freezing at all.

    Was faster this way than figuring out a solution for the bno080,

    Thank you so much!

  5. #155
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,902
    Sorry for the delay in responding but been busy with a few other projects.

    Was trying to figure out where the problem was but no luck. Probably best that you switch to the BNO055, as you said makes you life easier.

  6. #156
    Quote Originally Posted by mjs513 View Post
    Sorry for the delay in responding but been busy with a few other projects.

    Was trying to figure out where the problem was but no luck. Probably best that you switch to the BNO055, as you said makes you life easier.
    No worries! Thank you so much for what you have done. Thank you to you and who else replied here

  7. #157
    Hi @mjs513 , @PaulStoffregen , how are you? I have a question. It is not clear to me how the teensy handles the running of the code on boot.

    To use my code, I upload the sketch to the teensy and then I open the monitor window and the locomotion system starts calibrating and then works on the controller. So I manually start the calibration and the run of the coding.

    When I connect the teensy via usb to a usb power bank, the code and calibration does not start.

    The arduino was handling automatically the starting of the code and calibration.

    How can I have the teensy automatically starting the code and the calibration?

    Also how can I restart the code and calibration on the teensy if I have to?

    Thanks!

  8. #158
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,733
    Quote Originally Posted by marcob View Post
    ...

    To use my code, I upload the sketch to the teensy and then I open the monitor window and the locomotion system starts calibrating and then works on the controller. So I manually start the calibration and the run of the coding.

    When I connect the teensy via usb to a usb power bank, the code and calibration does not start.
    ...
    Not seeing current code? perhaps there is some type of "while(!Serial);" in setup - or the indicated "manually start the calibration" is holding things up waiting for user input.

    either way adding some variation of " ... && millis() < 5000 ) " with a wait time to allow manually starting or passing on timeout- where that would wait 5 seconds.

  9. #159
    Quote Originally Posted by defragster View Post
    Not seeing current code? perhaps there is some type of "while(!Serial);" in setup - or the indicated "manually start the calibration" is holding things up waiting for user input.

    either way adding some variation of " ... && millis() < 5000 ) " with a wait time to allow manually starting or passing on timeout- where that would wait 5 seconds.
    Hi. Thanks for the reply.
    This is the main file

    http://www.mediafire.com/file/2gt7av...Teensy.7z/file

    Could you please suggest what to revise?

    Thanks

  10. #160
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,733
    just dropping the INO in the post would be easier - than pulling the zip and working through it just to see the setup() code and what it does

  11. #161
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,733
    Quote Originally Posted by marcob View Post
    Hi. Thanks for the reply.
    This is the main file

    http://www.mediafire.com/file/2gt7av...Motion+_XXXXXX

    Could you please suggest what to revise?

    Thanks
    FYI - Got back to desktop - clicked download and my machine prevented download seeing the downloader as a 'PUP - potentially unwanted program'

  12. #162
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,733
    Found the download file it seemed clean - the PUP was prevented after download - doesn't seem that download site may be clean.

    So looking in the non IDE source tree this is the problem - see post above #158 fpr the suggested solution:
    Code:
    void setup()
    {
      Serial.begin(CUSTON_UART_SPEED);
      while (!Serial)
        ;
      Serial.println("Started!");

  13. #163
    Quote Originally Posted by defragster View Post
    Found the download file it seemed clean - the PUP was prevented after download - doesn't seem that download site may be clean.

    So looking in the non IDE source tree this is the problem - see post above #158 fpr the suggested solution:
    Code:
    void setup()
    {
      Serial.begin(CUSTON_UART_SPEED);
      while (!Serial)
        ;
      Serial.println("Started!");
    Thank you so much! Worked!

    This is a video of a test of the locomotion system using the teensy


  14. #164
    Click image for larger version. 

Name:	Schematic (16).jpg 
Views:	6 
Size:	186.8 KB 
ID:	22170

    I have a question about wireless connectivity and teensy.

    What teensy I could use to make the system wireless and based on this amount of nodes as in the attached picture ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •