Simple I2C + Mozzi

717 views
Skip to first unread message

Clem Niem

unread,
May 28, 2014, 10:03:51 AM5/28/14
to mozzi...@googlegroups.com
Hello,

I want to implement an Arduino thats using the Mozzi Library to get Inputs via I2C from another Arduino (with a Touch-Sensor).
I tried to understand the example with the Accelerometer but cant get it working.

I only want to receive one byte as Input (state change of the Touch Sensor). Can someone help me to implement an Easy Example, thats maybe compatible with one of the Examples of the "Wire-Library" (slave_sender/master_writer).

I will further try to implement this and share my outcomes, if I manage to do it.

Thanks so far,
Clem




David Haitch

unread,
May 28, 2014, 10:53:21 AM5/28/14
to mozzi...@googlegroups.com
I got an I2C gyroscope cooperating with Mozzi by using the TwoWire_Read_ADXL345 example on the Mozzi examples page as a guide. The key is the state machine model following the acc_status variable.


--
You received this message because you are subscribed to the Google Groups "Mozzi-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mozzi-users...@googlegroups.com.
To post to this group, send email to mozzi...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/mozzi-users/7f66494f-9770-4f2d-a6bf-e5fb041d7cef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tim Barrass

unread,
May 28, 2014, 10:56:01 AM5/28/14
to mozzi...@googlegroups.com
Hi Clem,
don't know if this will be much help, but attached is a library I modified to work with the non blocking wire code in Mozzi, you might find a pattern between this and the example in the Mozzi download.  I don't have my head around it any more/at the moment, but it's mostly a mechanical process of breaking up the communication with your device into separate requests and receivers, which can be quite simple once you get the hang, but fiddly and boring as it needs to be tailored for each new device's library/function set.


Adafruit_INA219_nonblock.zip

Clem Niem

unread,
May 28, 2014, 1:30:49 PM5/28/14
to mozzi...@googlegroups.com
Thank you David and Tim,

Thanks to your help, I managed to do it. I will clean-up the code a little bit to match the exact Examples from the Arduino Standard-Wire-Library and will post them here as soon as they look nice :)

Greetings from Barcelona,
Clem

Charlie

unread,
Nov 21, 2014, 2:17:13 AM11/21/14
to mozzi...@googlegroups.com
Hi Clem,

Did you manage to post your code and if so could you kindly point me to it? I have a similar issue and being able to use some working code would be a great help given my poor programming skills.

Thanks

Charlie

Nicolò Merendino

unread,
Jul 15, 2019, 6:11:14 PM7/15/19
to Mozzi-users
Hello,
I'm trying to use a Gyroscope with Mozzi too, would you mind sharing the code for that?

Best

Nicolò

Il giorno mercoledì 28 maggio 2014 16:53:21 UTC+2, David Haitch ha scritto:
I got an I2C gyroscope cooperating with Mozzi by using the TwoWire_Read_ADXL345 example on the Mozzi examples page as a guide. The key is the state machine model following the acc_status variable.
On Wed, May 28, 2014 at 9:03 AM, Clem Niem <clemens...@gmail.com> wrote:
Hello,

I want to implement an Arduino thats using the Mozzi Library to get Inputs via I2C from another Arduino (with a Touch-Sensor).
I tried to understand the example with the Accelerometer but cant get it working.

I only want to receive one byte as Input (state change of the Touch Sensor). Can someone help me to implement an Easy Example, thats maybe compatible with one of the Examples of the "Wire-Library" (slave_sender/master_writer).

I will further try to implement this and share my outcomes, if I manage to do it.

Thanks so far,
Clem




--
You received this message because you are subscribed to the Google Groups "Mozzi-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mozzi...@googlegroups.com.

Andrew Brown

unread,
Jan 12, 2021, 8:06:19 PM1/12/21
to Mozzi-users
Hi All,
I've also come across this challenge with the MPU6050 motion sensor and have posted my solution to github.
Cheers, Andrew
Reply all
Reply to author
Forward
0 new messages