Arduino library for communicating with the NJW1119 audio tone control chip. It has two channels a & b and independet controls for treble, mid and bass. The data sheets can be found here (pdf).
Download the latest release over at the Releases page.
#include <NJW1119.h>
// The address wired into the muses chip (usually 0).
const uint_8 NJW_ADDRESS = 0;
const int CHIP_SELECT = 21;
NJW1119 njw(NJW_ADDRESS, CHIP_SELECT);
int currentTreble = 2;
int currentMid = -3;
int currentBass = 4;
void setup()
{
// Initialize muses (SPI, pin modes)...
njw.begin();
// need to be unmuted first
njw.mute(false);
// tonecontrol needs to be enabled
njw.setToneControl(true);
}
void loop()
{
// adjust treble, mid and bass for both channels a & b
// use two args in call to control a & b channel differently
njw.setTreble(currentTreble;
njw.setMid(currentMid);
njw.setBass(currentBass);
delay(10);
}
Please post any problems on the Issues page.
Please read over the LICENSE file included in the project.