Coder Social home page Coder Social logo

Comments (5)

richiehard avatar richiehard commented on August 18, 2024

hi there,

i think your code misses something at the beginning
you have no includes at the beginning
in fact, it's not working for me when i'm trying to upload
and it does not recognize &sercom2
please let me now

i forgot to say, the link at the beginning it's empty, no library anymore on GitHub

just to let you now, i'm trying to do the same with ESP32 and set pin 4 and 17, not even sure if sercom is the same but i cant0 find anything online
anyone can help ?

ric

ric

from adafruit_drv2605_library.

drak7 avatar drak7 commented on August 18, 2024

Thanks for pointing this out, it would make sense to have the option not to run wire.begin() from the library's init() method and rely on it being set up before, this would solve it for the M0/SAMD21 and also for ESP32.

The ESP32 doesn't use sercom, its begin() function can take 3 arguments: SDA, SCL, and frequency.

TwoWire myI2C = TwoWire(0);
myI2C.begin(14, 15, 400000);

This will run into the same problem as above, with begin() getting called twice. Adding an optional argument to the DRV2605 begin() method that will skip the _wire.begin() should fix it, so you could do this:

// M0
HapticWire.begin();
pinPeripheral(22, PIO_SERCOM);
pinPeripheral(38, PIO_SERCOM);
drv.begin(&HapticWire, false);

or

// ESP32
HapticWire.begin(14, 15, 0);
drv.begin(&HapticWire, false);

from adafruit_drv2605_library.

richiehard avatar richiehard commented on August 18, 2024

hi,

thanks for the replay?
so do you think someone is going to modify the library?
at the moment i just solved the problem driving the other device with different pins instead of the DRV.But i think the library has to be corrected

thanks a lot

from adafruit_drv2605_library.

drak7 avatar drak7 commented on August 18, 2024

This appears to be an issue with the ESP32 BSP itself. See PR #11

from adafruit_drv2605_library.

richiehard avatar richiehard commented on August 18, 2024

@drak7 red it, thanks, at the moment i had fix it just moving wire1 on the hardware pins 21 22 and wire on the new ones
it worked just cause the IMU library (on 21 22) was allowing to set the pins inside the call

thanks a lot

Richie

from adafruit_drv2605_library.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.