Avatar for user104751

user104751

Member since Nov 2019 • Last active Sep 2022
  • 2 conversations
  • 4 comments

Most recent activity

  • in ESP8266
    Avatar for user104751

    This has been flashed with

    VERSION: "2v04",
      GIT_COMMIT: "3956264e",
      BOARD: "ESP8266_4MB",
      FLASH: 0, RAM: 81920,
      SERIAL: "dc4f227e-3bcd",
      CONSOLE: "Telnet",
      MODULES: "Flash,Storage,hea" ... "r,crypto,neopixel",
      EXPTR: 1073643636
    

    Able to connect and set up Wifi using:

    screen /dev/tty.wchusbserial1460 115200
    

    as well as "nc" over Wifi:

    nc 192.168.0.19 23
    

    However, on a Mac Mojave Chrome, the serial connection does not show (baud rate changed to 115200):

    Handling URL "https://www.espruino.com/ide/#"
    WARNING: Unknown config type 'bool' for Config.SERIAL_FLOW_CONTROL
    No navigator.serial - Web Serial not enabled
    Couldn't connect to wss://localhost:31234 - disabling websockets for this session
    ERROR: serial_frame: getPorts timeout, disabling
    ERROR: getURL("/serial/ports") error : 
    /serial/ports doesn't exist - disabling WebSocket support
    ERROR: getURL("/serial/ports") error : 
    /serial/ports doesn't exist - disabling WebSocket support
    >>> Connecting...
    Set Slow Write = true
    BT> ERROR: NotFoundError: User cancelled the requestDevice() chooser.
    ERROR: [notify_error] Connection Failed.
    >>> Connection Failed.
    WARNING: Unknown config type 'bool' for Config.SERIAL_FLOW_CONTROL
    Config.SERIAL_IGNORE => 
    Config.SET_TIME_ON_WRITE => true
    

    Also can't connect via Wifi.

    Is there a Chrome setting I'm missing?

    I won't mind pasting code using "screen" however I don't know how to include "require"d modules if not already included.

  • in Puck.js, Pixl.js and MDBT42
    Avatar for user104751

    I did just stick the IR pins without soldering!

    Just curious how I could look into the size of the interrupt buffer? What would be the function call?

    Thanks.

  • in Puck.js, Pixl.js and MDBT42
    Avatar for user104751

    The example comes from here: http://www.espruino.com/Puck.js+Infrared.

    Here's the output of process.memory() before and after loading the code.

    process.env follows.

    process.memory()
    ={ free: 2217, usage: 33, total: 2250, history: 12,
    gc: 0, gctime: 3.23486328125, "stackEndAddress": 536924008, flash_start: 0, "flash_binary_end": 419924,
    "flash_code_start": 442368, flash_length: 524288 }


    | |_ ___ ___ _ ||___ ___
    | |_ -| . | _| | | | | . |
    |
    |_| || |_|||_|_|

        |_| espruino.com
    

    2v04 (c) 2019 G.Williams

    process.memory()
    ={ free: 2180, usage: 70, total: 2250, history: 46,
    gc: 0, gctime: 3.2958984375, "stackEndAddress": 536924008, flash_start: 0, "flash_binary_end": 419924,
    "flash_code_start": 442368, flash_length: 524288 }

    process.env
    ={
    VERSION: "2v04",
    GIT_COMMIT: "3956264e",
    BOARD: "PUCKJS",
    FLASH: 524288, RAM: 65536,
    SERIAL: "f4801353-1c650745",
    CONSOLE: "Bluetooth",
    MODULES: "Flash,Storage,hea" ... "S,crypto,neopixel",
    EXPTR: 536882364 }

    It is possible that the IR signals are not properly formulated i.e. more than a few transitions.
    But I doubt the stream of data would overflow d[].

  • in Puck.js, Pixl.js and MDBT42
    Avatar for user104751

    While running the following (example) code to read IR signals

    digitalWrite(D2,0);
    pinMode(D1,"input_pullup");
    var d = [];
    setWatch(function(e) {
       d.push(1000*(e.time-e.lastTime));
    }, D1, {edge:"both",repeat:true});
    
    
    var lastLen = 0;
    setInterval(function() {
      if (d.length && d.length==lastLen) {
        d.shift(); // remove first element
        console.log(d.map(a=>a.toFixed(1)).toString());
        d=[];
      }
      lastLen = d.length;
    },200);
    
    
    

    I get this after a few reads:

    .1,4.6,0.6,0.6,0.6,1.7,0.6,1.7,0.6,1.7,0.5,0.6,0.6,1.7,0.6,1.7,0.6,1.7,0.6,1.7,0.6,1.7,0.6,1.7,0.5,0.6,0.6,0.6,0.6,0.6,0.6,0.5,0.6,1.7,0.6,1.7,0.6,0.6,0.6,1.7,0.6,0.6,0.6,0.6,0.6,0.5,0.6,0.6,0.6,0.5,0.6,0.6,0.6,0.6,0.6,1.7,0.6,1.7,0.6,0.5,0.6,0.6,0.6,0.5,0.6,1.7,0.6,40.0,9.1,2.2,0.6,97.2,9.1,2.2,0.6
    4.0,3.9,0.6,0.9,0.6,0.8,0.6,0.8,0.6,0.8,0.6,0.9,0.6,0.9,0.6,0.9,0.6,0.8,0.6,0.9,0.6,0.8,0.6,0.9,0.6,0.8,0.6,0.8,0.6,0.9,0.6,0.9,0.6,0.9,0.6,0.8,0.6,0.8,0.6,0.9,0.6,0.9,0.6,0.8,0.6,0.8,0.6,1.9,0.6,0.9,0.6
    ERROR: Ctrl-C while processing watch - removing it. Execution
    Interrupted during event processing. New interpreter error:
    CALLBACK,MEMORY ERROR: Ctrl-C while processing interval - removing it.
    Execution Interrupted during event processing.

    What seems to be the issue?

    How do I go about to debug this?

    Thanks!

Actions