I am using an Arduino Portenta H7, and an analog light sensor. I tested the sensor with the on-board ADC of the arduino (analogRead) and I can read the values (so the sensor works).
I also changed the pin constants in ads1262.h as follows:
const int ADS1262_DRDY_PIN = 21;
const int ADS1262_CS_PIN = 7;
const int ADS1262_START_PIN = 4;
const int ADS1262_PWDN_PIN = 20;
Finally, in ads1262.cpp I removed the deprecated SPI calls (setBitOrder, setDataMode, setClockDivider) and before every SPI.transfer() call, I added SPI.beginTransaction(SPISettings(1000000, MSBFIRST, SPI_MODE1)); and after each transfer I added SPI.endTransaction();
#
The only thing I'm getting is "ads1262 Initialised successfully...." and that's it. I wasn't able to get a single reading, no matter what arrangement I tried.
I changed the DDRY and PWDN pins to D3 and D2 accordingly and now I started getting readings.
There must be an issue with pins that can be used as analog, IDK.
Hello 👋,
I am using an Arduino Portenta H7, and an analog light sensor. I tested the sensor with the on-board ADC of the arduino (analogRead) and I can read the values (so the sensor works).
This is the sensor I'm using: https://wiki.dfrobot.com/DFRobot_Ambient_Light_Sensor_SKU_DFR0026
This is the pinout for the Portenta: https://content.arduino.cc/assets/Pinout-PortentaH7_latest.png
The connections I'm using are as follows:
I also changed the pin constants in ads1262.h as follows:
Finally, in ads1262.cpp I removed the deprecated SPI calls (setBitOrder, setDataMode, setClockDivider) and before every
SPI.transfer()
call, I addedSPI.beginTransaction(SPISettings(1000000, MSBFIRST, SPI_MODE1));
and after each transfer I addedSPI.endTransaction();
#
The only thing I'm getting is "ads1262 Initialised successfully...." and that's it. I wasn't able to get a single reading, no matter what arrangement I tried.
Please help!