From c207d43ae5010403e9202f9df50441b798961c42 Mon Sep 17 00:00:00 2001 From: Ricardo Lima Caratti Date: Wed, 11 Sep 2024 22:24:17 -0300 Subject: [PATCH] Doc --- .../NANO_PRO_MINI_3_BUTTONS_LCD16x2.ino | 4 ++-- .../NANO_PRO_MINI_3_BUTTONS_LCD20x4.ino | 2 ++ .../PRO_MINI_3_BUTTONS_LCD16x2_RTC.ino | 2 ++ .../PRO_MINI_ENCODER_LCD20x4/PRO_MINI_ENCODER_LCD20x4.ino | 7 ++++--- .../STANDALONE_ATMEGA328_ENCODER_V1.ino | 2 ++ .../STANDALONE_ATMEGA328_ENCODER_V2.ino | 2 ++ .../03_ESP32/ESP32_ENCODER/ESP32_ENCODER.ino | 4 +++- .../04_LGT8F328_3V_ENCODER_RTC.ino | 3 ++- library.properties | 2 +- 9 files changed, 20 insertions(+), 8 deletions(-) diff --git a/examples/03_TX_LCD_16x2_AND_20x4/01_ARDUINO/NANO_PRO_MINI_3_BUTTONS_LCD16x2/NANO_PRO_MINI_3_BUTTONS_LCD16x2.ino b/examples/03_TX_LCD_16x2_AND_20x4/01_ARDUINO/NANO_PRO_MINI_3_BUTTONS_LCD16x2/NANO_PRO_MINI_3_BUTTONS_LCD16x2.ino index 3abf329..e73e775 100644 --- a/examples/03_TX_LCD_16x2_AND_20x4/01_ARDUINO/NANO_PRO_MINI_3_BUTTONS_LCD16x2/NANO_PRO_MINI_3_BUTTONS_LCD16x2.ino +++ b/examples/03_TX_LCD_16x2_AND_20x4/01_ARDUINO/NANO_PRO_MINI_3_BUTTONS_LCD16x2/NANO_PRO_MINI_3_BUTTONS_LCD16x2.ino @@ -492,6 +492,7 @@ void readAllTransmitterInformation() { // Enable or disable PWM duty cycle void enablePWM(uint8_t value) { + pinMode(PWM_PA, OUTPUT); if ( value == 0) { analogWrite(PWM_PA, value); return; @@ -503,9 +504,7 @@ void enablePWM(uint8_t value) { } // Switches the the current frequency to a new frequency void switchTxFrequency(uint16_t freq) { - // enablePWM(0); // PWM duty cycle disabled tx.setTX(txFrequency = freq); - // enablePWM(pwmPowerDuty); // PWM duty cycle anable showFrequency(); } // Shows the first message after turn the transmitter on @@ -662,6 +661,7 @@ void doPower() { else pwmPowerDuty = 255; } + pinMode(PWM_PA, OUTPUT); analogWrite(PWM_PA, pwmPowerDuty); showPower(); key = browseParameter(); diff --git a/examples/03_TX_LCD_16x2_AND_20x4/01_ARDUINO/NANO_PRO_MINI_3_BUTTONS_LCD20x4/NANO_PRO_MINI_3_BUTTONS_LCD20x4.ino b/examples/03_TX_LCD_16x2_AND_20x4/01_ARDUINO/NANO_PRO_MINI_3_BUTTONS_LCD20x4/NANO_PRO_MINI_3_BUTTONS_LCD20x4.ino index 4ee29d9..edc513a 100644 --- a/examples/03_TX_LCD_16x2_AND_20x4/01_ARDUINO/NANO_PRO_MINI_3_BUTTONS_LCD20x4/NANO_PRO_MINI_3_BUTTONS_LCD20x4.ino +++ b/examples/03_TX_LCD_16x2_AND_20x4/01_ARDUINO/NANO_PRO_MINI_3_BUTTONS_LCD20x4/NANO_PRO_MINI_3_BUTTONS_LCD20x4.ino @@ -476,6 +476,7 @@ void readAllTransmitterInformation() { // Enable or disable PWM duty cycle void enablePWM(uint8_t value) { + pinMode(PWM_PA, OUTPUT); if (value == 0) { analogWrite(PWM_PA, value); return; @@ -645,6 +646,7 @@ void doPower() { else pwmPowerDuty = 255; } + pinMode(PWM_PA, OUTPUT); analogWrite(PWM_PA, pwmPowerDuty); showPower(); key = browseParameter(); diff --git a/examples/03_TX_LCD_16x2_AND_20x4/01_ARDUINO/PRO_MINI_3_BUTTONS_LCD16x2_RTC/PRO_MINI_3_BUTTONS_LCD16x2_RTC.ino b/examples/03_TX_LCD_16x2_AND_20x4/01_ARDUINO/PRO_MINI_3_BUTTONS_LCD16x2_RTC/PRO_MINI_3_BUTTONS_LCD16x2_RTC.ino index d7c17bc..ab5d7d5 100644 --- a/examples/03_TX_LCD_16x2_AND_20x4/01_ARDUINO/PRO_MINI_3_BUTTONS_LCD16x2_RTC/PRO_MINI_3_BUTTONS_LCD16x2_RTC.ino +++ b/examples/03_TX_LCD_16x2_AND_20x4/01_ARDUINO/PRO_MINI_3_BUTTONS_LCD16x2_RTC/PRO_MINI_3_BUTTONS_LCD16x2_RTC.ino @@ -510,6 +510,7 @@ void readAllTransmitterInformation() { // Enable or disable PWM duty cycle void enablePWM(uint8_t value) { + pinMode(PWM_PA, OUTPUT); if ( value == 0) { analogWrite(PWM_PA, value); return; @@ -684,6 +685,7 @@ void doPower() { else pwmPowerDuty = 255; } + pinMode(PWM_PA, OUTPUT); analogWrite(PWM_PA, pwmPowerDuty); showPower(); key = browseParameter(); diff --git a/examples/03_TX_LCD_16x2_AND_20x4/01_ARDUINO/PRO_MINI_ENCODER_LCD20x4/PRO_MINI_ENCODER_LCD20x4.ino b/examples/03_TX_LCD_16x2_AND_20x4/01_ARDUINO/PRO_MINI_ENCODER_LCD20x4/PRO_MINI_ENCODER_LCD20x4.ino index 25fc44c..1811f33 100644 --- a/examples/03_TX_LCD_16x2_AND_20x4/01_ARDUINO/PRO_MINI_ENCODER_LCD20x4/PRO_MINI_ENCODER_LCD20x4.ino +++ b/examples/03_TX_LCD_16x2_AND_20x4/01_ARDUINO/PRO_MINI_ENCODER_LCD20x4/PRO_MINI_ENCODER_LCD20x4.ino @@ -107,7 +107,7 @@ #define LCD_E 13 // Enconder PINs -#define BT_MENU 14 +#define BT_MENU 8 #define PWM_PA 9 @@ -472,6 +472,7 @@ void readAllTransmitterInformation() { // Enable or disable PWM duty cycle void enablePWM(uint8_t value) { + pinMode(PWM_PA, OUTPUT); if (value == 0) { analogWrite(PWM_PA, value); return; @@ -484,9 +485,7 @@ void enablePWM(uint8_t value) { // Switches the the current frequency to a new frequency void switchTxFrequency(uint16_t freq) { - // enablePWM(0); // PWM duty cycle disabled tx.setTX(txFrequency = freq); - // enablePWM(pwmPowerDuty); // PWM duty cycle anable showFrequency(); } @@ -640,6 +639,7 @@ void doPower() { else pwmPowerDuty = 255; } + pinMode(PWM_PA, OUTPUT); analogWrite(PWM_PA, pwmPowerDuty); showPower(); key = browseParameter(); @@ -685,6 +685,7 @@ void runAction(void (*actionFunc)(uint8_t), KeyValue *tab, uint8_t step, uint8_t // Processes the current menu option selected uint8_t doMenu(uint8_t idxMenu) { delay(PUSH_MIN_DELAY); + enablePWM(0); switch (idxMenu) { case KEY_FREQUENCY: enablePWM(0); // The PWM seems to interfere with the communication with the QN8066. diff --git a/examples/03_TX_LCD_16x2_AND_20x4/02_ATMEGA328/STANDALONE_ATMEGA328_ENCODER_V1/STANDALONE_ATMEGA328_ENCODER_V1.ino b/examples/03_TX_LCD_16x2_AND_20x4/02_ATMEGA328/STANDALONE_ATMEGA328_ENCODER_V1/STANDALONE_ATMEGA328_ENCODER_V1.ino index e49c5a4..b1ca5ca 100644 --- a/examples/03_TX_LCD_16x2_AND_20x4/02_ATMEGA328/STANDALONE_ATMEGA328_ENCODER_V1/STANDALONE_ATMEGA328_ENCODER_V1.ino +++ b/examples/03_TX_LCD_16x2_AND_20x4/02_ATMEGA328/STANDALONE_ATMEGA328_ENCODER_V1/STANDALONE_ATMEGA328_ENCODER_V1.ino @@ -448,6 +448,7 @@ void readAllTransmitterInformation() { // Enable or disable PWM duty cycle void enablePWM(uint8_t value) { + pinMode(PWM_PA, OUTPUT); delay(100); analogWrite(PWM_PA, value); // Turn PA off delay(100); @@ -607,6 +608,7 @@ void doPower() { else pwmPowerDuty = 255; } + pinMode(PWM_PA, OUTPUT); analogWrite(PWM_PA, pwmPowerDuty); showPower(); key = browseParameter(); diff --git a/examples/03_TX_LCD_16x2_AND_20x4/02_ATMEGA328/STANDALONE_ATMEGA328_ENCODER_V2/STANDALONE_ATMEGA328_ENCODER_V2.ino b/examples/03_TX_LCD_16x2_AND_20x4/02_ATMEGA328/STANDALONE_ATMEGA328_ENCODER_V2/STANDALONE_ATMEGA328_ENCODER_V2.ino index 065e1b5..3952e63 100644 --- a/examples/03_TX_LCD_16x2_AND_20x4/02_ATMEGA328/STANDALONE_ATMEGA328_ENCODER_V2/STANDALONE_ATMEGA328_ENCODER_V2.ino +++ b/examples/03_TX_LCD_16x2_AND_20x4/02_ATMEGA328/STANDALONE_ATMEGA328_ENCODER_V2/STANDALONE_ATMEGA328_ENCODER_V2.ino @@ -491,6 +491,7 @@ void readAllTransmitterInformation() { // Enable or disable PWM duty cycle void enablePWM(uint8_t value) { + pinMode(PWM_PA, OUTPUT); delay(100); analogWrite(PWM_PA, value); // Turn PA off delay(100); @@ -650,6 +651,7 @@ void doPower() { else pwmPowerDuty = 255; } + pinMode(PWM_PA, OUTPUT); analogWrite(PWM_PA, pwmPowerDuty); showPower(); key = browseParameter(); diff --git a/examples/03_TX_LCD_16x2_AND_20x4/03_ESP32/ESP32_ENCODER/ESP32_ENCODER.ino b/examples/03_TX_LCD_16x2_AND_20x4/03_ESP32/ESP32_ENCODER/ESP32_ENCODER.ino index b44710e..d021ab6 100644 --- a/examples/03_TX_LCD_16x2_AND_20x4/03_ESP32/ESP32_ENCODER/ESP32_ENCODER.ino +++ b/examples/03_TX_LCD_16x2_AND_20x4/03_ESP32/ESP32_ENCODER/ESP32_ENCODER.ino @@ -28,6 +28,8 @@ | | A | GPIO13 | | | B | GPIO14 | | | PUSH BUTTON (encoder) | GPIO27 | + | PWM | | | + | | | GPIO12 | | Prototype documentation: https://pu2clr.github.io/QN8066/ @@ -58,7 +60,7 @@ #define ENCODER_PIN_B 14 #define BT_MENU 27 -#define PWM_PA 26 +#define PWM_PA 12 #define EEPROM_SIZE 512 diff --git a/examples/03_TX_LCD_16x2_AND_20x4/04_LGT8F328_3V_ENCODER_RTC/04_LGT8F328_3V_ENCODER_RTC.ino b/examples/03_TX_LCD_16x2_AND_20x4/04_LGT8F328_3V_ENCODER_RTC/04_LGT8F328_3V_ENCODER_RTC.ino index 82a3d57..32acee4 100644 --- a/examples/03_TX_LCD_16x2_AND_20x4/04_LGT8F328_3V_ENCODER_RTC/04_LGT8F328_3V_ENCODER_RTC.ino +++ b/examples/03_TX_LCD_16x2_AND_20x4/04_LGT8F328_3V_ENCODER_RTC/04_LGT8F328_3V_ENCODER_RTC.ino @@ -528,6 +528,7 @@ void readAllTransmitterInformation() { // Enable or disable PWM duty cycle void enablePWM(uint8_t value) { + pinMode(PWM_PA, OUTPUT); delay(100); analogWrite(PWM_PA, value); // Turn PA off delay(100); @@ -693,7 +694,7 @@ void doPower() { else pwmPowerDuty = 255; } - analogWrite(PWM_PA, pwmPowerDuty); + enablePWM(pwmPowerDuty); showPower(); key = browseParameter(); } diff --git a/library.properties b/library.properties index 674d0b2..60fb0bb 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=QN8066 -version=1.3.2 +version=1.3.3 author=Ricardo Lima Caratti, pu2clr@gmail.com maintainer=Ricardo Lima Caratti sentence=Control your TX/RX QN8066 device