-
-
-
are this:
Capacitors: http://ebay.eu/2yWBy9u
Quarz: http://ebay.eu/2hJBupecorrect for espruino pico ?
-
-
-
Hi!
someone know if this display:https://www.waveshare.com/wiki/2.7inch_e-PaperHAT(B)
is supported by espruino ?
if yes, which library ?Thanks !
-
Yes, i'm uploading via the code editor panel, after uploading it i write to the console the onInit(); command and it does connect and show me the IP, the "GET" version of this code does work without problems but NOT the "POST" one.
This code:
if (r.method == "POST" && r.query && r.query.led) digitalWrite([LED2,LED1], r.query.led); console.log(r.method);
Line 1 (if ) never exeute the digitlWrite since it find always "GET" as the method and never the "POST"
line 3 ALWAYS return "GET" not "POST" .
maybe it is because of i'm loading this server in local ?Thanks !
-
Hello,
I'm trying some code from page 246 (Espruino Pico+ESP8266):// Test ESP8266 var WIFI_NAME = "MYSSID"; var WIFI_KEY = "WIFIPWD"; var wifi; var json; var homepage = '<html><body>'+ '<h1>My Espruino</h1>'+ '<a href="/getTemp">Temperature</a></br>'+ '<form action="/?led=0" method="post">'+ '<input type="submit" value="LEDS OFF"/></form>'+ '<form action="/?led=1" method="post">'+ '<input type="submit" value="LED RED ON"/></form>'+ '<form action="/?led=2" method="post">'+ '<input type="submit" value="LED GREEN ON"/></form>'+ '<form action="/?led=3" method="post">'+ '<input type="submit" value="LED RED+GREEN ON"/>d</form>'+ '</body></html>'; function onInit() { USB.setConsole(true); Serial1.setup(115200, { tx:B6, rx: B7}); wifi = require("ESP8266WiFi_0v25").connect(Serial1, function(err) { if(err) throw err; console.log("Connecting to WiFi"); wifi.connect(WIFI_NAME, WIFI_KEY, function(err) { if(err) { console.log("Connection error: "+err); return; } onConnected(); }); }); } function onConnected() { console.log("Connected"); require("http").createServer(onPageRequest).listen(80); wifi.getIP(function(err,ip){ console.log("Your IP address is http://" + ip); }); } function onPageRequest(req, res) { console.log("Serving " + req.url); var r = url.parse(req.url, true); if (r.pathname == "/") { // controllo passaggio parametri if (r.method == "POST" && r.query && r.query.led) digitalWrite([LED2,LED1], r.query.led); console.log(r.method); // Onora la richiesta della pagina res.writeHead(200, {"Content-Type!": "text/html"}); res.end(homepage); } else if (r.pathname == "/getTemp"){ res.writeHead(200, {"Content-Type!": "text/html"}); res.end('<html><head>'+ '<meta http-equiv="refresh" content="2">'+ '</head><body>'+E.getTemperature().toFixed(2)+ '</body></html>'); } else { res.writeHead(404); res.end("404 - Not Found"); } }
Unfortunately it doesn't work as it 'see' only GET as a method, not the POST, sorry for my english and my worst HTML knowledge ;-)
-
-
Hello,
Just flashed the GIT 1v94.65 on mi ESP32 end when i try to run the sample found on the ESP32 webpage i got the subj error, any idea on what is wrong ?I2C1.setup({scl: D17, 'sda': D16, bitrate: 100000}); WARNING: jshI2CSetup: driver installed, sda: 16 sdl: 17 freq: 100000, =undefined >var lcd = require('HD44780').connectI2C(I2C1); Uncaught Error: Module "HD44780" not found at line 1 col 28 var lcd = require('HD44780').connectI2C(I2C1); ^
Thanks!
I think some kind of "Energy Harvesting" would be great too!
Like this:
https://www.powerwatch.com/