-
Notifications
You must be signed in to change notification settings - Fork 3
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
Max30102 hangs on esp32 Devkit C #3
Comments
Hi, I have an example program which I wrote a while ago and I know that works with this exact chip here. I see there that before going into heart-rate mode, a reset is performed and after that it does a small delay to let the chip come back up after the reset. See here max30102.reset().unwrap();
delay.delay_ms(100_u8); Could you try to do that? Also, have you checked that it actually blocks (i.e. infinite loop) or does the |
Hello, Thanks for you answer. Unfortunately I cannot access the first link you sent... Executing this code... let mut sensor = Max3010x::new_max30102(i2c_addr);
println!("Initialization passed");
sensor.reset().unwrap();
println!("Reset passed");
FreeRtos::delay_ms(1000);
println!("Reset delay passed"); ...hangs after printing I am starting to beleive my sensor may be dead but I do not see any damage on the board (no burnt component). |
Sorry, I fixed the link now. It is a program I know works with an STM32F103 (bluepill board) here again. That should work out-of-the-box if you have that board. It certainly worked for me at the time. It may be that your sensor is not responding correctly. I guess if the MPU6050 works you have the correct pull-up resistors on the bus (e.g. 4.7k, more info here) but you may want to check on that. The next step would be hooking up a logic analyzer or an oscilloscope and see if the right signals are being sent and if the device acknowledges them. See here for some info on that. |
Hello, I do not have the devices you listed yet and I (unfortunately) basically have zero knowledge in electronics. I will still try to resolve my issues by trying other things on the software side and if I cannot make it run, I may just buy the logic analyzer to find ou what's happening... |
Hello,
Very small disclaimer before anything else, Iam new to embedded Rust and quite a novice at Rust all together.
I would like to use the max30102 on my esp32 alongside an mpu6050. I managed to make the mpu work but when I tried adding the max30102, the compiler gently reminded me that I could not use the same I2C for both sensor as it is moved to the first one called.
I found out I could tried the shared-bus crate that does excatly what I want. However, impossible to even get the sensor leds on. The code stays stuck. To be more precise, it blocks at
let mut sensor = sensor.into_heart_rate().unwrap();
. I also have the issue when I do not use theshared_bus
crate and directly pass iti2c_addr
. The sensor does not appear to be damaged and was working a while ago with my micro-python code. Before goig through the hasle of reinstalling micropython and my old code on it, I would have like to check with you if it was a known issue.Here is the whole code
Here is a the code without the
shared_bus
nor mpu6050 that yields the same result...Thank you in advance for your time and help :)
The text was updated successfully, but these errors were encountered: