Arduino as QWIIC Sensor

Hi,

is there an option to use a Arduino set as Sensor via Qwiic? I would measure a Poti via Arduino an send it to the Openlog Artemis.

I tried to use 0X48 which is ADS1015 and Fake the Sensordata but i didnt get a connection.

Thanks.

Greetz

Franz

Hi Franz,

The OpenLog Artemis can log analog voltages. Does this meet your needs?

Please see:

https://learn.sparkfun.com/tutorials/op … 205%20from

Best wishes,

Paul

Hi,

thanks for your reply.

I use already all 4 Analog inputs. I have a rpm meter on an arduino and want to log this in the data log.

I thought to fake a sensor an then save this value in the log, but I m not possible to do this.

Hi Franz,

OK. I understand.

Using an Arduino board to replicate a Qwiic (I2C) sensor is possible, but not easy. The code would need to replicate all of the commands and/or register reads and writes. Enough to fool the OpenLog Artemis firmware and the underlying sensor library into thinking that the sensor is attached, so it will request and log the data. Possible, but not easy.

Best wishes,

Paul

Hey thanks for your response. What would you think is the best sensor to do this? :wink:

Greetz Franz

The ADS1015 breakout is less than $12.00, any reason why you couldn’t just use that? That’s cheaper (and a lot easier) than programming another arduino to do the same job.

How can a make an rpm meter with a ADS1015?

Hi Franz,

The SparkFun Qwiic Button might be a good place to start. The OLA firmware supports the Qwiic Button for event marking or configuration logging. The product page and hook-up guide were missing that information - I have just added it now. The Qwiic Button has a ATTINY84 processor on it and is configured as an I2C peripheral. All of the code you need to emulate an I2C device / sensor is already in the Qwiic Button firmware. You would need to modify the Qwiic Button firmware so that instead of recording the button press or click timing information, it reports your RPM value instead. The button switch is connected to GPIO8 and is interrupt-capable, perfect for RPM measurement. We sell the Qwiic Button without the button:

https://www.sparkfun.com/products/15931

This will not be an easy project. You will need to learn how the Qwiic Button firmware works, modify it to replace the button click or press timing with your RPM value based on interrupt timings, reprogram the ATTINY with your modified firmware. Only after you have done all of that will the OpenLog Artemis be able to log the RPM values as if they were button press timings. I say again, this will not be an easy project, but it could be a good starting point for you.

I hope this helps,

Paul

Hey Paul,

thanks for your support. That’s a good advise. A already programmed a attiny. The project has time, but I will report if I make progress.

Greetz

Franz