Avatar for 7oo1er

7oo1er

Member since Mar 2018 • Last active Jun 2020
  • 3 conversations
  • 12 comments

Asseto Corsa home driver)

Most recent activity

  • in Bangle.js
    Avatar for 7oo1er

    Hello!

    I took "10 Pcs Piezoelectric Piezo Ceramic Wafer Plate Dia 20mm For Buzzer Loudspeaker" from Ali. Put it inside, closed.. So weak, hardly hear in 5 cm from ear. Buzzer sounds better!

    Took Pico, connected with other piezo. And every one from that bunch is very weak.
    (I'm very happy with my Bangle, anyway, thank you Gordon!)

    analogWrite(B7, 0.9)
    
  • in ESP32
    Avatar for 7oo1er

    Hello!
    Wow, so long post! Thank you! I'll break my answer.

    1. Link with that quote: ESP32-CAM Troubleshooting Guide. Just add quotes when google it.
    2. My humble opinion. I had lost many hours with reflash and rerun, edit sketches, search for other sketches (tried Arduino based), google why this thing can't run simple things. Reason was: bad cable, that can't feed the board enough. I choose to post this reminder here: please feed the board.
    3. I did a check with a cheap and not very accurate "USB tester", short cable can give 1A from powerbank to resistor, 1m cable can't. Enough for Pico, too bad for ESP32.
    4. My friend is making a flight cockpit emluator with several Megas. Suddenly they stopped to reflash. All of them. He spend 4 hours in research, reinstall, change drivers. Real reason: motherboard change in pc. New MB can't reflash with old cable and front USB case connection. He took a short cable from Mega package and everythyng works as usual.
    5. BTW, had such dance with a R300 printer. It looked ok in devices, but can't print. Same cure: change the cable.

    So. Cables are fake friends. And yes, I think it's related to "How to Flash your ESP32" topic.

  • in ESP32
    Avatar for 7oo1er

    I had some issues, found the cure and need to post it here, for future use. Had strange reboots, googled for hours and finaly found this:

    "Some of our readers reported that they could only upload code when
    the ESP32 was powered with 5V. However, we were always successful
    providing 3.3V supply."

    I can use Espruino Pico with a 1 meter cable, add nokia display and temperature sensor. But not here. ESP is more heavy, feed it more, use better and shorter cables.

  • in ESP32
    Avatar for 7oo1er

    Hello.

    Played with a same devboard, got an infinite loop in the same way. But.. How I can reflash it to a normal stage? Did reflash with

    esptool.py  --chip esp32 --port COM7 --baud 921600 --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size=detect 0x1000 bootloader.bin 0x8000 partitions_espruino.bin 0x10000 espruino_esp32.bin
    

    and got the same loop after reflash.
    Did this:

    esptool.py  --chip esp32 --port COM7 --baud 921600 --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size=detect 0x100000 blank64KB.bin
    

    and got another halt about no booting partition

    ets Jun  8 2016 00:22:57
    rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
    configsip: 0, SPIWP:0xee
    clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_d­rv:0x00,hd_drv:0x00,wp_drv:0x00
    mode:DIO, clock div:2
    load:0x3fff0018,len:4
    load:0x3fff001c,len:2668
    load:0x40078000,len:7304
    load:0x40080000,len:5312
    entry 0x40080274
    E (29) boot: ota data partition invalid, falling back to factory
    E (520) esp_image: Checksum failed. Calculated 0x4 read 0xb5
    E (520) boot: Factory app partition is not bootable
    E (520) esp_image: image at 0x160000 has invalid magic byte
    E (524) boot: OTA app partition slot 0 is not bootable
    E (529) boot: No bootable app partitions in the partition table
    Fatal exception (0): IllegalInstruction
    epc1=0x400802bc, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
    

    with "Unable to retrieve board information. Connection Error?" IDE message, that thing went into the same loop after reflashing with the first full flash command again.

    I got this form ESP32 page.

    If the save() area contains something that crashes Espruino or otherwise doesn't let you reset the system you can disable whatever is saved by flashing blank.bin to 0x100000.

    I hope there can be a way to erase bt off command from the board.

    UPD: Googled and looks like it's ok to erase_flash and reflash. Did so and everything works ok. Did a read_flash into file, took 16777216 bytes. So, looks like BT is in can't use and can't disable situation.

    • 3 comments
    • 2,403 views
  • in JavaScript
    Avatar for 7oo1er

    Thank you for support and all answers, I'm happy with it!

  • in JavaScript
    Avatar for 7oo1er

    Hello

    As I read in Internets, array.length can cut array to size. I need this to save only 100 last readings. But using lenght can, I think, cause some memory issues.
    code:

    a = new Array();
    a = [1, 2, 3, 4, 5, 6];
    console.log(a);
    

    console requests:

    >[ 1, 2, 3, 4, 5, 6 ]
    =undefined
    >a.length
    =6
    >a
    =[ 1, 2, 3, 4, 5, 6 ]
    >a.length = 2
    =2
    >a
    =[ 1, 2, 3, 4, 5, 6, "length": 2 ]
    > 
    

    I can get a real array size only before trying to cut it.

  • in Pico / Wifi / Original Espruino
    Avatar for 7oo1er

    Hello!
    Need to kill any console messages that appear after Serial is open with a terminal app. I reconnect Pico before opening Serial with PuTTY evry time. Used Troubleshooting code, but it works halfway. I need to get "B01" and "B02" messages only, but some errors happened.

    function onInit() {
      setTimeout(function() { Serial1.setConsole(); }, 1000);
      digitalWrite(LED2, 0);
    }
    
    var on = true;
    
    function echoOut(indelay) {
      if (indelay < 1){
        USB.print("B01\r\n");
      } else if (indelay > 1 && indelay < 3) {
        USB.print("B02\r\n");
      } else if (indelay > 3) {
        digitalWrite(LED2, 1); // it's ON after power on, so need to put OFF in init
        USB.setConsole();
        USB.print("move to USB\r\n"); //this stops LED blink if USB Serial is not connected
        console.log("console is moved");
      }}
    
    setInterval(function () {
      on = !on;
      LED1.write(on); // Just to check Pico is alive
    }, 500);
    
    setWatch(function (e) {echoOut(e.time-e.lastTime);},
      BTN1, { repeat:true,
      edge:'falling'
    });
    
    

    short: B01

    longer: B02

    longest:

    <- Serial1
    Uncaught InternalError: setDeviceClockCmd: Unknown Device 752
     at line 31 col 20
        USB.setConsole();
                       ^
    in function "echoOut" called from line 1 col 26
    echoOut(e.time-e.lastTime);
                                 ^
    in function called from system
    

    Same errors "Unknown Device" I got with and LoopbackA too. Second longest press in same session makes no error, just output "move to USB" and second message.
    So, I got a clean output, and move back to USB is working. But I want to point all that errors.

Actions