mirror of
https://github.com/sascha-hemi/Logitech-Z906.git
synced 2026-03-21 03:03:47 +01:00
Add files via upload
This commit is contained in:
@@ -1,46 +1,49 @@
|
||||
/*
|
||||
Zarpli - Tecnología Interactiva
|
||||
30042022 Alejandro Zárate
|
||||
https://github.com/zarpli/Logitech-Z906/
|
||||
https://github.com/zarpli/LOGItech-Z906/
|
||||
|
||||
DESCRIPTION
|
||||
====================
|
||||
|
||||
Simple example of the Logitech-Z906 library.
|
||||
Basic example of the LOGItech-Z906 library.
|
||||
*/
|
||||
|
||||
#include <Z906.h>
|
||||
|
||||
// Instantiate a Z906 object and Attach to Serial1
|
||||
Z906 AMP(Serial1);
|
||||
Z906 LOGI(Serial1);
|
||||
|
||||
void setup(){
|
||||
|
||||
Serial.begin(9600);
|
||||
while(!Serial);
|
||||
|
||||
while(AMP.command(VERSION) == 0)
|
||||
while(LOGI.cmd(VERSION) == 0)
|
||||
{
|
||||
Serial.println("Waiting Z906 Power-Up");
|
||||
delay(1000);
|
||||
}
|
||||
|
||||
Serial.println("Z906 Version : " + (String) AMP.command(VERSION));
|
||||
Serial.println("Z906 Version : " + (String) LOGI.request(VERSION));
|
||||
|
||||
// Power ON PWM Generator
|
||||
AMP.command(PWM_ON);
|
||||
LOGI.cmd(PWM_ON);
|
||||
|
||||
// Enable RCA 2.0 Input
|
||||
AMP.command(SET_INPUT_2);
|
||||
// Select RCA 2.0 Input
|
||||
LOGI.cmd(SELECT_INPUT_2);
|
||||
|
||||
// Disable Mute
|
||||
AMP.command(MUTE_OFF);
|
||||
LOGI.cmd(MUTE_OFF);
|
||||
|
||||
// Set Main Level to 15;
|
||||
LOGI.cmd(MAIN_LEVEL, 15);
|
||||
}
|
||||
|
||||
void loop(){
|
||||
|
||||
Serial.println("Current Main Gain : " + (String) AMP.request(MAIN_GAIN));
|
||||
Serial.println("Current Input : " + (String) AMP.request(CURRENT_INPUT));
|
||||
Serial.println("Temperature main sensor: " + (String) LOGI.main_sensor());
|
||||
|
||||
delay(1000);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user