-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP32 Gives problem with SD Card #2
Comments
Hi Rajesh, Can you please help me with running only OPC with ESP32? I am getting all values 0 except temperature which also is wrong. Below is the code: #include <OPCN3.h> // create new instance (specify SS pin in constructor) void setup() { Serial.begin(9600); // turn on laser, fan and set high gain } void loop() { delay(10000); // Get Temperature // Get Relative Humidity // Get PM values Serial.print("PM 2.5: "); Serial.print("PM 10: "); } Below is the output on serial monitor in Arduino IDE: |
I had similar problem. I did not use it with ESP32. OPC is not using standard SPI. It needs dedicated data pin.
On Monday, September 4, 2023 at 04:03:51 PM GMT+5:30, Yash Dahima ***@***.***> wrote:
Hi Rajesh,
Can you please help me with running only OPC with ESP32? I am getting all values 0 except temperature which also is wrong. Below is the code:
#include <OPCN3.h>
// create new instance (specify SS pin in constructor)
OPCN3 myOPCN3(15);
void setup() {
Serial.begin(9600);
// turn on laser, fan and set high gain
myOPCN3.initialize();
delay(1000);
}
void loop() {
delay(10000);
HistogramData hist = myOPCN3.readHistogramData();
// Get Temperature
Serial.print("Temperature: ");
Serial.println(hist.getTempC());
// Get Relative Humidity
Serial.print("RH (%): ");
Serial.println(hist.getHumidity());
// Get PM values
Serial.print("PM 1: ");
Serial.println(hist.pm1);
Serial.print("PM 2.5: ");
Serial.println(hist.pm2_5);
Serial.print("PM 10: ");
Serial.println(hist.pm10);
}
Below is the output on serial monitor in Arduino IDE:
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Thanks Rajesh for prompt response :) I'm new to this, so some more explanation will really help. Can you please explain more on "It needs dedicated data pin" and what you mean by standard SPI? |
I tried to use OPC with ESP32 about 2-3 years back. I found when used with SD Card, it was failing. I am not able to recollect the details right now. Finally I used an 8 bit controller to read OPC and it communicated with ESP32 over serial.
On Monday, September 4, 2023 at 08:50:22 PM GMT+5:30, Yash Dahima ***@***.***> wrote:
Thanks Rajesh for prompt response :)
I'm new to this, so some more explanation will really help. Can you please explain more on "It needs dedicated data pin" and what you mean by standard SPI?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Thank you so much Rajesh for clarification! All The Best! |
Hi,
I am using this library along with SD Card interfaced to ESP32.
Individually both of them work fine. But as soon as they are connected together, both start to malfunction.
I have used different pins for SS.
Thanks..
The text was updated successfully, but these errors were encountered: