Avatar for jeffmer

jeffmer

Member since Apr 2020 • Last active Sep 2020
  • 6 conversations
  • 53 comments

Most recent activity

  • in Bangle.js
    Avatar for jeffmer

    If you have loaded the app from your iPhone, you have to make sure you disconnect. In addition, it is best to:

    1) Turn off the Bluetooth on the iPhone.

    2) Enable the widget on the Bangle and restart the Bangle by turning it off in settings and then on again by pressing BTN1.

    3) When you reenable Bluetooth on the iPhone, you should then see the Pairing request.

    I have not tested it with the cutting edge build yet.

    As I point out in the documentation, reconnection is not as reliable with the standard software.

  • in ESP32
    Avatar for jeffmer

    Thanks for the kind words.

    I am not sure that having boot0.js in the firmware would help. I occasionally get a few cycles of the boot loop and the error seems to happen before any javascript code is executed.

  • in ESP32
    Avatar for jeffmer

    I have been using my two weeks of quarantine to implement an Espruino environment for the M5StickC device to simplify writing and running apps. The software and documentation is available in this Github repository..

    Here is the boot screen:

    and running an app:

    A few observations on my experience with Espruino for ESP32:

    On the positive side, it is a real pleasure developing and debugging using Espruino and the Web IDE versus the slog with using Arduino even with the help of PlatformIO. The Espruino API is a model of concision when compared with the labyrinthine set of modules and APIs it is necessary to navigate to program the M5StickC using Arduino.

    The disadvantages of ESP32 based devices for low power applications when compared with the official Espruino platforms is very apparent. For example, the only really plausible low power mode for the ESP32 is deepSleep - wakeup from which requires a complete reboot that is very slow.

    As an aside, I have augmented the ESP32 Espruino deepSleep function with a wakeup pin and will submit a pull request.

    The Arduino environment does let you adjust ESP32 processor speed which can reduce power consumption dramatically, however, this is not yet implemented for Espruino (it looks a non-trivial task) and the 240Mhz standard speed is very power hungry - see display.

  • in General
    Avatar for jeffmer

    There was a bug in flip() - now fixed.

  • in General
    Avatar for jeffmer

    Thanks - not sure I got that quite right, however, you can see my version of lcd_spi_unbuf.c here. I have not yet really tested to see if the flip() works correctly.

  • in General
    Avatar for jeffmer

    Hi, I have also being doing some measurements. I am using an M5StickC which has an 80x160 pixel ST7735S screen.
    With SPISENDMANY_BUFFER_SIZE=64
    Displaying a 80x160 FillRect = 20ms
    Displaying a 80x160 drawImage = 345ms.

    I thought there was room for improvement for drawImage so I implemented a version of lcd_spi_unbuf with a chunk buffer that is flushed to screen when it is full or when the address window is changed. Now the results are:

    With SPISENDMANY_BUFFER_SIZE=80 - the size of the chunk buffer
    Displaying a 80x160 FillRect = 19ms
    Displaying a 80x160 drawImage = 61ms.

    Essentially the speed up is achieved by passing bigger chunks to the spi_send_many. The only disadvantage is that I have had to implement a flip() routine ro flush the chunk buffer after the last graphics operation. For images this more than 5 time speed up is really worth it. I suspect it would also work for the horizontal line example.

    If the image is rotated, the performance disappears cf vertical lines, so perhaps we should see how that can be dealt with. However, rotation within an image is not a problem.

    What would be the best way of letting you all look at the code?

  • in General
    Avatar for jeffmer

    I updated my copy of lcd_spi_unbuf with the optimisation suggested by Gordon. I did the comparison for drawImage again and the lcd_spi_unbuf version is now as fast if not faster than my original driver. It’s good as I can now save heap by dispensing with the chunk buffer.

    @fanoush - yes, I had a look before - it’s really neat.

  • in General
    Avatar for jeffmer

    Having looked at the Espruino graphics C code, I can see that there is no provision for an image bit blit style callback as there is for pixels and rectangles, so I completely agree that it’s best left as it is. I am impressed that Espruino supports reasonable performance for drawImage using only Javascript.

Actions