-
-
i couldn't work further until now - we got a new family member - a daughter :-)
i would like to take a look into
If you're happy to play around in C, another option might be to add
antialiasing to the existing Graphics library? You could then use the
vector fonts?after some hours of Google "research" i did not found resources to start into programming (or better understanding) anti-aliased vector fonts
do you have any hints where to start?
-
one interesting part is the parts list, maybe you could use such lists and affiliate links (amazon is not the cheapest for electronic parts though, are there other partner programs e.g. with uk based electronic shops?) or link e.g. to your tindie store
a cool thing could be, code and schematic side by side view, where hovering over a connected espruino pin highlights the pin on the code side, i will try that out (should be easy, it's SVG and some javascript)
If you control-click the wires (i think?) and drag, you can make them
curvedwill try that, but for me nice diagrams work better without curved wire connections
-
-
@allObjects if you looking for low power displays (but usable for faster refresh cycles) take a look at sharp memory lcd
-
thanks for all the help
@allObjects the example with modules looks like a good way to provide the function for all Espruino users, i will look into that (combined with that base64 hint from @Gordon)
-
This puts additional stress on the memory of Espruino...
as in problems with size or problems with overall usage (frequency of read/write processes)?
A bit disappointed on the lower end of it's temperature range.
according to http://www.pervasivedisplays.com/FAQRetrieve.aspx?ID=43359 :
The storage temperature range for E Ink’s newest e-paper film is now
at -25℃ to 70 ℃.
another option might be to add antialiasing to the existing Graphics
library? You could then use the vector fonts?hmm i am not sure that would be a good move, if we add anti-aliasing (4 colours or 16? just in time calculations?) it will be bigger and afaik nobody asked for anti aliasing until now
what i am after is a better documentation for creating own fonts (in the works) and maybe one additional bitmap font with a greater size
-
code works like charm, i will try to change my conversion workflow (includes parsing a C file and creating javascript)
...are there versions with touch screen available you would know of?
not that i know of, i am not sure it would make sense, the refresh cycle time goes not well with input reaction time expectations, if you google around you will find e.g. an interview (german) with a representative from pervasivedisplays who talks about touch and e-paper
...is there a reason not to use array of arrays? ...first array
charCode / ASCII value indexed... with offset of 32 (0x20)?well i use only some characters not a complete set and some number gaps (e.g. abcdefghi but no j, and so on), so i need some address mapping , hmm i will try it with a complete font, maybe it fits into the memory (depends on width/height, will be interesting to test it out)
-
Question: when you you have to update the display, do you need to
update always the whole display, or can you choose an area? -
Rectangle?technically you always need to send the complete display data (3096 bytes for GDE021A1) (see Page 35 of GDE021A1 specification
afaik when you take the power off the internal ram looses all data, maybe you could work without powering off (using deep sleep and SW reset or no reset at all)
if you combine that with an own driving circuit which provides the I2C connection from the controller you can even read out the ramfor me it is not worth the hassle... but i saw a circular wearable e-paper which looks perfect for an own Espruino low power smartwatch, maybe i try to create my own driving circuit
Kickstarter number 0288
i got my Picos via Gordons Tindie storefront :-)
-
-
project keeps going :-) attached to this post is a quick photo from my latest work on a nice looking font for this e-paper display
- 2 bit per pixel, grayscale 4 colors, font-size roughly 36, kerning included
- created with LCD Image Converter (free)
- converted to suitable array for Graphics.drawImage by myself
- 2 bit per pixel, grayscale 4 colors, font-size roughly 36, kerning included
-
-
Are there any limits on javascript object usage?
i have an object which looks like
var chars = { 80: new Uint8Array([ 0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff,0xfe,0x00,0x00, 0x03,0xff,0xff,0xe0,0x00,0x00,0x02, 0xff,0xfe,0x00,0x00,0x00,0x0b,0xff, 0xe0,0x7f,0xff,0x40,0x7f,0xfe,0x07, 0xff,0xfe,0x02,0xff,0xe0,0x7f,0xff, 0xf4,0x1f,0xfe,0x07,0xff,0xff,0x81, 0xff,0xe0,0x7f,0xff,0xf8,0x1f,0xfe, 0x07,0xff,0xff,0x42,0xff,0xe0,0x7f, 0xff,0xe0,0x2f,0xfe,0x07,0xff,0xf4, 0x07,0xff,0xe0,0x00,0x00,0x01,0xff, 0xfe,0x00,0x00,0x00,0x7f,0xff,0xe0, 0x00,0x00,0x7f,0xff,0xfe,0x07,0xff, 0xff,0xff,0xff,0xe0,0x7f,0xff,0xff, 0xff,0xfe,0x07,0xff,0xff,0xff,0xff, 0xe0,0x7f,0xff,0xff,0xff,0xfe,0x07, 0xff,0xff,0xff,0xff,0xe0,0x7f,0xff, 0xff,0xff,0xfe,0x07,0xff,0xff,0xff, 0xff,0xe0,0x7f,0xff,0xff,0xff,0xfe, 0x07,0xff,0xff,0xff,0xff,0xe0,0x7f, 0xff,0xff,0xff ]), // ... and so on, right now up to 23 attributes like the one above
i experienced some weird behaviour when i raise the sizes of the Uint8Arrays (like 50-100 elements more) --> out of memory
for the object above (including all 23 attributes) and some functions i get
{ "free": 4054, "usage": 1046, "total": 5100, "history": 2928, "stackEndAddress": 536959096, "flash_start": 134217728, "flash_binary_end": 375472, "flash_code_start": 134234112, "flash_length": 393216 }
and
>E.getSizeOf(chars); =287
i am certainly not expecting a out of memory, even if the the
chars
object would be double the size than before -
i managed the power activation/deactivation by using a NPN transistor (2n 3904 in TO-92 form, usable for breadboards) which is controlled by one of the Espruino Pico GPIOs
with this i measured values of around 4 - 16mA for the display alonewith a circuit with Pico, the e-Paper and a refresh cycle every 3 minutes i got ca. 48 hours(like 960 cycles) of one CR2032 (cheap one), after that the Pico red LED keeps flashing, i guess the voltage is too low - i measured 2.8v left
one problem i face is the combination of the 32mA for the Pico and the ~4-16mA for the display, ~50mA peaks, even for short times, are a lot for a single coin cell, it might be better to use capacitors and a voltage boost regulator or just 2 coin cells
for me it was really interesting to work this out, as the display is rather large i am ok with using a larger power supply like a small lipo battery 3.7v (smaller than the display)
-
-
take a look at http://www.paulschow.com/2016/08/epaper-business-card.html for a really cool low power consumption example
-
at the moment (absolute beginner, no solder skills, etc.) i use a ready-to-use module from NOA Labs (available at Tindie.com )
i did some light testing for power consumption
- using the multimeter it takes around 20-25mA for a display refresh cycle, which needs ca. 1s
- idle takes about 1,3mAh
- i did not try it with setting deep sleep, but i am almost confident to say the deep sleep mode with max 5uA does not help here, it is the blue led which counts for the idle current draw
- for the GDE021A1 the typical operating current is 8mA
so far i am not able to just turn it off (still learning electronic switching with transistors) completely, which means it takes some current in idle mode - checked right now - 1,3mA (there is a blue LED which is always on when powered)
it is possible to get the GDE021A1 display with SSD1606 controller without additional PCB, right now there is one seller at eBay
- using the multimeter it takes around 20-25mA for a display refresh cycle, which needs ca. 1s
-
i thought when using the VBAT pin i get the (raw) battery voltage from BAT_IN? i uploaded a picture to show what i mean
Therfore, when powering up espruino and initializing AND before
powering down the display,, these pins have all to be set input float
("input"). Only AFTER display is powered up, pins and communication -
SPI - can be initialized and set.thanks, that explained some weird behaviour
anyways it seems i found the cause for the root problem, i am using an e-paper display (SSD1606 controller with GDE021A1 display), but in a convenient ready-to-use module, which includes all the needed stuff (capacitors, etc.) for a proper working SSD1606 controller
well this module draws up to 25 mA current (at least that is what my multimeter showed me), it really works perfectly when driven by VBAT (e.g. CR2032 or 2x AA eneloops)
ok now i could use more pins like @allObjects proposed, but i will need a lot of pins for the final project (DCF77, e-paper display, maybe bluetooth BLE), i will find out if that is possible with one CR2032 :-)
the topic for electronic switches seems to be quite complicated so i take my time and start learning, i will try it with a mosfet
-
Could it perhaps be a timing issue, as displays often need a few msec
after being powered on before they're ready?checked that and upped the waiting times, had no success
You've also got to be careful that you don't power them up via their
IO lines first (eg, if you init SPI beforehand)thanks for the tip, changed the code
Shouldn't a coin cell that will never go above 3.3v be connected to
the 3.3v rail directlythe coin cell shall power the Espruino Pico and the display as well, i am not sure about this 3.3v rail, what do you mean?
...I'm sure you have looked at GPS powered by Espruino pin(s).
thx for the link, i am not sure that is the problem here, as one pin should be more than enough
but that kept me thinking, the display needs 8 pins for proper operation (SPI Clock and MOSI, and 6 more pins for e.g. chipselect)maybe the lot of pins draw too much current so the direct connection to VBAT is needed? is there enough voltage?
ok i used a multimeter - was my first time btw, it seems more of a problem with voltage, the whole circuit is around 2,3v, but the typical operation voltage for the display goes from min. 2,4v to 3,3v
-
I want to control the power for a display with using an electronic switch.
what i know / want to do:
- Espruino is powered by a CR2032 coin cell (3v, 230mAh) at BAT_IN and GND
- i want to use a GPIO to control the power of the display connected to VBAT and GND
- the display works from 1,9v - 3,3v and uses 8mA current
- i can't use the GPIO alone to drive the display, there is not enough current when using the battery (direct use of VBAT works), actually i will measure it this evening, it works when the Espruino is driven via USB
so far i am just searching and learning (i have absolutely no idea of electronics and it is a wide field for a beginner) and as far as i understand a NPN mosfet would fit here, the big question is - which one should i choose or is there a better way to switch the power for the display?
- Espruino is powered by a CR2032 coin cell (3v, 230mAh) at BAT_IN and GND
-
if you are interested in some background
- the source code of the DCF77 module can be found on the module page http://www.espruino.com/DCF77 see http://www.espruino.com/modules/DCF77.js
- it uses the setWatch function
- the important part is the option
repeat: true
which let it run continuously
- the source code of the DCF77 module can be found on the module page http://www.espruino.com/DCF77 see http://www.espruino.com/modules/DCF77.js
-
i want to provide a module for a specific display driver, so far it works perfectly - when using 4 wire SPI
the driver provides the option to use 3 wire SPI, but the data must be 9 bit (where the first bit determines a command or a data byte)
so far i have no luck with
// add 'it is data' to the data by setting an additional 9. left bit data |= (1 << 8); this.spi.write(data, chipSelectPin);
is there some module where 9 bit SPI is used already?
-
-
problem is the module starts a watch by itself, so your setInterval starts a watch every 2s, which might lead to the memory problem
but you can create a custom module locally (put it into modules folder and call it myDCF77 or something)
and use it this way
setInterval(function(){ var watchId; var result = require('myDCF77').connect(B1, function(err, date, info) { if (err) { console.log("Invalid time received: " + err); } else { console.log('Date from DCF77 ' + date.toString()); if(watchId) { clearWatch(watchId); watchId = undefined; } } }); watchId = result.watchId; }, 1200000);
... the above needs a change inside the module as
exports.connect = function(dataPin, callback) { var dcf = { last : getTime(), bits : '', watchId: undefined }; dcf.watchId = setWatch(function (e) { // Work out what bit we got var d = e.time-e.lastTime; var bit = (d<0.15)?0:1; // if we had a 2 sec gap then it's the beginning of a minute if (e.time - dcf.last > 1.5) { decode(dcf.bits, callback); dcf.bits = ""; } dcf.last = e.time; // now add this bit of data dcf.bits += bit; if (dcf.bits.length>59) dcf.bits = dcf.bits.substr(-59); }, dataPin, { edge:"falling", repeat:true, debounce:75 }); return dcf; };
keep all other functions as is
sry i did only now see the question (is it possible to subscribe to specific topics here?)
i will test it soon, but it should work out of the box
can you point to the specific mapping problem?