-
thaks @AkosLukacs,
i'm able to display colorPaletted image, but don't understand how to use palette from object image.var img = { width : 128, height : 128, bpp : 8, buffer : require("heatshrink").decompress(atob("3143wABAaYATC4N4AAUyAC4aBG6xHRM7o4ZPg4HDAYIBDA4qAuAGz6QCCCCvFtPxPojrKAKCAJFYKBtAY77qBxYaOmR3sfMYACNBDtOB5SGJK4o3EAH4AGdZRqLPxYALbEp+sNRLxNBIQADB5QTFHAvxLUCqfD4TtJACqCECiB3+FJT9IA45sJBogACEgIVLDQr7hP1BuJAYppOAAoWQPP79OfZIHHSQoBCAAQoBD5IXG33xH4QDDAAYHHPdj9NAC6ADPwYXQH4RffAD79KBJIBQf5SQFQAz10PxzrQMAzvJQQwTMQA4A9J4T9ZPRD/MDJIDDIQPxIwQDHMSh+dAD6AHPwSACACLedDrnxfohiFaI7ZJAJQAEf56AkADr+dQBouDUxomH+J/4MxBWPOgwHJQAgRIFZqAKRSa5DPzT9eAAh5Df4iACACTgZPbIcDfpZ6QPAwuJbYLdCQQgxDGo4HDMjZ+eJBKCQPhB2CPgiAJFZ5/4fp4TGPQxwCAB42CQQQ1MF4aiDVQ4Aneqh+GPg6APMAYeBQAQ3OGIjjTPrHxIYj9PPgr1QQRiARB4T9wYR79HvB8cPwSAEf84AaORD9Kfb6CGHo6ALfdZ+UBwZ+lNQRvBQB5lVCyxAGPx58iQQzAHHREyf1y/PP1qACbII8NHoJ2jEga9JQhgXBAFhDHQBBXFAEvxfyK/CPtZsCeQJAMPtI8CP6B+BAF5IDIBbACAFL+Qfth+ENwbGLQFj/PfuCAFOYJDKK4aCmPx44DPl5qEJBSLBftHxP5w5BP1yEI3xFOf2zPEPmBuCegJGLAFD+OfuiEEZRaLBSQj9hf54SBQGj/QLAIAmP5o2Bfuz/DI5Z/ofxo2Cf+h+Df5qAlGwL/NP3CAOPw4VCAYgAYPxr/4Mgb/zGhr/EfuyAOPwj5cf6Y1DP3AABf8qVMP6BKCQHBMLM4prMfyZ/OQG5NRf7IAMPyIA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yrKFPir/aPQYADf6AABEQ6AEQg54GPxjbHIqTKFAgb5TAoZ7CQQgqJWIoaCMwwAVQRpYGPyJXHf7QBCfiKvELwaAQf5SAOf6h+FZwZ1MAZD7EfIoqGA4b9FNgYAZD4pPEA4x/EQhJLFAIr/YfSL9JAJB4Pf6xISA47/LfpanHWJYABftL/LP6JPHf7AwTfwbjMPiYBKPwbNEcgL/UKYj/LAAoRDGB5BBIYYDBfDaEKRBh+CQBj7ECIQBFf6w=")) }; function draw() { digitalPulse(LED2, true, 20); g.clear(); g.drawImage(img,0,0); g.flip(); } var g; function onInit() { A5.set(); // Backlight On var colorPalette = new Uint16Array([0, 0xFFF]); // 2 couleurs pour la palette // init spa var spi = new SPI(); spi.setup({mosi:B15 /* sda */, sck:B13 /* scl */}); g =require("ST7735").connect({ palette:colorPalette, spi:spi, dc:A7, cs:B10, rst:B1, // height : 160 // optional, default=128 }, draw ); }
-
Hello,
i 've got a small 128x128 ST7735 display, i'm able to drawString on it. happy of that.
i'll be curious to display picture on the small screen.
how to create an arrayBuffer with a bitmap picture?
is there a tool to create and compact the picture in base64 or anything else to store the picture in the espruino?is there a way to display with a descent framerate? more than 1 picture every 2sec....
sorry for that basic question, for sure the espruino is not designed to play video, but let me hope of that...
regards
éric
-
-
Hello,
it's the second time i'm asking help for this init i2C problem...
This time, i play with a small SSD1306 oled screen.
in 2017 i build some pieces with this screen and picos and every time i switch on the build, the screen init correctly.
this week i start a new project with this display (same screen batch from 2017) but i have lot of pb to initialize the screen with a boring timeout and a busy error.Have you any idea ?
retrofit with an old firmware?
is it possible to have an old google app version? (which works)
I just want to have a(n) (art)piece working (as previously). I'm suppose this not a hardware pb but a software pb...
if i use my old code, it does not work as expected (as the 2017 batch)i work with espruino pico 2.06 firmware and googl app ide (not the online one) cause i use custom local font.
regards -
ok, thanks for your time.
i extend toUpperCase() to upperCase French diacritic accents
String.prototype.toUpperCaseFr = function toUpperCaseFr() { return this.toUpperCase().replace(/à/gm, "À").replace(/â/gm, "Â").replace(/é/gm, "É").replace(/è/gm, "È").replace(/ê/gm, "Ê").replace(/ë/gm, "Ë").replace(/î/gm, "Î").replace(/ï/gm, "Ï").replace(/ô/gm, "Ô").replace(/ö/gm, "Ö").replace(/û/gm, "Û").replace(/ü/gm, "Ü").replace(/ù/gm, "Ù").replace(/ç/gm, "Ç").replace(/œ/gm,"Œ"); };
it's working.
é.
-
Hello @Gordon,
nope, minification does not help.
i'll write my own toUpperCaseDiacritic()thanks
é. -
-
If i upperCase string with accents, it does not work on accents!
let txt= "béèàîâ"; txt = txt.toUpperCase(); console.log(txt); // Béèàîâ let txtUp = "bÉÈÀÎÂ"; txtUp = txtUp.toUpperCase(); console.log(txtUp); // BÉÈÀÎÂ for( let c of txt) { console.log(c, c.charCodeAt(0)); } for( let c of txtUp) { console.log(c, c.charCodeAt(0)); }
espruino pico firmware 2v05.100 chrome appweb ide 0.73.7
-
-
-
Hello @Gordon
my Chrome app is web ide 0.73.7last week? or 2 week ago (don't remember)
i was working with a code in espruino that work great.
when i attempt to upload to my espruino pico (just modifying a typo)
the ide return:____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |____|___| _|_| |___|_|_|_|___| |_| espruino.com 2v05.100 (c) 2019 G.Williams >Uncaught SyntaxError: Got ?[233] expected ID at line 1 col 289 ...t+1','eu+2','ev+2','ez+1'],?[233]:['?[233] ?[226]+1','?[233] c+1','?[233] e+1','?[233] j+1','?[233]...
same firmware, same espruino pico...
the part code is about accents (yes again!)
i do not have this pb on June 8th!have an idea?
thanksi use custom font (no web ide) :/
const aKerning = { 'a':["ad+1","al-1","af-1","ag+0","ai-1","am+0","an-1","ap-1","ar-1","au+1","as+0","av+1"] ,'b':["bi-1","bl-1","bo+0","br-1","bs-1"] ,'c':["ci-1","cl-1","cu+1"] ,'d':["de+1","di+0","dr+0","du+1","d'+1"] ,'e':["ea+1","eb+1","ec+1","eg+1","ep-1","er+1","es+1","et+1","eu+2","ev+2","ez+1"] ,'é':["éâ+1","éc+1","ée+1","éj+1","éo+1","ép-1","ér+0","és+1","ét+1","év+2"] ,'è':["ès+1","èt+1"] ,'ê':["êt+1"] ,'Ê':["Êt-1"] ,'f':["fe+1","ff-1","fl+0","fo+1","fu+2"] ,'g':["gi-1","gn+0","gl-1","gu+1"] ,'h':["hi-1","hr-1"] ,'i':["iA+1","ib+1","ic+1","id+1","ie+1","ié+1","iè+1","ig+1","io+1","iq+2","ir+1","is+1","it+1","iv+2","ix+1","iz+1"] ,'j':["ju+1"] ,'k':["k-+2"] ,'l':["lé+0","li-1","ll-1","lv+1","l'+1"] ,'m':["ma+0","mb+0","mi+0","mm-1","mp-2","mu+1"] ,'n':["na+1","nc+1","nd+1","ne+1","né+1","nj+1","nn+0","no+1","nt+1","nv+2","nu+2"] ,'o':["ob+1","oc+1","od+2","oe-1","oè+1","og+1","oo+1","om+1","op-1","os+1","ot+1","ou+2","ow+1"] ,'ô':["ôt+1"] ,'p':["pé+0","pi-1","ph-1","pl-1","po+0","pp-2","pr-1"] ,'q':["qu+0"] ,'r':["ré+0","rg-1","ri-1","rl-1","rm-1","rn+0","rr-2","rs+1","ru+1","rv+1"] ,'s':["sa+1","sc+1","se+1","so+1","sp-1","sq+1","st+1","su+1"] ,'t':["ta+0","té+0","th-1","ti-1","tr-1"] ,'u':["ud+1","ue+1","ui+0","ul+0","um+0","un-1","up-1","uq+1","ut+1","uv+1"] ,'v':["va-1","ve-1","vi-1","vo-1","vr-1"] ,'w':["wh+0","wr-1"] ,'x':[] ,'y':["yn-1","ys-1"] ,'z':["z-+1"] };
-
@Gordon oh it works i just wanted to understand what the app ide wanted me :)
-
Hello (again),
well, i apology for this stupid question, but i'm a bit confused with the use of arraybuffer.
i'm working with a custom font, a slanted font design that need lot of process to write nicely on a screen.
i've used a pdc8544 display for testing purpose, and i'm now satisfied by my customdrawString().my idea (and that perhaps the problem, i don't know)
is to draw String (that need some process time) in a quite long arrayBuffer (for a sentence, between 20 and 60 chars) and copy a part of it on a display (a simple led matrix, 20mm with TM1640, or bigger with a max7219)my question is about copying a part of an arrayBuffer on the display.
I saw bufferArrayView.slice but i'm in sort of panic, cause i do not understand any example i saw.
In the MDN, it's to abstract for me!
And i don't know how to use it!
and it said, it produce a simple array... therefor how to transfer it to display (and it is here you laugh)if i drawString in a certain arrayBuffer, how to copy a part of this buffer (only 8x8) in an other (the display)?
I can not do that.
Sure, many of you will laugh at this, but that's how it is.I tried to use
graphic.scroll ()
(as @MaBe, suggest in an other post) but it only scrolls the displayed pixels, so only the 8 pixels of the display.
Even if I try to create a larger bufferlet g = Graphics.createArrayBuffer(64,8,1);
. (i suposse the display driver have his own buffer (8x8), that's why)
It doesn't work.i certainly missed something...
let g; function sendData() { // reset le buffer, ajoute la font, ecrit la chaine de caractères g.clear(); // efface le buffer (TM1640) g.setFont4x6(); g.drawString("hello",0,0); g.setContrast(7); /* val entre 0 et 7 - TM1640*/ // mise à jour du display g.flip(); setTimeout(scroll, 1000); } function scroll() { g.scroll(-1,0); g.flip(); setTimeout(scroll, 200); } function onInit() { require("Font4x6").add(Graphics); g = require("TM1640").connect({din: B15, clk: B13}); setTimeout(sendData, 100); }
would you have some compassion to explain to me how to do it?
i'm able to drw in an arrayBuffer but not copy a part.
thanks very much.
é.
-
hello @allObjects,
wow, it's really hard for my poor english to understand all you're writing (and goo translate is shameful)...
what is a "streak" in this particular context?The array is the char width (of a slanted font), and the index (position in the array) is the ascii code of the letter. as i use accents, i use extended ascii table (255 members)
i use an other array, an object to be accurate, for kerning letters. (i rewrited 3 time my
algorithm, and now it's quicker)
because the font is slanted, his char width is wrong withg.stringWidth(char)
.const charWidth = [,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,3,2,,4,,,,0,4,5,4,2,1,3,0,5,4,4,4,4,,,,,,,2,2,3,3,4,3,,4,4,4,4,4,4,4,4,3,4,4,4,5,4,4,4,4,4,4,3,4,4,5,4,4,4,,,,,,,4,4,3,3,3,3,5,5,2,4,4,3,6,4,3,6,4,5,3,3,3,4,5,4,5,4,,,,,,,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,4,,4,,4,,,4,4,4,4,4,,,,,,,,,,,,,,,,,,,,,3,,4,,,,,3,3,3,3,3,,,3,3,,,,,3,,3,,,3,,3,3,,,2]; const aKerning = { 'a':["ad+1","al-1","af-1","ag+0","ai-1","am+0","an-1","ap-1","ar-1","au+1","as+0","av+1"] ,'b':["bi-1","bl-1","bo+0","br-1","bs-1"] ,'c':["ci-1","cl-1","cu+1"] ,'d':["de+1","di+0","dr+0","du+1","d'+1"] ,'e':["ea+1","ec+1","eg+1","ep-1","er+1","es+1","et+1","eu+2","ev+2","ez+1"] ,'é':["éâ+1","éc+1","ée+1","éj+1","éo+1","ép-1","ér+0","és+1","ét+1","év+2"] ,'è':["ès+1","èt+1"] ,'ê':["êt+1"] ,'Ê':["Êt-1"] ,'f':["fe+1","ff-1","fl+0","fo+1","fu+2"] ,'g':["gi-1","gn+0","gl-1","gu+1"] ,'h':["hi-1","hr-1"] ,'i':["iA+1","ib+1","ic+1","id+1","ie+1","ié+1","iè+1","ig+1","io+1","iq+2","ir+1","is+1","it+1","iv+2","ix+1","iz+1"] ,'j':["ju+1"] ,'k':[] ,'l':["lé+0","li-1","ll-1","lv+1","l'+1"] ,'m':["ma+0","mb+0","mi+0","mm-1","mp-1","mu+1"] ,'n':["na+1","nc+1","nd+2","ne+2","né+1","nj+1","nn+0","no+1","nt+1","nv+2","nu+2"] ,'o':["ob+1","oc+1","od+2","oe-1","oè+1","oo+1","om+1","op-1","os+1","ot+1","ou+2","ow+1"] ,'p':["pé+0","pi-1","ph-1","pl-1","po+0","pp-2","pr+0"] ,'q':["qu+0"] ,'r':["ré+0","rg-1","ri-1","rl-1","rm-1","rn+1","rr-2","rs+1","ru+1","rv+1"] ,'s':["sa+1","sc+1","se+1","so+1","sp-1","sq+1","st+1","su+1"] ,'t':["ta+0","té+0","th-1","ti-1","tr-1"] ,'u':["ud+1","ue+1","ui+0","ul+0","um-1","un-1","up-1","uq+1","ut+1","uv+1"] ,'v':["va-1","ve-1","vi-1","vo-1","vr-1"] ,'w':["wh+0","wr-1"] ,'x':[] ,'y':["yn-1","ys-1"] ,'z':["z-+1"] };
i rewrite the array
aKerning
with the comma at the beginning of the line (easier to read ;). Thanksé.
-
with this a partially fill array, the web ide send me a message about elision.
what i'm suppose to do?
i do not understand the message!
i do not want to fill the array, if it's empty, it's "undefined", i test it and do something if it true or not...Would you explain goo doesn't answer to me :/ (sorry)
do i have to change something, because it seems to work on the espruino!thanks for your help
const lL = [,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,2,2,,4,,,,0,4,4,,5,,3,2,4,0,1,,,,,,,,,2,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,4,,4,,,,4,4,3,3,3,3,5,5,2,3,4,3,6,4,3,6,4,5,3,3,3,4,5,4,5,4,,,,,,,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,4,,4,,,,,3,3,3,3,3,,,2,2,,,,,3,,3,,,3,,3,3,,,2]; for (const l of lL) { if (l == undefined) { console.log("vide"); } else { console.log(l); } }
-
thanks @Gordon, it's working with r100 :)
é.
-
Hello @Gordon
i'm testing code with pcd8054 lcd.
the example works well with 2.04 firmware, but not with the 2.05 firmware. (i updated to try the scale factor feature on Font).
If i downgrade to 2.04 it works again...SPI1.setup({ sck:B3, mosi:B5 }); var g = require("PCD8544").connect(SPI1, B6 /*DC*/, B7 /*CE*/, B8 /*RST*/, function() { g.clear(); g.drawString("Hello",0,0); g.drawLine(0,10,84,10); g.flip(); });
____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |____|___| _|_| |___|_|_|_|___| |_| espruino.com 2v05 (c) 2019 G.Williams > Uncaught InternalError: Timeout on SPI RX at line 1 col 30 b.write([33,191,20,6,32,12],d);void 0!==e&&e() ^ in function called from system
-
Thanks @NebbishHacker for the code.
the slanted font need a different width to have a good kerning.
I use a fixed size font of 9x8 px.
i had an array to specify the with of each letter for a correct kerning// a b c d e f g h i j k l m n o p q r s t u v w x y z var largeurLettres = [3,0,0,0,6,5,4,0,3,5,5,3,8,0,0,0,5,5,0,4,0]; function drawStringSlanted(text, x, y) { var largeur = 0; for (var char of text) { g.drawString(char, x, y); index = char.charCodeAt(0); // 65 is my offset in the array for lowercase (i do not draw all the font) and 32 for my first char (space) x += (largeurLettres[index-(65-32)]+ 2); } }
-
thanks @NebbishHacker, but the question is now to overlap on previous drawn letter.
Cause with a slanted font the width's letter is not the place for the next letter as in comment #21 -
ok!
is there a simplier way to draw?
can i draw with drawString only one letter in an image?
i prefer the way you use a font with a picture than use x, space and carrier return...to draw my font... it look like in Arduino.well and after using
drawImage
i suppose i have to paste the drawing withg.drawImage(img,0,0)
?
can i overlapping ?
0+1 = 1
1+1 = 0
1+0 = 1
?in Photoshop it's call "product" mode. black is transparent (0), white is opaque (1)
é.
-
Thanks @gordon for you explanations
In fact, I am really sad to have to abandon the ide in chromeApp, it was very practical and had fewer limitations than the online ide.
Goog pretends to abandon techs that bring him nothing. they hit us regularly ... grré.
-
-
Hello,
I go back up and update this post with a question about kerning again! (yes i'm graphic designer with graphic design concerns)
I asked my students to draw a ** slanted ** font on an LED matrix to be able to work on the graphics of the texts displayed. (of course if the work is successful we will share the drawn fonts)
This time I need to decrease the space between the letters (i think, not sure)
Perhaps I am wrong on the mode of operation, but if the text algorithm, detects the last drawn pixel of a letter then adds a space of 1 pixels, on a slanted font, the kerning will be too large.
I wish I could chain the letters a pixel or two kerning, like the example provided. (for my point of view, the kerning is too short)
@Gordon, Do you think DrawString is able to draw font as in the picture?
regards
Hello,
i'm graphic designer and a 4bit mac paletted image is not optimised for displaying grayscale image as this palette contain only 4 grayscale levels... sad...
i've tried to optimized with a generic 2bit-grayscale palette with photoshop([#000000,#676767,#b6b6b6,#ffffff]) from https://lospec.com/palette-list/2-bit-grayscale
if i use your tool the palette does not match and the tool rebuild the paletted image and loose 1 color pix even in flat mode.
how can i manage to encode the image as is?
regards