-
I have the neopixelWrite working (most of the time)
Tests, about 2 weeks ago, ran with a 8 by 8 matrix, which is refreshed each 50 msecs with changing data. Handover of data works with an Uint8Array created by an Espruino Extension.
"Most of the time" because sometimes I see a flash with wrong colors. But next refresh everything is fine again.
Its tested with ESP8266-01 using D2.
AFAIK, D2 is used for logging as serial1. This is recognized by WS2812 after reset mostly. First LED is green, at least in my environment. -
-
I'm working on a native class to recognize gestures.
Input will be a distance sensor HC-SR04.
To recognize a gesture something like setWatch is used.
Its running up to the point that an interupt is recognized, but there are no args that would help to assign the interupt to a parent.
Any idea ?void gotInterrupt(int n, ... ){ jsWarn("got it %j",n); } void jswrap_Gesture_scan(JsVar *parent){ JsGesture gest; if(!getFromVar(&gest,parent)) return; IOEventFlags exti = EV_NONE; if (!jsiIsWatchingPin(gest.data.echo)) exti = jshPinWatch(gest.data.echo, true); // disable event callbacks by default if (exti) { jshSetEventCallback(exti, 0); JsVar *fn = jsvNewNativeFunction((void (*)(void))gotInterrupt, JSWAT_VOID|JSWAT_THIS_ARG|(JSWAT_JSVAR<<JSWAT_BITS)); if (!fn) return; jshSetEventCallback(exti, (JshEventCallbackCallback)jsvGetNativeFunctionPtr(fn)); jsvUnLock(fn); } }
-
I also tried to get sdcard running with ESP8266.
First problem was naming of pins in Espruino and naming on boards.
Figured out at the end that
NodeMCU.D1 is D5
NodeMCU.D2 is D4
NodeMCU.D3 is D0
NodeMCU.D4 is D2
NodeMCU.D5 is D14
NodeMCU.D6 is D12
NodeMCU.D7 is D13
NodeMCU.D8 is D15
NodeMCU.D9 is D3
NodeMCU.D10 is D1
Based on this connected D12 to mosi,D13 to miso and D14 to sck
cs of SDCard was connected to B15
Script now looked like thisvar s = new SPI(); s.setup({mosi:NodeMCU.D7,miso:NodeMCU.D6,sck:NodeMCU.D5}); E.connectSDCard(s,NodeMCU.D8 fs = require("fs"); fs.readdir();
Running this I got a reset about 2 secs later.
To get some more information, switched ESP8266Log to serial0var e = require("ESP8266"); e.setLog(2);
Running script above again error log and stackdump was sent to my terminal. This included information about the location where error occured.
First of all, there was an Fatal exception 9.
By comparing pc with listing, exception happened in check_fs (file ff.c)
Thats a part of reading boot sector on SDCard.
This point marked the end of my knowledge :-( -
There are 2 new tutorials around writing your own extensions to Espruino.
- check type of args for functions
- emit an event, based on an implementation of a Schmitt Trigger
Startpage of tutorials also changed. The old url will be forwarded to new one.
- check type of args for functions
-
Prices will drop in the future, in China its less than 3$.
Development boards should follow soon.
But its not a simple step, development for Esp32 is based on freeRtos, which would be new to Espruino.
@Kolban has thrown his hat into the arena some weeks ago.
May be we have to ask him nicely ;-) -
-
I worked with a lot of optimizations for handling arrays, including Uint8. None of them was even close to compiled C.
Yes, rotating means rotate full line or full row of a matrix. Another available option is to have a large buffer, like 16by16 and display 8by8 blocks based on input with joystick or something like that.
BTW, there are already some functions in Espruino, that could have been done easily in JavaScript like E.sum, E.interpolate, E.variance .... If there wasn't the factor called time...Hmm, video looks funny. And does'nt look too complex to be done.
But right now,my focus is to understand events deep inside Espruino.
First step will be to create something like a Schmitt Trigger having a change event.
May be once this is done,.... ;-)Tschüss für heute
-
-
Yes, and at least first one is a very good reason ;-)
- loved to do it and learned a lot
- it's much faster than java script, try to rotate in java script and you will see
- doesn't take away as many variables compared to java script
There are already a lot of special functions inside Espruino, that could be a module. May be on a long term we will have a couple of Espruino extensions which can be used to create customized firmware by sticking together firmware modules.
- loved to do it and learned a lot
-
-
I've added two more tutorials:
- handling of arguments, type arraybuffer
- handling of arguments, type object
Both are here http://jumspruino.jumware.com/docu/Extensions/CreateEspruinoExtensions.html
- handling of arguments, type arraybuffer
-
Thanks for feedback,
Not sure, I understand your question but let me try to give an answer- take a look to Add extensions from Github and Add extensions from your computer, hope this is helpful to add your custom coding
- JsCommands is used to list all commands that are available in your firmware. This includes extensions added from github or from your local computer. Another function supported by JsCommands is to blacklist JS-commands that you don't want to have in your firmware.
- there is no dictionary for custom coded extensions. To be honest I couldn't find any in github or somewhere else.
BTW, I use this tool to test and implement some extensions, which are tailor made for my needs (and interest).
Right now I'm working on a stable process to get actual Espruino Source from github (https://github.com/espruino/Espruino) once a day
- take a look to Add extensions from Github and Add extensions from your computer, hope this is helpful to add your custom coding
-
As far as I can see, rtl8710 uses ARM, FreeRTOS and has less RAM and less Flash compared to actual ESP8266. And it is more expensive than ESP8266, see http://www.aliexpress.com.
Somebody would have to build a firmware for this chip, I don't expect that this will happen soon.
But at the end, you never know .... everything could change if ESP32 comes to the market. -
There is a library called Telnet, see jswrap_telnet.c
Can a library be used like a serial port ?
As far as I understand @tve (correct me if I'm wrong), he would like to have Telnet instance already created, which can be used with all methods. -
After changing wrapper part, there is an object Telnet1 now, similiar to Serial1
Would like to have an explanation, whats happening behind the scenes, but I don't
At the end, there is an Telnet1, but I don't know what it should be used for
Reached end of my knowledge :-(/*JSON{ "type" : "object", "name" : "Telnet1", "instanceof" : "Telnet", "#if" : "defined(USE_TELNET)" } A telnet serial device that maps to the built-in telnet console server (devices that have built-in wifi only). */
-
Telnet exists in generated jswrapper.js, search in the file returns 24 times
But there is no entry for Telnet like this one for Serial1{287, JSWAT_JSVAR | JSWAT_EXECUTE_IMMEDIATELY, (void (*)(void))gen_jswrap_Serial1},
require("Telnet") returns a variable which at least can be used for switching mode
Tested on a just compiled version for ESP8266t = require("Telnet") =function () { [native code] } t.setOptions({mode:"on"}); =undefined
-
Amazon opened a new launch pad for kickstarter.
https://www.amazon.com/l/ref=sr_hi_1/13514636011
May be, this is helpful to sell boards ? -
@Gordon
Of course, feel free to add a link on your page.
Another option could be to move the md-files, which are behind my pages, into your documentation.
There is no copyright on these files, so feel free to do with it whatever is helpful for Espruino. -
In the internet are some modules with WS2812 Leds. I created extensions to Espruino, written in C to support these modules.
LED-Matrix 8*8
LED-Circles
Sources are available on github -
Gordon already created a first short tutorial how to write extensions to Espruino.
Some time ago I got some WS2812 into my hand. Graphics class was a first step into using them.
Problem started in the moment, I tried to make ssimple animations.
Speed is the name of the problem, so I started to create my first extension.
During this time, I learned a lot and now its time to add my 2 cents to documentation for Espruino -
Some time is gone since first info about my project for a service to build your own firmware.
A lot of work is done to get a first version running with a lot of functions.
The service is available here
Please give it a try, your feedback will help for future versions.Some tutorials have been created,
-
@wilberforce ,tested new version on ESP8266 512KB
@gordon ,should this be moved to ESP8266 ?- combined version (espruino_1v86_esp8266_combined_512.bin) from http://www.espruino.com/binaries/ works fine.
- creating my own combined version (some extensions to handle WS2812 matrix) works fine
- flashing from tgz-file in travis does not start
- creating my own flash based on last version from github does not start
- creating my own tgz without crypto and graphics works fine
So, there is a problem with my flashing, any idea ?
I'm using the nodemcu firmware programmer with:
boot_v1.4(b1).bin to 0x00000
espruino_esp8266_user1.bin to 0x01000
blank.bin to 0x7e000 - combined version (espruino_1v86_esp8266_combined_512.bin) from http://www.espruino.com/binaries/ works fine.
I had same problem, after switching from D2 to GPIO15(hardware and software) NOT_READY went away, but then ESP8266 crashed during reading boot sector.