Avatar for user85573

user85573

Member since Jan 2018 • Last active Apr 2018
  • 2 conversations
  • 13 comments

Most recent activity

  • in ESP8266
    Avatar for user85573

    Not sure how to read from the buttons, I've not attempted that yet. I've included the button functions on the 5-way joystick below just as reference.

    Description:

    Color:Black
    Charging Protection:Yes
    Discharge Protection:Yes
    Compatible With Arduino
    Compatible With NodeMCU
    Wide Voltage Input Range: 5V~12V
    Charge Current:500 mA
    Size(L*W*H):102 x 30 x 20 mm
    Display Size: 0.96 Inch

    Features:

    1.One AD inputs.
    2.Micro USB inputs.
    3.One programmable LED (D0).
    4.Integrated 18650 battery charging and discharging system.
    5.One switch controls whether the 18650 battery is powered or not.
    6.OLED's SDA and SCL connect to the D1 pin and the D2 pin respectively.
    7.The five buttons are controlled by FLASH, RESET, D5, D6, and D7 respectively.
    8.The 5 Digital pins can configure the write/read/interrupt/pwm/I2C/one-wire supported separately.
    9.Operation and NodeMCU consistent, adding a programmable LED, you can use GPIO16 to control, display 8266 running status and other functions. Integrated OLED and five button, more convenient for development.
    10.The design concept originates from the open source project NodeMCU, and the development board integrates 18650 charging and discharging systems with charging and discharging protection. At the same time, a OLED and five directional buttons are integrated to facilitate the development.

    Notes:

    1. Manual measuring, please allow 1 ~ 5 mm error,thank you.
    2. This product does not contain 18650 batteries.If the battery is in the wrong direction, the charging chip will be destroyed.
    3. Please do not burn the program during charging. When you burn the program, please unplug the battery and verify the switch is in ON position.
    4. Recommend the use of 5V 500mA charging charger, more than 5V 1A there will be fever, does not affect the normal work, but in the process of charging charging chip do not touch or carry, the measured charge charging will rise to about 60 degrees with the diode chip, no heat during normal working hours, rest assured to carry.
  • in ESP8266
    Avatar for user85573

    Nevermind, works fine. I was attempting to use the SSD1306 I2C on D1 and D2, needs to be NodeMCU.D1 and NodeMCU.D2 (sda & scl) respectively, and the other ones seem to be the serial RX/TX pins, causing nonsense on the terminal.

    ./esptool.py --chip esp8266 --port /dev/ttyUSB0 write_flash -ff 20m -fm dio --flash_size 4MB-c1 0x0 espruino_1v95_esp8266_4mb_combined_4096.bin
    
  • in ESP8266
    Avatar for user85573

    Yes, the summary is accurate. That code doesn't work for me, even with tweaking. I'll need more time.

  • in ESP8266
    Avatar for user85573

    I've been collecting strange ESP8266 boards, and got my hands on 2 of these:

    https://www.aliexpress.com/item/1pc-ESP8266-Development-Board-WeMos-D1-Esp-Wroom-02-Motherboard-0-96-Screen-Module-18650-Battery/32833311570.html

    Flashing 4MB combined with --flash_size 4MB and 4MB-c1 works fine, the thing reboots, but I can never get an Espruino prompt at this point, 115200 baud or 9600.

    Manufacturer: c8
    Device: 4016
    Detected flash size: 4MB
    

    Anyone have one of these and successfully flashed?

  • in ESP8266
    Avatar for user85573

    It does not...I've just been including Wifi in onInit().

  • in ESP8266
    Avatar for user85573

    v1(a)
    0.030798
    0.030268
    0.030341
    0.03037
    0.030436
    0.030451
    0.030515
    0.030617
    0.03060900000
    0.030679
    0.03064899999
    0.030679
    0.03073700000
    0.030856
    0.030821
    0.030756
    0.030841
    0.030878
    0.03080600000
    0.03079500000
    0.03083700000
    0.030755
    0.030751
    0.030744
    0.03070499999
    0.030687

    v2(a)
    0.023461
    0.02335299999
    0.02293
    0.02335500000
    0.02342099999
    0.02307199999
    0.023368
    0.02320199999
    0.02309100000
    0.02331900000
    0.02320100000
    0.02319399999
    0.02319899999
    0.02302300000
    0.02329700000
    0.023054
    0.022922
    0.023505
    0.02313600000
    0.02292699999
    0.023507
    0.02306500000
    0.02308200000
    0.02353299999

    v2(b)
    0.03001599999
    0.030012
    0.03011499999
    0.03015499999
    0.03018
    0.03026499999
    0.03029300000
    0.03027200000
    0.030347
    0.03035300000
    0.03045099999
    0.030484
    0.03047499999
    0.03058799999
    0.03059
    0.03054
    0.03057
    0.030644
    0.03053399999
    0.03054
    0.030553
    0.030486

    v2(c)
    0.02292799999
    0.02256799999
    0.02212799999
    0.02253500000
    0.02267299999
    0.02225899999
    0.02259800000
    0.02252500000
    0.02243099999
    0.02248499999
    0.02235399999
    0.02252299999
    0.02236899999
    0.02222599999
    0.02252699999
    0.02229300000
    0.02217800000
    0.02258200000

    v2 variants needed some remediation on var t0, along with parens

    // V2b - flash an 8 LED neopixel array in a rainbow pattern
    var neo = require("neopixel");
    var led_count = 8;
    var neoPin = NodeMCU.D4;
    var rgb = new Uint8ClampedArray(led_count * 3);
    var len = rgb.length;
    var m = 127;
    var r = 0.1324*m;
    var g = 0.1654*m;
    var b = 0.1*m;
    var pos = 0;
    var t0;
    function getPattern() {
      pos++;
      for (var i=0; i<len;) {
        rgb[i++] = m + Math.sin((i+pos)*r);
        rgb[i++] = m + Math.sin((i+pos)*g);
        rgb[i++] = m + Math.sin((i+pos)*b);
      }
      console.log(getTime() - t0);
      return rgb;
    }
    function bow() {
      t0 = getTime();
      neo.write(neoPin, getPattern());
    }
    function onInit() {
      setInterval(bow,200); // may need to change to allow console to write
    }
    setTimeout(onInit, 1000);
    
  • in ESP8266
    Avatar for user85573

    Sure enough, with the 512/512 map, wifi.save() makes the device unbootable, spewing guts out on serial. Use 4MB-c1, even with the combined image.

  • in ESP8266
    Avatar for user85573

    Just FYI in the new 1v95, the neopixel module is not part of esp8266, usage is like any other Espruino platform:

    // flash an 8 LED neopixel array in a rainbow pattern
    var led_count = 8;
    var neoPin = NodeMCU.D4;
    
    var rgb = new Uint8ClampedArray(led_count * 3);
    var pos = 0;
    
    function getPattern() {
      pos++;
      for (var i=0;i<rgb.length;) {
        rgb[i++] = (1 + Math.sin((i+pos)*0.1324)) * 127;
        rgb[i++] = (1 + Math.sin((i+pos)*0.1654)) * 127;
        rgb[i++] = (1 + Math.sin((i+pos)*0.1)) * 127;
      }
      return rgb;
    }
    setInterval(function() {
      require("neopixel").write(neoPin, getPattern());
    }, 100);
    
Actions