I am facing an issue where the Arduino 4 UNO WiFi is not able to detect the I2C based PIR device on the QWIIC connector
I have used the pre existing programs from the Sparkfun Qwiic library present at https://github.com/sparkfun/SparkFun_Qw … r/examples , but these seem to be for the I2C bus on the pins 18 and 19 of the Arduino and hence the Qwiic based I2C device is not detected with these programs.
Can you please tell me what modifications do i need to do with these programs so that i can use the I2C based PIR device connected on the QWIIC connector of Arduino UNO 4 Wifi?
I’m having the same problem with the PIR. The sensor works fine with the RedBoard. I found out that switching to Wire1 with the Qwiic connected RTC was all that was needed. When you say "point it to the correct pin #s " what specifically do you do? There is no statement setting pin numbers in the sketch.
Unfortunately it does not work with Wire either by using the external SDA SCL pins either. I will wait for SparkFun to update that library. Let me know when that happens. Thanks
jmp7:
Unfortunately it does not work with Wire either by using the external SDA SCL pins either. I will wait for SparkFun to update that library. Let me know when that happens. Thanks
Is the Quad Relay 5v tolerant on the I2C bus?
The UNO R4 WiFi is 5V on the pins and they have only level shifted the QWIIC connector to 3.3V.
I don’t have one of the Quad Relays to test, but this might work after looking at the example code…
Thank you for your thoughts. Your suggestion did not work. Tried Wire and Wire1, switching from the pins to the connector. Still nothing. Program executes the code but no output.
Tried “&” but got a compiling error. Relay still works fine using the UNO R3, but not the Arduino 4.
//I got the SparkFun Quad Relay COM-16566 to work on the Arduino 4 WIFI by following the Arduino 4 Cheat Sheet whereas:
#include <Wire.h>
void setup()
{Wire1.begin();}
void loop()
{ Wire1.beginTransmission(109) ; //109 being the device address or 0x6D
Wire1.write(byte(0x01)); //Where 0x01 is the first relay, 0x02 the second relay and so on. Each write statement toggles relay on or off. 0x0A all off. 0x0B all on.