This is the reason you have to run a extra neopixel.write() command:
Every time you upload with reset some extra pinMode commands are included:
>reset() =undefined _____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v95.3493 Copyright 2017 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate Flash map 4MB:1024/1024, manuf 0xe0 chip 0x4016 >dump() pinMode(D0, "input_pullup", true); pinMode(D4, "input_pullup", true); pinMode(D5, "input_pullup", true); pinMode(D12, "input_pullup", true); pinMode(D13, "input_pullup", true); pinMode(D14, "input_pullup", true); pinMode(D15, "input_pullup", true); =undefined
This is very helpful, because you always start with the same defined pinMode for all pins.
I suggest to include a pinMode() for pins you use different.
var neo = require("neopixel"); var neoPin = NodeMCU.D4; // D2 pinMode(neoPin,'output'); neo.write(neoPin, [25, 0, 0]); // 255 is to bright for me :)
1 Attachment
@MaBe started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
This is the reason you have to run a extra neopixel.write() command:
Every time you upload with reset some extra pinMode commands are included:
This is very helpful, because you always start with the same defined pinMode for all pins.
I suggest to include a pinMode() for pins you use different.
1 Attachment