Xinyuan-LilyGO / TTGO_TWatch_Library

MIT License
874 stars 282 forks source link

Buzzer not working, crash and rebooting #139

Open ProfesseurIssou opened 2 years ago

ProfesseurIssou commented 2 years ago

Hello, I have a TTGO Twatch V1 and i want use the buzzer (ttgo->buzzer)

but when i call buzzer->begin() or buzzer->onec() my watch crash and reboot

I have this error on Serial

`Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled. Core 1 register dump: PC : 0x400d1fa6 PS : 0x00060530 A0 : 0x800d1211 A1 : 0x3ffb1f50 A2 : 0x3ffb844c A3 : 0x3ffb84b0 A4 : 0x3f41afcc A5 : 0x00000003 A6 : 0x00000003 A7 : 0x00000000 A8 : 0x800d1fa2 A9 : 0x3ffb1f20 A10 : 0x00000000 A11 : 0x3ffc16dc A12 : 0x00000046 A13 : 0x00000000 A14 : 0x00000001 A15 : 0x00000001 SAR : 0x0000001a EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000 LBEG : 0x40088cd4 LEND : 0x40088cf0 LCOUNT : 0x00000000

ELF file SHA256: 0000000000000000`

Someone can help me? Thanks

FXVT commented 2 years ago

Bonjour Everybody, I have the same message when calling buzzer->begin(). It reboots. I have a T-Watch V2. The original sketch (when unbowing the watch) had a working buzzer function, so I think the T-watch V2 can activate a motor, However, in the the config.h file (in the Motor example) it is noticed that this feature is not available on V2 ! How can we do to activate the buzzer ? Merci. Best Regards. FXVT

FXVT commented 2 years ago

Bonjour, For the Watch 2020 V2, I use:

SETUP:

define DRV2605_ADDRESS 0x5A

static Adafruit_DRV2605 *drv; // VIBREUR HAPTIQUE drv = watch->drv; // drv.begin(); watch->enableDrv2650(true); drv->selectLibrary(1); drv->setMode(DRV2605_MODE_INTTRIG);

Then in the loop or subfunction:

// set the effect to play drv->setWaveform(0, 75); // play effect drv->setWaveform(1, 0); // end waveform // play the effect! drv->go();

Read: https://learn.adafruit.com/adafruit-drv2605-haptic-controller-breakout/arduino-code