-
Notifications
You must be signed in to change notification settings - Fork 41
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
Cannot connect the sensor properly #54
Comments
I'm not sure which Arduino Micro board you are using, however some versions operate at 3.3V, so there could be a serial voltage compatibility issue. To be honest, I'm not that familiar with the Arduino Micro ... however, I think you can use Serial1 and the respective pins instead - have you tried this? |
If the operating voltage is 3V, then the serial port might also be using 3V. Try using the 3.3V to power the MHZ19 instead of the 5V. Serial1 is a pre-defined serial instance, you can pass it to the library just like you can pass the software serial instance. You'll have to read up on it as I don't know much about the Micro, however, try using the 3.3V to power the MHZ19 first. |
I tried using the 3V port, but unfortunately it wasn't successfull. After some research I found out about the same as you told me (to change to Serial1). As I'm new into microcontroller and in general C++ I need to make some research on Serial ports to understand the general idea. Thanks a lot for the hints! I'll keep you updated! |
No problem. The Serial1 type of definitions are not very self-explanatory and also inconsistent between MCU (as each has its own unique Arduino framework). Best of luck. |
I used an Arduino Micro and just used your example code and connected the sensor like this:
Unfortunately, I got this Error:
I changed the value of the rx_pin and tx_pin like this:
#define RX_PIN 10
#define TX_PIN 11
When I look at the Sensor, I can see the IR light turning on every 2 seconds or so. On the arduino, the tx light flashes on and of, but the rx light is permanentely of.
What can I do?
The text was updated successfully, but these errors were encountered: