mirror of
https://github.com/sascha-hemi/Logitech-Z906.git
synced 2026-03-21 00:03:50 +01:00
50 lines
840 B
C++
50 lines
840 B
C++
/*
|
|
Zarpli - Tecnología Interactiva
|
|
30042022 Alejandro Zárate
|
|
https://github.com/zarpli/LOGItech-Z906/
|
|
|
|
DESCRIPTION
|
|
====================
|
|
|
|
Basic example of the LOGItech-Z906 library.
|
|
*/
|
|
|
|
#include <Z906.h>
|
|
|
|
// Instantiate a Z906 object and Attach to Serial1
|
|
Z906 LOGI(Serial1);
|
|
|
|
void setup(){
|
|
|
|
Serial.begin(9600);
|
|
while(!Serial);
|
|
|
|
while(LOGI.request(VERSION) == 0)
|
|
{
|
|
Serial.println("Waiting Z906 Power-Up");
|
|
delay(1000);
|
|
}
|
|
|
|
Serial.println("Z906 Version : " + (String) LOGI.request(VERSION));
|
|
|
|
// Power ON PWM Generator
|
|
LOGI.cmd(PWM_ON);
|
|
|
|
// Select RCA 2.0 Input
|
|
LOGI.cmd(SELECT_INPUT_2);
|
|
|
|
// Disable Mute
|
|
LOGI.cmd(MUTE_OFF);
|
|
|
|
// Set Main Level to 15;
|
|
LOGI.cmd(MAIN_LEVEL, 15);
|
|
}
|
|
|
|
void loop(){
|
|
|
|
Serial.println("Temperature main sensor: " + (String) LOGI.main_sensor());
|
|
|
|
delay(1000);
|
|
|
|
}
|