Avatar for Jean-Philippe_Rey

Jean-Philippe_Rey

Member since Apr 2015 • Last active Mar 2021
  • 37 conversations
  • 281 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

    Thanks Gordon. Good point! My browser was blocking pop-ups by default.

  • in Bangle.js
    Avatar for Jean-Philippe_Rey

    I just used that url https://www.espruino.com/ide/?emulator# and it seems that I can't "connect" to the bangle emulator anymore. Anything changed?

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

    In addition to USB (serial, right?) and the possibly to add a WiFi module, I would love to have

    • An accelerometer/gyro/compass/IMU (turn ON screen when LCD facing up, turn it down otherwise, in-vehicle datalogger, mobile-robotics use-cases,...)
    • Just because the graphical library is very complete, maybe a touchscreen? ;-)
    • Maybe support for multiple BLE communications at the same time if a Nordic Softdevice is available for the NRF52840?
    • One or two 3-pin servo headers (I was still thinking of the mobile robotics use-cases ...)
    • a microphone (AI, basic speech recognition)
    • secure memory (if not already in the NRF) for things like password keepers and so on

    That's all I think about now.

  • in Projects
    Avatar for Jean-Philippe_Rey

    Had you tried just pairing a normal Bluetooth HID device (even if that was an Espruino) with the Switch? It may 'just work' without having to fully emulate the Joycon?

    I didn't yet, I don't know if it is even possible. I'll try and let you know.

  • in Projects
    Avatar for Jean-Philippe_Rey

    I would be interested in looking into code for that if its open.

    Well the code is very basic. It implements UP, DOWN, RIGHT, LEFT, BACKSPACE and ENTER keys.
    At each key event, the key buffer keys[]is updated and sent to the host (in my case an android phone running a gameboy emulator). It works well even if I noticed a small delay between the key press and the actual response in the game. I don't know if it comes from the BLE or the emulator.

    var kb=require("ble_hid_keyboard");
    
    BTN_UP=D3;
    BTN_DN=D24;
    BTN_LEFT=D2;
    BTN_RIGHT=D22;
    BTN_SEL=D4;
    BTN_START=D5;
    BTN_B=D28;
    BTN_A=D25;
    var keys=[0,0,0,0,0,0,0,0];
    
    function onInit(){
      NRF.setServices(undefined, { hid : kb.report });
    
      setWatch("keys[2]=kb.KEY.UP;NRF.sendHIDR­eport(keys);", BTN_UP, {edge:"falling",repeat:true,debounce:50}­);
      setWatch("keys[2]=0;NRF.sendHIDReport(ke­ys);", BTN_UP, {edge:"rising",repeat:true,debounce:50})­;
    
      setWatch("keys[3]=kb.KEY.DOWN;NRF.sendHI­DReport(keys);", BTN_DN, {edge:"falling",repeat:true,debounce:50}­);
      setWatch("keys[3]=0;NRF.sendHIDReport(ke­ys);", BTN_DN, {edge:"rising",repeat:true,debounce:50})­;
    
      setWatch("keys[4]=kb.KEY.LEFT;NRF.sendHI­DReport(keys);", BTN_LEFT, {edge:"falling",repeat:true,debounce:50}­);
      setWatch("keys[4]=0;NRF.sendHIDReport(ke­ys);", BTN_LEFT, {edge:"rising",repeat:true,debounce:50})­;
    
      setWatch("keys[5]=kb.KEY.RIGHT;NRF.sendH­IDReport(keys);", BTN_RIGHT, {edge:"falling",repeat:true,debounce:50}­);
      setWatch("keys[5]=0;NRF.sendHIDReport(ke­ys);", BTN_RIGHT, {edge:"rising",repeat:true,debounce:50})­;
    
      setWatch("keys[6]=kb.KEY.BACKSPACE;NRF.s­endHIDReport(keys);", BTN_B, {edge:"falling",repeat:true,debounce:50}­);
      setWatch("keys[6]=0;NRF.sendHIDReport(ke­ys);", BTN_B, {edge:"rising",repeat:true,debounce:50})­;
    
      setWatch("keys[7]=kb.KEY.ENTER;NRF.sendH­IDReport(keys);", BTN_A, {edge:"falling",repeat:true,debounce:50}­);
      setWatch("keys[7]=0;NRF.sendHIDReport(ke­ys);", BTN_A, {edge:"rising",repeat:true,debounce:50})­;
    }
    
  • in Projects
    Avatar for Jean-Philippe_Rey

    @kri100s

    Is the idea to build a joystick with espruino or be able to talk to the hacked Joy-Con like device?

    Well I own a Nintendo Switch for a few days now and even if the little Joy-Con are cute, I would have loved to build a replica a little bit bigger and maybe with small improvements, like a special button for holding stuff behind a kart (for Mario Kart as you imagine) instead of keeping the standard button pressed for as long as you want.
    Well, at the end those modifications are only a pretext to build something new with Espruino ;-)

    I did my own Espruino game controller a few months ago, which was basically a BLE HID keyboard with specific buttons. Here the task is a bit more complicated because it involves reverse-engineering a few things such as the pairing process but I am sure that being able to provide Espruino community with some game controllers examples will be very positive. I am a casual gamer, but I am confident that many of us would love to benefit from Espruino in the gaming area.

    By the way, I really love the bolidJS project !

  • in Projects
    Avatar for Jean-Philippe_Rey

    Anyone already working on this?

    I see that some people already partially reverse-engineered the Joy-Con protocol (HID) over USB, I guess it would be the same protocol over Bluetooth?

    https://github.com/shinyquagsire23/HID-J­oy-Con-Whispering

Actions