Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /********* Pleasedontcode.com **********
- Pleasedontcode thanks you for automatic code generation! Enjoy your code!
- - Terms and Conditions:
- You have a non-exclusive, revocable, worldwide, royalty-free license
- for personal and commercial use. Attribution is optional; modifications
- are allowed, but you're responsible for code maintenance. We're not
- liable for any loss or damage. For full terms,
- please visit pleasedontcode.com/termsandconditions.
- - Project: Audio Control
- - Source Code NOT compiled for: Arduino Uno
- - Source Code created on: 2024-12-08 10:39:36
- ********* Pleasedontcode.com **********/
- /****** SYSTEM REQUIREMENTS *****/
- /****** SYSTEM REQUIREMENT 1 *****/
- /* after power change gain to max volume of PT7314 */
- /****** END SYSTEM REQUIREMENTS *****/
- /* START CODE */
- /****** DEFINITION OF LIBRARIES *****/
- #include <Wire.h>
- #include <PT2314.h> //https://github.com/RobTillaart/PT2314
- /****** FUNCTION PROTOTYPES *****/
- void setup(void);
- void loop(void);
- /***** DEFINITION OF I2C PINS *****/
- const uint8_t audio_PT7314_I2C_PIN_SDA_A4 = A4;
- const uint8_t audio_PT7314_I2C_PIN_SCL_A5 = A5;
- const uint8_t audio_PT7314_I2C_SLAVE_ADDRESS = 68;
- /****** DEFINITION OF LIBRARIES CLASS INSTANCES*****/
- PT7314 audioProcessor(&Wire); // Create an instance of the PT7314 class
- void setup(void)
- {
- // Initialize I2C communication
- Wire.begin();
- // Begin the audio processor
- if (audioProcessor.begin()) {
- // Set gain to maximum volume
- audioProcessor.setGain(0); // Assuming 0 is max gain for PT7314
- }
- }
- void loop(void)
- {
- // put your main code here, to run repeatedly:
- }
- /* END CODE */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement