Avatar for ancienthero

ancienthero

Member since Apr 2017 • Last active Jun 2017
  • 3 conversations
  • 16 comments

Most recent activity

    • 8 comments
    • 134 views
  • in JavaScript
    Avatar for ancienthero

    Yup E.setTimeZone(..) is nice
    anyway I'm on 1v92.86 and I see travis at 1v92.111 now, is there something new worth mentioning? ;)

    by the way, the new Date class with setters is amazing! it simplified my project a lot

  • in General
    Avatar for ancienthero

    You are right ;)

    When I was buying my espruinos it was only pico and board available

  • in JavaScript
    Avatar for ancienthero

    I've used this one https://www.espruino.com/binaries/travis­/master/espruino_1v92.80_pico_1r3.bin

    works like a charm!

     _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v92.80 Copyright 2016 G.Williams
    >
    >t = new Date;
    =Date { "ms": 949363217722.27758789062 }
    >t.toString();
    ="Tue Feb 1 2000 00:00:17 GMT+0000"
    >t.setHours(10);
    =949399217722
    >t.toString();
    ="Tue Feb 1 2000 10:00:17 GMT+0000"
    >t.setMinutes(10);
    =949399817722
    >t.toString();
    ="Tue Feb 1 2000 10:10:17 GMT+0000"
    >t.setFullYear(2022);
    =1643710217722
    >t.toString();
    ="Tue Feb 1 2022 10:10:17 GMT+0000"
    >t.setDate(29);
    =1646129417722
    >t.toString();
    ="Tue Mar 1 2022 10:10:17 GMT+0000"
    >t.setMonth(4);
    =1651399817722
    >t.toString();
    ="Sun May 1 2022 10:10:17 GMT+0000"
    > 
    

    Thank you!

  • in General
    Avatar for ancienthero

    This is what I was thinking , pico rev 1.5 or pico pro if you will :)

    • build in watch crystal
    • micro usb instead of type A
    • replace 0.05 GPIO pins with extra 0.1 GPIO pins (0.05 are hard to access unless you surface mount unpinned pico ). I would definitely back it on Kickstarter ;)

    On the other hand a low cost very basic board would be an affordable option for people with limited budgets

  • in General
    Avatar for ancienthero

    Thank you for checking @Gordon
    Soldering these subatomic capacitors ain't going to be easy... ;)

    if there is going to be pico rev 1.5 soldered clock crystal and capacitors would be a good idea

  • in General
    Avatar for ancienthero

    I'm 80% sure it's soldered properly - I have 2 espruinos pico soldered on both.
    Yep firmware - 1.92

  • in JavaScript
    Avatar for ancienthero

    Im using espruino Pico.

    I'm glad there is an open issue for that

    Thanks!

  • in JavaScript
    Avatar for ancienthero

    the js Date object is marvelous
    https://www.w3schools.com/jsref/jsref_ob­j_date.asp

    but it's espruino implementation is very limited so far, to be specific, we can only read from the Date object once it has been created.

    >t = new Date;
    =Date { "ms": 949363947471.30676269531 }
    >t.setHours(10);
    Uncaught Error: Function "setHours" not found!
     at line 1 col 3
    

    Im working on a time switch, I've been using date class all around, finding out that set-methods are not implemented made me (almost :P ) depressed

    setDate()   Sets the day of the month of a date object
    setFullYear()   Sets the year of a date object
    setHours()  Sets the hour of a date object
    setMilliseconds()   Sets the milliseconds of a date object
    setMinutes()    Set the minutes of a date object
    setMonth()  Sets the month of a date object
    setSeconds()    Sets the seconds of a date object
    

    Extending espruino's Date class would be extremely beneficial:
    1) easy, date, time manipulation - clocks, timers, time switches
    2) clock module wouldn't be necessary
    3) if it's about memory, we can add set-methods and remove some of these:

    • function Date.getTimezoneOffset - doesn't make sense on espruino since it's always 0;
    • Date.getTime() is almost identical with Date.now() and Date.now() makes more sense on embedded
    • Date.toUTCString is kind of useless when our timezoneOffset is always 0

    Let me know what do you think of it!

Actions