-
I just made a few experiments with an Adafruit 1115 breakout board along with the module EspruinoDocs/devices/ADS1X15.js. I compared the datasheet of ADS1115 and ADS1015 and it appears that the datarate config (DR[2:0]) is not the same. Thus, the ADS1X15.js is only valid for ADS1015. As long as the ADC type cannot be discovered at runtime, it may be better to make 2 modules instead of one, but it means renaming the js file. I don't know @Gordon what would be the best way to go because renaming the current js module will break compatibility for those who currently use it.
Any hint?
Kind regards,
-
-
-
I am not sure about that, but could it be that you are missing the file "weather.json" in the storage area?
I see that the app is not meant to run without it -
Thanks everyone for your inputs!
I'd advise this too. It's just super easy, and Espruino handles this more efficiently than a custom BLE service. If you're looking at x/y/z every 500ms bandwidth isn't going to be much of an issue for you at all though :)
For one Puck.js it seems definitely to be the best way to go, however I would like to have let's say 5 or more Pucks running simultaneously, and 500ms is a minimum. I did not explain well what I was trying to do: I would like to build a 3d motion sensing platform, a bit like what they use in film-making for motion capture. I am unsure of the precision I will get but it is worth a try.
At first I was thinking of using a Raspberry Pi as a central device, able to establish several connections simultaneously, but I would also love to try and evaluate the performance of an Espruino device as a central device, if the feature is being added to the firmware at a given time ;-)
Currently, I think that the EspruinoHub (MQTT) could help me implementing the central device. -
Hi @allObjects, thanks for your inputs.
I am not sure BLE can transport HTTP yet, but the protocols you are suggesting are inspiring me and I start to think that a custom protocol, based on a custom profile, could be an answer to my problem. At least it could help me challenge the BLE stack to reach the bandwidth limit -
Hi there,
For a project, I would like to use several Puck.js devices acting as wireless sensors. A computer would serve as the BLE central device, collecting the data.
So far so good, anyone would advise me to use broadcasting, and it would be fine as long as data quantity to be sent is kept low. But I would like to send as much datapoints as possible, like x,y and z acceleration for each Puck.js every 500ms or more if possible.
For such a use-case which BLE profile would you advise me to use? I originally thought of HID profile with binary data encoded in base64, but I also need downlink to send command to the Pucks.js.
If anyone has a clue about which BLE profile would best address my needs, I would love to hear about!
In the meantime, I wish you all a happy Easter. -
-
Hi.
First to do is read the doc here to know what it is all about, what is inside and what can be done with: http://www.espruino.com/Bangle.js2Then, you can connect your Bangle.js 2 and customize it with the apps you want: https://banglejs.com/apps/
As is, it already provides a lot of possibilities, but remember, it is meant to run you own apps. To know how to do that, you can follow this very good example:
https://www.espruino.com/Bangle.js+First+App -
-
-
I slightly misunderstood the root cause. Given that my probe is made out of 2 pads, one for
D11
, the other one forGND
, putting it into water doesn't increase the capacitance but instead lower the impedance. I suspect that the latter is low enough to prevent the capSense timer to reach the compare threshold, thus generating a timeout on the functionnrf_utils_cap_sense()
.Now I will try 2 things:
- removing the
GND
pin and see if the water detection is reliable, - trying to measure the DC voltage on
CAPSENSE_RX
pin (CAPSENSE_TX
put to logic HIGH), given the water impedance could be equal to or lower than the 1Meg resistor of the capSense feature.
- removing the
-
Hi guys,
I am using pin D11 and
Puck.capSense()
feature to detect water leakage. The wire on D11 has a bigger capacitance if put into water.
When the wire is "dry" everything is fine, but when I try into water, capSense() takes a lot more time to return (about 1 second) and returns value 20000200. If I remove the wire from the water and dry it out, capSense() remains in a state that takes 1 second to return, with value 20000200.After that if I run
Puck.selfTest()
it returnsCapsense resistor disconnected? (pullup)
a few times but after a while it seems to put the function back into a normal mode. This process is repeatable.
Any hint? -
What services does the bangle.js advertise, and what are the UUIDs?
I think it doesn't advertise any service except the default one,
NUS
, which is the Nordic UART Service, used for communication between the Bangle.js and the IDE.
If you want specific data exposed inside a specific service, you can either code it by yourself, given the great documentation on BLE services here or find an app which does it already. For the latter I don't think there will be so much things already available.
From what I understand about Gadgetbrige, it doesn't use so many BLE services. It rather uses a Serial interface service for passing JSON encoded data packets. I am not sure about that but there is chances that the serial service used could beNUS
(see gbSend() method implementation ) -
-
-
Hi guys,
Usually I interract with my Espruino devices on a Windows 10 computer, and everything works like a charm with the chrome online IDE.
For a specific project, I need to connect to a MDBT42Q module but with a laptop running Windows 7. I cannot use online IDE because of the BLE restrictions on this OS. But using the native IDE (rev 0.72.1) I cannot use the Storage features (Storage button doesn't appear).
How can I interract with the MDBT42Q Storage through the native IDE?Thanks for your suggestions!
-
-
It could be worth asking Nordic if a new wireless wifi+BLE SoC is going to be released soon, as they invested in WiFi recently (https://www.nordicsemi.com/News/2020/11/Nordic-Semiconductor-expands-into-WiFi)
-
-
If you need fast RAM to store live pages it could be worth checking at FRAM modules such as this one: https://www.adafruit.com/product/1895
FRAM stands for ferroelectric RAM, which is non-volatile, yet fast for read and write cycles.
-
-
Hi @psc1988,
There is a sample code for Arduino given by Adafruit: https://github.com/adafruit/Adafruit_MPRLS/blob/master/Adafruit_MPRLS.cpp
Basically the first byte you will receive is the status byte, then the 3 next bytes are meant to be concatenated to form a 24-bit value (see step 3 of table 17, page 16 of the corresponding datasheet). The sample code for this first step is shown here in the code
Once you get your 24-bit value, you need to convert it to a meaningful value, as shown on page 19 of the datasheet or here in the code
I don't think you need to read 5 bytes out of the sensor (
var x = i2c.readFrom(0x18, 5);
), IMO you can just try reading 4 bytes, and use the 3 last bytes to calculate the pressure value. -
Thank you @Gordon. I tried to implement this feature according to your recommendation and made a pull request here: https://github.com/espruino/EspruinoDocs/pull/665
However, when testing, I got this error
It is most probably a very noob, basic javascript error. Could you help me figure out what's going wrong with the way I made the change?