Comments (3)
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.
-
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 -
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.
-
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.
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.
@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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pmw3360.