-
Gadgetbridge does not connect to the watch automatically. The icon on the phone is crossed out and the icon on the watch is grayed out.
However, if I head over to https://banglejs.com/apps/ with the Chrome browser and connect to the watch, Gadgetbridge can connect and the connection stays.
Any hints, how I can get the gadgetbridge reconnect without the chrome workaround?
One side note:
I connected Gadgetbridge with the watch "without pairing" as mentioned in some other posts (without really knowing what the difference is). -
@Gordon Thanks for clarification. Only to make it clear for me:
If I donate 5$ via patreon to you, I have to pay 5.95$ because of VAT (19% in Germany). You get the 5$ (minus 5% for patreon), and you don't have to pay VAT a second time, or?On the other hand, if I pay you 5$ directly, you have to subtract UK VAT (20%) afterwards?
Please understand me correctly, I want to make sure you get the most out of my money :-)
-
One question regarding patreon: I will be charged every month an additional dollar VAT. But I wonder why I have to pay VAT on a donation? What is the difference compared to transfer money directly to Gordon? Does he have to pay the taxes in the second case?
And how much of the money goes to patreon?
-
@Gordon does your fix also improve performance of external IR LED? Or had the bug only influence while using the internal LED?
-
I have also the problem of short range. It's about 50cm, not much more.
@Gordon: Can I somehow redirect the convenience functions of the Puck to another GPIO?
Do you also use two pins on the Puck for IR? -
@allObjects: You are right.
Thanks for the advices!
-
-
-
-
@allObjects: Are you talking about adding external memory? How much does those cost?
-
Thanks for the hint.
But where can I find that module? http://www.espruino.com/Modules does not show it. -
Hello,
I want to store a variable on a regular basis so it is not lost after power loss.
The easiest way is to store the complete state of the software with save(). However, this stores everything and I'm afraid that it breaks the flash if used too often.
How often can I write into the flash? Would be every hour too much?Is there a better solution?
The warnings at the flash documentation scare me :-)Regards
Sven -
Interestingly, BT LE already provides a service for Cycling Speed and Cadence Service (CSCS). I collected some information:
https://github.com/avanc/espruino-tachometer/issues/1Looking forward for information on the Espruino JS interfaces for Bluetooth LE :-) I'm still confused, how pairing is done in general and how to define GATT services.
-
-
-
-
Hello,
this weekend I got my reed switch from Sigma and connected it to my pico (GND and B3). As proposed, I set the pin to input_pullup and wrote a basic watch function:
setWatch(function(e) { pincounter++; console.log(pincounter+"\n"); }, B3, {repeat: 'true', edge:'rising', debounce:10} );
Now I get some strange behaviours with different options:
edge: 'rising' no debouncing
Most of the time two events when moving magnet to sensor and one when moving away.edge: 'rising', debounce: 10
One event when moving magnet to sensor and one when moving away. The same for debounce 100 and 1000.edge: 'falling', no debounce
Three events when moving magnet to sensor and no event when moving away.edge: 'falling', debounce: 10
No events at all.Not exactly what I expected. Am I right that it seems that the reed switch only closes very short but not keep closed while the magnet is next to the sensor?
-
-
Yes, the group pludev is available and I also use it for another device. Reboot and reload rules doesn't change anything. It seems that the rule is not triggered at all.
Maybe this is of help, /dev/ttyACM0 does not have productID nor vendorID. It is available one level below.
udevadm info -a -p $(udevadm info -q path -n /dev/ttyACM0) Udevadm info starts with the device specified by the devpath and then walks up the chain of parent devices. It prints for every device found, all possible attributes in the udev rules key format. A rule to match, can be composed by the attributes of the device and the attributes from one single parent device. looking at device '/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/tty/ttyACM0': KERNEL=="ttyACM0" SUBSYSTEM=="tty" DRIVER=="" looking at parent device '/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0': KERNELS=="3-2:1.0" SUBSYSTEMS=="usb" DRIVERS=="cdc_acm" ATTRS{authorized}=="1" ATTRS{bAlternateSetting}==" 0" ATTRS{bInterfaceClass}=="02" ATTRS{bInterfaceNumber}=="00" ATTRS{bInterfaceProtocol}=="01" ATTRS{bInterfaceSubClass}=="02" ATTRS{bNumEndpoints}=="01" ATTRS{bmCapabilities}=="2" ATTRS{supports_autosuspend}=="1" looking at parent device '/devices/pci0000:00/0000:00:14.0/usb3/3-2': KERNELS=="3-2" SUBSYSTEMS=="usb" DRIVERS=="usb" ATTRS{authorized}=="1" ATTRS{avoid_reset_quirk}=="0" ATTRS{bConfigurationValue}=="1" ATTRS{bDeviceClass}=="02" ATTRS{bDeviceProtocol}=="00" ATTRS{bDeviceSubClass}=="00" ATTRS{bMaxPacketSize0}=="64" ATTRS{bMaxPower}=="100mA" ATTRS{bNumConfigurations}=="1" ATTRS{bNumInterfaces}==" 2" ATTRS{bcdDevice}=="0200" ATTRS{bmAttributes}=="c0" ATTRS{busnum}=="3" ATTRS{configuration}=="" ATTRS{devnum}=="4" ATTRS{devpath}=="2" ATTRS{idProduct}=="5740" ATTRS{idVendor}=="0483" ATTRS{ltm_capable}=="no" ATTRS{manufacturer}=="STMicroelectronics" ATTRS{maxchild}=="0" ATTRS{product}=="STM32 Virtual ComPort" ATTRS{quirks}=="0x0" ATTRS{removable}=="removable" ATTRS{serial}=="00000000001A" ATTRS{speed}=="12" ATTRS{urbnum}=="211" ATTRS{version}==" 2.00" ...
-
Thank you both for the quick responses.
I like the idea of removing the interval:
https://github.com/avanc/espruino-tachometer/blob/f0a45a866a77ee9ad4a05aedd50cc03f38c4974c/tachometer.jsAdding an e-paper is also an interesting idea. I have to see were to get one :-)
A general question on using Espruino:
Is it better (faster, less memory usage, ...) to initialise everything as I did in my example and then doing a save()?
Or writing an init function:E.on('init', function() { // Initialise functions/variables and setWatch() });
-
Sorry, I don't understand the discussion regard reed switch or not.
I modified the code so that the interval timer is deactivate if the speed is 0. It's activated again by the first rotation: https://github.com/avanc/espruino-tachometer/blob/master/tachometer.js
@Gordon: Is it not cheaper to calculate the speed just every few seconds than adding more logic into each wheel turn? In addition, caluclating the time in the watch function, I get some problems:
lastTime is the time in seconds at which the pin last changed state. When using edge:'rising' or edge:'falling', this is not the same as when the function was last called.
-
Hello,
I'm using the udev rules from here .
However, the group of /dev/ttyACM0 is not changed to pludev neither are the permissions changed.udevadm test /dev/ttyACM0 gives the following:
[root@herrod ~]# udevadm test /dev/ttyACM0 calling: test version 231 This program is for debugging only, it does not run any program specified by a RUN key. It may show incorrect results, because some values may be different, or not available at a simulation run. === trie on-disk === tool version: 231 file size: 7291171 bytes header size 80 bytes strings 1819099 bytes nodes 5471992 bytes Load module index Found container virtualization none timestamp of '/etc/systemd/network' changed timestamp of '/usr/lib/systemd/network' changed Parsed configuration file /usr/lib/systemd/network/99-default.link Created link configuration context. timestamp of '/etc/udev/rules.d' changed timestamp of '/usr/lib/udev/rules.d' changed Reading rules file: /usr/lib/udev/rules.d/40-usb-media-players.rules Reading rules file: /etc/udev/rules.d/45-espruino.rules Reading rules file: /usr/lib/udev/rules.d/49-sane.rules rules contain 393216 bytes tokens (32768 * 12 bytes), 32238 bytes strings 25863 strings (208413 bytes), 22554 de-duplicated (179485 bytes), 3310 trie nodes used unable to open device '/sys/dev/ttyACM0' Unload module index Unloaded link configuration context.
I'm using Arch Linux.
Any idea why the group is not set? -
First prototype is working :-)
var circumference = 2.11; var pin = BTN; var counter = 0; var last_counter=0; var last_time=0; var velocity=0; var w=setWatch(function(e) { counter++; }, pin, {repeat: 'true', edge:'rising'} ); function getDistance() { return counter * circumference; } var i=setInterval(function(){ var current_time=getTime(); var current_counter=counter; velocity=(current_counter-last_counter)*circumference/(current_time-last_time); last_time=current_time; last_counter=current_counter; }, 1000);
My new bike computer cable will arrive on Saturday.
-
Both sound very promising.
I could use the switch to activate/deactivate the magnetometer.Do the IO ports have internal pull-up or pull-down resistors? How should the reed contact be connected to the Puck for lowest power consumption?
Am I right that I can use also my Espruino Pico to do the first tests to bridge the time until December? Are there any major differences between Pico and Puck I have to take into account? (besides no BT LE :-) )
Hello Raik,
thanks for the clarification.
You are right, the Gadgetbridge icon gets active (blue) immediately after connecting with Chrome regardless if Gadgetbridge is connected. However, Gadgetbridge does not connect over the whole day. But if I connect via Chrome, the Gadgetbridge connections also almost immediately active and I can receive notifications.
I was using version 0.4.1 of Gadgetbridge. I didn' realized there was a new version in FDroid, as FDroid didn' updated the package sources automatically. Will try the new version an will report my observations.