Forum >DFR0034 vs SEN0232
DFR0034 vs SEN0232

Hi Folks,
I started with the SEN0232 and it works great! I used the following code:
I'm using the same analog port for both units (one at a time) so I'm pretty sure I'm using the right pin.
I tried powering it with 3.3v out of an ESP32 or a 5v but still no luck.
Are there any other code examples ?
any way I can test it ?
I started with the SEN0232 and it works great! I used the following code:
Code: Select all
This module is a little bulky, so I picked up a DFR0034, I tried copying the sample code provided, but all I get is 0 back. If I jiggle the unit a bit it I still get nothing, but eventually it gived a value like 5000+static float getNoiseLevel() { float voltageValue,dbValue; voltageValue = analogRead(SOUND_SENSOR_PIN) / 1024.0 * VREF; dbValue = voltageValue * 15.0; return dbValue; }
I'm using the same analog port for both units (one at a time) so I'm pretty sure I'm using the right pin.
I tried powering it with 3.3v out of an ESP32 or a 5v but still no luck.
Are there any other code examples ?
any way I can test it ?