You are reading a single comment by @MichaelPralow and its replies. Click here to read the full conversation.
  • i thought to be clear about the attached javascript in the first post, it is not a proper module, just an example which one can use to start, right now i am working on a code version which is more in line with a real module coding-style

    For the sake of brevity - it looks like there are quite a few
    constants that are not used!

    i started with porting the complete SSD1606 diver specification, which provides a lot more than just displaying some values

    You could also shorten - COMMAND_xx to say C_xxx.

    for a proper module i thought of using

    /**
     * ...doc for each command
     */
    SSD1606.prototype.C = {
      cmd: new Uint8Array([
                          0x01,
                          0x02 // ... and so on
                          ]);
    };
    

    is that ok?

    as a newbie i am not aware of e.g.

    Best thing is to make GDE021A1.prototype.C into just var C

    i started with http://www.espruino.com/Writing+Modules and will - when it's functional - apply http://www.espruino.com/Performance

    Are there more places to get hints on best practices for programming Espruino?

About