Install
npm install debounce
Require in Vue
var request = require('request'); | |
const cheerio = require('cheerio') | |
const { URL } = require('url'); | |
const chalk = require('chalk'); | |
function get() { | |
return analogRead(NodeMCU.A0 / 1023); | |
} | |
function percentage (){ | |
return Math.round(100 - ( get() * 100 ), 1); | |
} |
var SPI2 = new SPI(); | |
SPI2.setup({mosi: NodeMCU.D7 , sck: NodeMCU.D8 }); | |
var disp = require("MAX7219").connect(SPI2, NodeMCU.D5, 4 /* 4 chained devices */); | |
disp.intensity(0); | |
esptool.py --port /dev/cu.SLAB_USBtoUART --baud 115200 write_flash --flash_freq 40m --flash_mode dio --flash_size 4MB 0x00000 "boot_v1.6.bin" 0x1000 espruino_esp8266_user1.bin 0x3FC000 esp_init_data_default.bin 0x37E000 blank.bin |
const wifi = require("Wifi"); | |
const http = require("http"); | |
wifi.setHostname("antoine-espruino-3"); | |
wifi.connect("potter-club", {password:"Cdfdfflllllffddssddf"}, err => { | |
Install
npm install debounce
Require in Vue
function listCaches(){ | |
return new Promise( (resolve, reject) => { | |
caches.keys().then(function(cacheNames) { | |
if( cacheNames.length === 0 ) return reject("no caches"); | |
return resolve(cacheNames); |
void callback(char* topic, byte* payload, unsigned int length) { | |
Serial.print("Message arrived ["); | |
Serial.print(topic); | |
char message[length + 1]; | |
// copy contents of payload to message | |
memcpy(message, payload, length); |
abGAsendTime = function(){ | |
this.getLoadTime = function() { | |
return performance.timing.loadEventStart - performance.timing.navigationStart; | |
} | |
var pin = NodeMCU.D2; | |
var dht = require("DHT22").connect(pin); | |
var data = {}; | |
setInterval( () =>{ | |