Questions tagged [espruino]

16 questions
2
votes
1 answer

Use AWS IoT Device SDK with Espruino and ESP8266

I'm trying to use the NodeMCU with Espruino IDE and Javascript to send data to AWS IoT Core. However, there's a problem because the Espruino doesn't find the aws-iot-device-sdk module. How can I import it? Or what's an alternative for what I want to…
2
votes
1 answer

Espruino save code and start on initialization

I have making a cool project. I have more or less finalized my code, which will go on a NodeMCU running Espruino. I have trouble to save this code on the Espruino. This code should do this on each boot: connect to wifi, declare all functions and…
Austris
  • 49
  • 9
1
vote
2 answers

State Machine in Node-Red, how to?

Has anyone come across an elegant solution for this? User has a BLE Puck.js Button that sends MQTT messages into Node-Red when the button is pressed. The Node-Red scenario will receive the button-press event from the puck and will start a 30 second…
HeneryH
  • 95
  • 1
  • 8
1
vote
0 answers

base64 to ArrayBuffer

Am trying to decode a base64 string containing an array buffer. After decoding all am getting is a string showing [object ArrayBuffer]. However I need the actual ArrayBuffer base64 - W29iamVjdCBBcnJheUJ1ZmZlcl0= library am using decoding -…
Abednegotm
  • 21
  • 4
1
vote
1 answer

Turn on specific LED using NeoPixel module for Espruino?

I am trying to turn on a specific LED using the NeoPixel module. How it works is really easy: Parse it a 2D array of RGB colors. Here's an example: require("neopixel").write(NodeMCU.B2, [[255, 0, 0], [0, 255, 0], [0, 0, 255]]); That will turn on…
MortenMoulder
  • 6,138
  • 11
  • 60
  • 116
0
votes
1 answer

Script for Shelly Pro 2PM that overwrites a schedule

I am trying to create a script for Shelly Pro 2PM that overwrites the following schedule: if (sunrise +15min) > 5am : Turn on @5am, Turn off @ (sunrise +15min), else: do not turn on @5am if (sunset -15min) < 7pm : Turn on @ (sunset -…
0
votes
2 answers

On ESP32 within Arduino IDE, can I run a script from a string?

I know that I can load MicroPython or Espruino(JS) on the ESP32 and run a script from there but (for several reasons outside the scope of this question) I can't do it that way. What I want is a framework written in the Arduino IDE that: 1: Loads an…
Travis
  • 1,872
  • 1
  • 16
  • 12
0
votes
0 answers

Press-and-hold / Long-Press gestures/event in espruino

Touch for screen or press key gestures are already assigned and the action is triggered when finger is released. setWatch(f_Action1, BTN1, { repeat: true }); Bangle.on('touch', function(button){ switch(button){ case 1: …
Daniel Perez
  • 431
  • 5
  • 11
0
votes
1 answer

Cannot type in Espruino IDE native with ESP32

I am trying to make a Javascript program on my ESP32 board. I have installed the Espruino IDE native edition for my computer (That's the only way I could get the IDE to connect to one of my ports). I'm able to connect to the port, but I cannot type…
0
votes
0 answers

Synchronous callbacks in javascript

Right, just so it's out the way, I'm new to JS and Espruino and so got stuck during a project; I'm trying to get the max of an array to be console.logged just after the main function is executed: const cw = 1; const ccw = 0; const dataCW = []; const…
George
  • 23
  • 7
0
votes
1 answer

how to create a buffer with out Buffer in javascript

I looking to write some code to run on a espruino ( a programable micro chip that works with javascript) to work as a bluetooth remote, I have it working perfectly in node on my laptop using node and relying heavenly on "Buffer.from" however I can't…
James C
  • 3
  • 1
0
votes
2 answers

Cannot POST with ESP8266 (espruino)

I cannot make post request (get works fine) with espruino. I've already checked the documentation and it seems pretty equal here is my code: let json = JSON.stringify({v:"1"}); let options = { host: 'https://******, protocol: 'https', …
0
votes
1 answer

Can anyone tell if i can flash javascript code on wemos d1 mini?

I am trying to figure out whether I can run javascript code on wemos d1 mini with esp-8266 chip, I was able to find resources on Arduino but not on wemos.
Rinzin
  • 53
  • 2
  • 7
0
votes
0 answers

Espruino 1.94 on ESP8266 12E does not work

I'm a newbie to this, so please bear with me. Trying to load the latest Espruino firmware 1.94 to my ESP8266 12E boards. It came with Node MCU and I used it to flash Arduino programs through it's IDE and Arduino programs worked perfectly. I have 3…
0
votes
1 answer

espruino: wifi on connect event not fired

I need to be notified when the ESP8266 get connected to the WiFi network. To do so I'm listening to the connected event in the WiFi module. The callback function is never called. The code: var wifi = require("Wifi"); wifi.on('connected',…
Fedy2
  • 3,147
  • 4
  • 26
  • 44
1
2