Avatar for Jean-Philippe_Rey

Jean-Philippe_Rey

Member since Apr 2015 • Last active Nov 2022
  • 42 conversations
  • 315 comments

Developping IoT @ http://www.novaccess.ch , Switzerland

80% Hardware
15% Firmware
5%Software

Linkedin: linkedin.com/in/jprey
Twitter: https://twitter.com/yerpj

Most recent activity

  • in Bangle.js
    Avatar for Jean-Philippe_Rey

    Actually I misunderstood the behavior of the BLE stack. sd_ble_gattc_hv_confirm is to be called on client side to send an application level acknowledge of an incoming "indication" packet.
    Server side, however, the BLE stack will emit an BLE_GATTS_EVT_HVC event upon reception of such an application level acklowledge sent by the peer. While this mecanism seems to be used in some specific BLE services, it seems that this BLE_GATTS_EVT_HVC event is not available for a custom BLE service. Do anyone know how and where should I try to add this event in such a way for the server application to be able to react on it?

  • in Bangle.js
    Avatar for Jean-Philippe_Rey

    it looks like something is done here. Moreover, in release 2v15, the changelog says nRF5x: Call sd_ble_gattc_hv_confirm in response to BLE indications
    After that I am a bit lost, is it possible that this event is currently lost but could be exposed in JS by calling ? jsble_queue_pending() with a new enum of type BLEPending ?

  • in Bangle.js
    Avatar for Jean-Philippe_Rey

    Supporting confirmations seems great ! I didn't test it but it could happen soon. By the way, I just wondered, is there any way for the application that just sent an Indication packet (NRF.updateServices called with option indicate: true) to be "notified" (either with a callback or promise or ? ) when the confirmation has been received from the other side?
    I have some ideas in mind that would need to use as much bandwidth as possible without loosing data...

  • in News
    Avatar for Jean-Philippe_Rey

    As always, there is an impressive mass of work done in order to let the Espruino users have a much better experience with every new release!

    Thank you so much Gordon (as well as the community, but everyone knows that Gordon spends 28 hours per day on making Espruino even better everyday)

    I have been using Espruino since the first kickstarter and I must say that it has changed my life as a maker, but also as an electronic engineer. Espruino has given us the opportunity to automate a lot of things, provide BLE connectivity where we would have struggled otherwise

    A huge thank you Gordon!

  • in Puck.js, Pixl.js and MDBT42
    Avatar for Jean-Philippe_Rey

    by the way @Gordon, is the Puck.js online doc not rendering correctly? On my browsers (Firefox and Chrome) the pinout does not appear anymore
    http://www.espruino.com/Puck.js#pinout

  • in JavaScript
    Avatar for Jean-Philippe_Rey

    I also think Math.round() does not behave as expected

    Math.round(1.3)
    =1
    >Math.round(1.4)
    =1
    >Math.round(1.5)
    =1
    >Math.round(1.6)
    =2
    >Math.round(1.0)
    =1
    

    Math.round(1.5) should return 2

  • in Interfacing
    Avatar for Jean-Philippe_Rey

    Thank you very much, I must say that I didn't look so deep into other modules to check how optional parameters were handled.
    Anyway I just tested the new version of the ADS1X15 module and it works well with an ads1115. Thank you for your incredibly fast actions!

  • in Interfacing
    Avatar for Jean-Philippe_Rey

    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

    Uncaught Error: Function "connect" not found!
     at line 96 col 26 in ADS1X15
    function ADS1X15(i2c,opts={part:"ads1015"}) {
                             ^
     at line 198 col 30
        ads = require("ADS1X15").connect(i2c,{part:"adĀ­s1115"});
                                 ^
    in function "onInit" called from line 212 col 8
    onInit();
    

    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?

  • in Interfacing
    Avatar for Jean-Philippe_Rey

    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,

Actions