Output to I2C
Closed this issue · 3 comments
Good Evening!
I have a question regarding the output to i2C devices by PeppyMeter:
I want to use a arduino and two neopixel strips as an VU-Meter (connected to the PeppyPlayer). The arduino has only one hardware I2C-address but I want do drive both strips on that one arduino for left and right channel.
How do I differ the two channels because the config section uses two different addresses for left and right:
[i2c.interface] port = 1 left.channel.address = 0x21 right.channel.address = 0x20 output.size = 10 update.period = 0.1
Is there a possibility to send a separator right before the VU-Value (l and r) and use the same address for both channels (as it is done with the Serial-Output version)?
Another Question:
Is the source code for the serial VU meter on the arduino side also available? I mean the basic framework (the arduino sketch) to receive the data from the RasberryPi via serial on the arduino mini? This is the project by Tobias (nixiepeppyATgmail.com.).
Hi reparator,
The current I2C code doesn't support what you need. But you can change that code according to your needs:
https://github.com/project-owner/PeppyMeter/blob/master/i2cinterface.py
You can create your own "communication protocol" with Arduino and introduce either separator or use fixed data size, for example assume that first comes left channel then right channel.
I'll ask Tobias to comment here about his code.
Best regards
Hi reparator,
it is always nice to see what other people are creating. It's been I while I built my NixiePeppy. The first one, with the clock, uses an Arduino to drive the clock and the VU-meter. I used the serial interface those days. I built a Nixie Clock before using the same code (without the VU-meter). Feel free to take a look and adapt it to your needs.
Kind regards
Tobias.
Thanks a lot to you both!
This helps very much. So first I will try the serial communication instead of the I2C. This seems to be easier to achive. Thanks for the code Tobias.
As soon as the project is successfully finished I will come up with a report.
Regards
Stefan