Ok, need to test this again.
Maybe the HID Device.
Yes the main OS keyboard. I am not updating my iPhone because Apple slow the device down in purpose at each update. Maybe they fixed it.
@mtulu
Could you please get in contact with adafruit to get a final answer about the INT connection and our SPI Module.
All my tests don‘t work like my tests with RTC or MPU.
Maybe Adafruit can give us an working/waking example.
I have previously contacted them and could not get a response:( Actually, we may develop a custom BT firmware and have a better battery performance and use Interrupt. Adafruit does not release the source code of the firmware so that we modify it.
To be honest, we don’t really benefit the NRF51822 Arm based MCU as well. I am thinking, we can shift most of the operations to NRF and use Atmega32U4 as a bridge.
Currently our team is not really capable(in terms of human source) of developing a custom firmware for the BT module. We will grow our team and focus on bluetooth module for a custom firmware.
There is one more option, we may find a open source BT firmware for NRF51822 and flash it.
Thank you for these informations.
@mtulu I flashed your fixed version on watchx and my device now has breathing LED working but usb always says connected. Charging changes to full though.
Totally strange Mine works great except that when a remove the USB I see “Chrg” turns into “Full” momentarily which is a bug .
When you unplug from the computer do you see that LED continue to breath? If don’t your Oled display not obeying the below code:
if(!usbOneTimeEvent){
oled.setCursor(80,7);
oled.clearToEOL();
}
Can you please try to do something like:
if(!usbOneTimeEvent){
oled.setCursor(80,7);
oled.clearToEOL();
digitalWrite(LEDL, HIGH); // Let's make sure that we are in here.
}
The breathing stops and the chrg says full. But USB stays. I think full might actually stay there I’ll check in a moment.
No, Full should not stay there as well. It should only show Full when usb is connected and battery is fully charged. I think my suspects are through, this line “oled.clearToEOL();” don’t work at your Oled Display or you don’t have the latest update.
Can you verify you have “oled.clearToEOL();” at watchface function?
I just downloaded the latest version from GitHub. That’s what I flashed.
Just tried the last Github Version.
“USB” is cleared if I remove the cable.
My battery life is horrendous on the latest version. I think this is because my device thinks the USB is always connected so it doesn’t go to sleep.
I think my watch has a hardware fault.
Did you tried the USB Detection code snippets „standalone“ to be sure it‘s not something from the sketch even it‘s unlogical?
No. I will give it a try. Seems odd thought that you,@mtulu and I all loaded the same code from GitHub and yours both work and mine does not.
When I get a chance I will try the snippet.
Maybe just the line which is not cleared for whatever reason.
#include "SSD1306Ascii.h"
#include "SSD1306AsciiSpi.h"
#define CS_PIN A5
#define RST_PIN A4
#define DC_PIN A3
#define CRG_STATE 5
SSD1306AsciiSpi oled;
void setup() {
// put your setup code here, to run once:
USBCON|=(1<<OTGPADE); //enables VBUS pad
pinMode(CRG_STATE, INPUT_PULLUP);
oled.begin(&Adafruit128x64, CS_PIN, DC_PIN, RST_PIN);
oled.clear();
oled.setFont(System5x7);
}
void loop() {
// put your main code here, to run repeatedly:
oled.clear();
bool usbConnected = (USBSTA&(1<<VBUS));
//bool charging = digitalRead(CRG_STATE);
oled.println(usbConnected);
//
delay(500);
}