-
Yes, its just the sending.
It's 3 to 6 times faster, depending on board.
EspruinoBoard still has to set bit by bit, correct me if I'm wrong.
ESP32 and mdbt42q sets register for 32 ports.I'm creating my own build, see https://github.com/jumjum123/EspruinoExtensions/blob/master/General/LEDBoard/makeESPRUINOBOARD.sh
Executing in an interrupt, this might help for ESP32. There I have a delay from time to time as I can see with logicanalyzer. Will take some time, but I will check this.
This does not happen with your boards, at least I never found. -
Some time ago, Gordon added some functionality to espruino which coud be used to control LED Panels.
Today some more panels, up to 128x64 are available for low money. Badly, they need 4 times the data of a 64x32 panel, and we reach a limit what can be done with Espruino itself.
Therefore I gave it a try to add new commands, written in C. Tested and running are versions for Espruino Board, ESP32 and MDBT42Q.
Status is "kind of working for me"
https://github.com/jumjum123/EspruinoExtensions/tree/master/General/LEDBoard
There are some problems with a few flickering pixels. Second problem is powersupply, my old one is working fine, but all I bought last months cause extremly flickering. -
In a maker magazin I found some ideas how to create a speech output.
To me it looked complex and expensive in terms of power, money etc.
So I created my own solution.
At the end its a small and cheap MP3 board which holds short mp3 files and is controlled by Espruino. Actual status is "working fine for me".
See more on github https://github.com/jumjum123/EspruinoExtensions/tree/master/Javascript/text2speech -
got it running at the end (HIP HIP HURRAY)
IMHO at the end its all about PYTHON version hell. No idea, why python3.6 did not accept nrfutil 6.1.0. Testing with TensorFlow and Opencv might have been the root of problems
I'm pretty sure people with more knowhow around python could explain. People like me, that want to compile Espruino only, have to walk through dessert to find some water_This is my way to find water:
- installed python3.8
- added an alias for python to python3.8 in .bashrc for user espruino
- logged out and logged in again
- installed pip with python -m pip install pip did this because pip before still pointed to python3.6. Therefore all installation had been done to .local/lib/python3.6
- installed nrfutil with python -m pip install nrfutil
now I've a folder ~/.local/lib/python3.8/site-packages.And nrfutil is installed in version 6.1.0
Next switched to folder with Espruino-installation and called - RELEASE=1 DFU_UPDATE_BUILD=1 BOARD=MDBT42Q make >tmp/stdout 2>tmp/stderr
and it worked fine. I've got my zip for uploading to MDB42Q board
- installed python3.8
-
I used pip install nrfutil==5.2.0
See https://pypi.org/project/nrfutil/#history for moreBut as long as I don't get it running, I would not suggest to change provision.sh
-
After doing some searching in the web, BTW I'm working with ubuntu 18.04.4 LTS
Actual nrfutil version is 6, but with that I get errors around installing pc-ble-driverFigured out, that nrfutil V 5.22 can be installed.
Actual installation according to pip list is..... ..... nrfutil (5.2.0) .... .... pc-ble-driver-py (0.11.4) .... ....
I've got an error and somewhere I found to do this
export LC_ALL=C.UTF-8 export LANG=C.UTF-8
But now I'm running into problems inside py-sources.
Sometimes life is not as friendly as it could be ;-( -
-
I've tried to compile firmware for MDBT42Q.
Installation of nrfutil, copied from provision.sh, fails.
Any idea?sudo pip install --ignore-installed nrfutil .... .... Collecting pc_ble_driver_py>=0.14.2 (from nrfutil) Could not find a version that satisfies the requirement pc_ble_driver_py>=0.14.2 (from nrfutil) (from versions: 0.1.0, 0.2.0, 0.3.0, 0.4.0, 0.5.0, 0.6.0, 0.6.1, 0.6.2, 0.8.0, 0.8.1, 0.9.0, 0.9.1, 0.10.0, 0.11.0, 0.11.1, 0.11.2, 0.11.3, 0.11.4) No matching distribution found for pc_ble_driver_py>=0.14.2 (from nrfutil)
-
At least in my test, it did not matter, writing data or an empty string.
writing undefined or nothing gives an error, but, surprise,surprise, a file is created.
@fanoush, Data cannot be overwritten, thats a good point. I did not read this before.
BTW, try this:st.write("a","",0,10); =true >st.read("a"); ="\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF" >st.readArrayBuffer("a"); =new Uint8Array([255, 255, 255, 255, 255, 255, 255, 255, 255, 255]).buffer >st.write("a","AB",0); =true >st.read("a") ="AB" >st.readArrayBuffer("a"); =new Uint8Array([65, 66]).buffer >st.write("a","CD",2); Uncaught Error: Too much data for file size at line 1 col 20 st.write("a","CD",2); ^ >st.write("a",[66,67],2); Uncaught Error: Too much data for file size at line 1 col 23 st.write("a",[66,67],2); ^ >st.read("a"); ="AB" >
On the other hand, this works
>st.write("a","abcd",0,10); =true >st.readArrayBuffer("a"); =new Uint8Array([97, 98, 99, 100, 255, 255, 255, 255, 255, 255]).buffer >st.write("a","efg",4); =true >st.readArrayBuffer("a"); =new Uint8Array([97, 98, 99, 100, 101, 102, 103, 255, 255, 255]).buffer >st.read("a") ="abcdefg\xFF\xFF\xFF" >
Anyway, it works for me now ;-)
-
Supporting size again did not help.
I've a different hack ;-)I'm using Storage to save some images data from GraphicsBuffer.
Creating the file was seperated from writing data.//initialization of file storage var st = require("Storage"); var fn = "b"; st.write(fn,'X',0,1024); ...... ...... //write data to file for(y = 0; y < height; y++){ st.write(fn,data_for_one_line,y * width); // write one line of graphics data }
My hack is to remove write in initialization, and add size to write of first line.
-
My idea was to define a file in storage and use it free like this:
var st = require("Storage"); var fn = "b"; st.write(fn,'X',0,20); print(st.read(fn)); st.write(fn,[64,65,66],0); print(st.read(fn));
This only works fine, if 2nd write does not use 0 for offset.
Otherwise, size is reduced to data written. In this case 3, and not 20 as defined in first write. -
-
-
Tested firmware created with script on Espruino Board from first Kickstarter campaign.
It works fine with latest release and with edge from github. Size of binary also matches those from your binaries folder
My problem is to create my own firmware.
Looks like I've to write a script to combine my firmware with bootloader. Something similiar to your create_espruino_image_1v3.sh -
I used RELEASE_2V08.
Anyway, with edge I've same problem.
Both are downloaded yesterday this way:git clone -b RELEASE_2V08 https://github.com/espruino/Espruino.git EspruinoRelease git clone https://github.com/espruino/Espruino.git EspruinoEdge
Flashing is done with IDE from local file.
To avoid misunderstanding on my side for using the script. I did
- cd to script folder
- add path for compiler to $PATH
- startet the script
Now I've a file espruino_file.bin, size is 225 kb
Would it be correct to flash this file with IDE ?
- cd to script folder
-
Firmware created on my ubuntu server does not work on board.
After flashing from local drive with IDE and reset, all 3 LED are on, and serial port is not found.
Flashing a binary from Espruino/com/binaries, same way, works fine.
My make runs this way, there is no error:cd /home/nodejs/efeu/espruino/EspruinoRelease/ export PATH=/home/nodejs/efeu/tools/gcc-arm-none-eabi-8-2018-q4-major/bin:$PATH make clean RELEASE=1 BOARD=ESPRUINOBOARD make >tmp/Espruino/log/stdout 2>tmp/Espruino/log/stderr
Comparing binaries there is a difference in size.
Mine(espruino_2v08_espruino_1r3) has 214KB and "yours" from binaries folder has 224 KBAny idea, whats going wrong on my side?
Make for ESP32 works fine, looks like something wrong with my installation for ARM ? -
-
Depending on boards we use some ports cause a shutdown after setting mode for pin, like D16.mode("output").
Testing was done to check speed of different solutions for LED-Matrix(32x64).
Started with a board from Watterott, everything worked fine.
Switching to another board reset with same configuration.
Problem could be drilled down to usage of IO16 and IO17.
D16.mode("output") and I've got a reset.
Most boards don't have pins for IO16 and IO17, so be careful, not to use them accidently -
I would like to load a binary image from sd directly to a graphicsbuffer.
The only way, it worked for me is this:var gr = Graphics.createArrayBuffer(64,32,4,{interleavex:true}); //this is a 64x32 LED matrix fs = require("fs"); var x = E.toUint8Array(fs.readFile("myFile.bin")); //myFile.bin is binary file holding 1024 bytes for(var i = 0; i < 1024; i++) gr.buffer[i] = x[i];
Using a temporary array and copy value by value in a loop looks strange to me.
And it takes a lot of CPU power to copy.
But all I tried to assign Uint8Array directly to graphics buffer, failed.
Failed in the way, that loaded image was not shown.I'm pretty sure, there is a way to do better, but I don't find it.
-
@user122861, how did you convert to tflite ?
I tried some time ago to convert from keras to tflite see Forum entry
But the result could not be used for bangle. Size was too big. -
-
NO_COMPILE is in make file for some years now.
It was added by me to have an easy method to get wrapperfiles only.
See lines 820-823 in make file (on github) .
Its used to create a UI to support blacklist handling
I checked DFU_UPDATE_BUILD and it works fine. Thanks for this hint.BTW, there is a break in handling of WRAPPERSOURCES. entrys are all relative, only tensorflow is absolute. Is there a special reason for that, or is it grown the way it is ?
...... src/jswrap_waveform.c libs/compression/jswrap_heatshrink.c libs/math/jswrap_math.c libs/graphics/jswrap_graphics.c libs/graphics/jswrap_terminal.c libs/bluetooth/jswrap_bluetooth.c /home/nodejs/efeu/espruino/EspruinoRelease/libs/tensorflow/jswrap_tensorflow.c
-
After starting make
NO_COMPILE=1 BOARD=BANGLEJS make
I get this again and again
make: *** No rule to make target 'bootloader_espruino_2v08_banglejs.elf', needed by 'bootloader_espruino_2v08_banglejs.app_hex'. Stop.
Running same with ESPRUINOBOARD runs fine
Running same with MDBT42Q fails with same messageEverything runs on RASPBERRY with gcc-arm-none-eabi-9-2020-q2-update
Any idea what I've to fix ? -
I drive a small and cheap speaker (10 pieces for 8€) directly from MP3-Board.
You can set volume from 0 to 30.
But even 30 is not very noisy.
I will check an amplifier (already ordered one for less than an €)