Custom Board Code on LyraT #13
-
Please let me know if audiotools-custom-max.ino sketch could be mimicked to work with LyraT |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 21 replies
-
Sure, this is very flexible, just adjust the pin definitions. By the way the following Lyrat boards are already predefined
e.g.PinsLyrat42Class is class PinsLyrat42Class : public DriverPins {
public:
PinsLyrat42Class() {
// sd pins
addSPI(ESP32PinsSD);
// add i2c codec pins: scl, sda, port, frequency
addI2C(PinFunction::CODEC, 23, 18);
// add i2s pins: mclk, bck, ws,data_out, data_in ,(port)
addI2S(PinFunction::CODEC, 0, 5, 25, 26, 35);
// add other pins
addPin(PinFunction::KEY, 36, PinLogic::InputActiveLow, 1);
addPin(PinFunction::KEY, 39, PinLogic::InputActiveLow, 2);
addPin(PinFunction::KEY, 33, PinLogic::InputActiveLow, 3);
addPin(PinFunction::KEY, 32, PinLogic::InputActiveLow, 4);
addPin(PinFunction::KEY, 13, PinLogic::InputActiveLow, 5);
addPin(PinFunction::KEY, 27, PinLogic::InputActiveLow, 6);
addPin(PinFunction::AUXIN_DETECT, 12, PinLogic::InputActiveLow);
addPin(PinFunction::PA, 21, PinLogic::Output);
addPin(PinFunction::LED, 22, PinLogic::Output, 1);
addPin(PinFunction::LED, 19, PinLogic::Output, 2);
}
}; |
Beta Was this translation helpful? Give feedback.
-
You mean define my own AudioKit with the necessary pins? |
Beta Was this translation helpful? Give feedback.
That was an interesting one!
I changed to pass the pins by reference and now my proposed sketch from above is working.
Just update this library...
16:31:11.038 -> Setup starting...
16:31:11.038 -> I2C pin ...
16:31:11.038 -> I2S pin ...
16:31:11.038 -> I2S begin ...
16:31:11.038 -> Debug: AudioBoard::pins::begin
16:31:11.038 -> Debug: DriverPins::begin
16:31:11.046 -> Debug: DriverPins::begin::setupPinMode
16:31:11.046 -> Debug: DriverPins::begin::SPI
16:31:11.046 -> Debug: DriverPins::begin::I2C
16:31:11.046 -> Debug: DriverPins::begin::I2C port:32
16:31:11.046 -> Debug: PinsI2C::begin for 7
16:31:11.046 -> Info: setting up I2C scl: 32, sda: 33
16:31:11.047 -> Info: Setting i2c clock: 10…