-
Nevermind, works fine. I was attempting to use the SSD1306 I2C on
D1
andD2
, needs to beNodeMCU.D1
andNodeMCU.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
-
-
I've been collecting strange ESP8266 boards, and got my hands on 2 of these:
Flashing 4MB combined with
--flash_size 4MB
and4MB-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?
-
-
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.030687v2(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.02353299999v2(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.030486v2(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.02258200000v2 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);
-
-
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);
-
-
Agreed, it's just that when I flashed
espruino_1v95_esp8266_4mb_combined_4096.bin
, I believe I got serial gibberish.But success!
./esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash --flash_freq 80m --flash_mode qio --flash_size 4MB-c1 0x0000 espruino_1v95_esp8266_4mb/boot_v1.6.bin 0x1000 espruino_1v95_esp8266_4mb/espruino_esp8266_user1.bin 0x3FC000 espruino_1v95_esp8266_4mb/esp_init_data_default.bin 0x3FE000 espruino_1v95_esp8266_4mb/blank.bin
On boot:
Flash map 4MB:1024/1024, manuf 0xef chip 0x4018
and able tosave()
and reboot without serial gibberish.In fact, it also works with just
4MB
(not4MB-c1
) size:Flash map 4MB:512/512, manuf 0xef chip 0x4018
.and with
./esptool.py write_flash --flash_size 4MB-c1 0x0000 espruino_1v95_esp8266_4mb_combined_4096.bin
The takeaway seems to be, don't let
esptool.py
guess the chip size @ 16MB and don't specify 16MB. -
Thanks for your help! Keep in mind that
wifi.save()
is different thansave()
.save()
is for saving your current code to flash so thatonInit()
will run on next boot. So that thread doesn't seem relevant for my case, but I will try to flash the 4MB "distributed" binaries instead of the 512K ones and report back.I think that what's happening here is that the 1v95 binaries are built for 512K and 4MB models. No matter where you flash the components, the runtime code doesn't point to the right memory addresses. Guess I'll have to wait until a 16MB combined binary is available.
-
-
Could use some help on this device. I can flash this fine with a 512m image, but with a few errors writing from the IDE at Espruino boot:
Flash map exception, manuf 0xef chip 0x4018
and
save(): >save() =undefined Erasing Flash..... Writing................. ERROR: Too big to save to flash (14448 vs 12284 bytes) Deleting command history and trying again... Erasing Flash..... Writing.......... Compressed 27200 bytes to 7482 Checking...
Specs for the device claim 16M bytes(128M bit) Flash...but I am not sure how to take advantage of that with esptool.py and the fragmented binary image files.
0xffc000
should be the place where init data is stored in 16MB map../esptool.py --chip esp8266 --port /dev/ttyUSB0 write_flash -ff 20m -fm dio -fs detect 0x0000 espruino_1v95_esp8266/boot_v1.6.bin 0x1000 espruino_1v95_esp8266/espruino_esp8266_user1.bin 0xffc000 espruino_1v95_esp8266/esp_init_data_default.bin
causes the device to just spew gibberish out of the serial console.
Flashing the combined 4MB image
espruino_1v95_esp8266_4mb_combined_4096.bin
does not work. Onlyespruino_1v95_esp8266_combined_512.bin
does, but this doesn't allow the amount of code I'm developing as per above.
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: