You are reading a single comment by @stephaneAG and its replies. Click here to read the full conversation.
  • -> haha, 'glad to hear that ;)

    -> you mean RS, EN, D4..D9 || D0..D9 ? ( I have the RW Gnd-ed fine currently - nb: never used the 'read' mode yet .. )
    => big thanks for the "guy": I'll try picking one/some up & try out having more pins left & greater speed than with the 4 wires configuration:D

    Also, I have some ( ugly :/ .. ) code that auto fades the backlight RGB between few colors ( 'd need improvements to be maybe a 'grb color fade' module ? ( .. ) ) available here:
    https://github.com/stephaneAG/Espruino_tests/blob/master/characterLcdRgbBacklightAndMike/characterLcdRgbBacklightAndMike.js

    Little question, though: using eith 8 wires or I2C is mandatory to have quicker response between lcd.clear() & the next lcd.print call ? ( I wanted to display bar graph of 16 chars max on the lcd depending on the analog value from the mike ( to be "mapped" from one "-" to 16 of them ) as a quick try ;) )

    the test code for the above quick try:

    // lcd update/ clear 
    var lcdUpdateCntr = 0;
    
    
    // listen to mike & output bar graph
    var w = new Waveform(128,{doubleBuffer:true});
    w.on("buffer", function(buf) { 
      var l = buf.length;
      var v = E.variance(buf,E.sum(buf)/l)/l;
      console.log("------------------------------------------------------------".substr(0,v));
      
      // map/adapt the result to the LCD width ( 16 chars )
      var lcdOutput = "----------------".substr(0,v);
      //lcd.clear();
      //lcd.print(lcdOutput);
      
      if ( lcdUpdateCntr < 1 ) {
        lcd.print(lcdOutput);
        lcdUpdateCntr++;
      } else if ( lcdUpdateCntr === 1 ) {
        lcdUpdateCntr++;
      }
      else if ( lcdUpdateCntr == 5 ) {
        lcdUpdateCntr = 0;
        lcd.clear();
      } else {
        lcdUpdateCntr++;
      }
      console.log('lcd update counter: ' + lcdUpdateCntr );
      console.log('variance: ' + v);
      
    });
    w.startInput(mike,2000,{repeat:true});
    

    ps: still didn't receive the pod breakout :/ ..

    +


    1 Attachment

    • IMG_0181.JPG
About

Avatar for stephaneAG @stephaneAG started