Code Monkey home page Code Monkey logo

Comments (3)

SunjunKim avatar SunjunKim commented on June 3, 2024

Hello, I am trying to use this library on a ESP32.
I changed in the library the file "PWM3360.cpp" and remplaced SPI.begin() by SPI.begin(18, 19, 23, ss_pin) ; because MISO, MOSI and SCK pins aren't the same.

I have only tried this on ATMega32U4-based 8-bit boards.
However, it's just SPI communications, so it must be compatible... in theory.

Even though I absolutely have no experience with ESP32, I may suspect some culprits, from the most suspicious to the least suspicious.

  1. It seems like ESP32 needs some more code snippet to work with SPI. For example, try check the answers to the following:
    https://stackoverflow.com/questions/66722386/how-to-use-spi-with-esp32-and-arduino
    https://forum.arduino.cc/t/esp32-spi-comunication-on-sd-module/598345

  2. If you're using the PMW3360 module from here, and if your module is the latest one v1.4, probably there're small jumper pads (SJ1 in here which pull-up the MISO pin. Try with the jumper connected.

  3. Have you tried any different SPI speeds?
    #define SPI_BEGIN SPI.beginTransaction(SPISettings(8000000, MSBFIRST, SPI_MODE3))

  • Note: basic_polling is an even simpler one. I recommend starting with this, just in case (although your problem seems irrelevant from this).

from pmw3360.

A-Schmid avatar A-Schmid commented on June 3, 2024

We use the PMW3360 with an M5Stack (which is ESP32 based) in this project and it works like a charm.

The SPI settings we use are SPI.beginTransaction(SPISettings(2000000, MSBFIRST, SPI_MODE3)) (have not tested it with 8000000 yet).

from pmw3360.

mbalestrini avatar mbalestrini commented on June 3, 2024

@SunjunKim the PMW3360 datasheet recommends a maximum Serial Port Clock Frequency of 2MHz. Is there a reason you choose 8 MHz?

from pmw3360.

Related Issues (5)

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.