Avatar for Ritvars

Ritvars

Member since Jan 2015 • Last active Jan 2020
  • 1 conversations
  • 7 comments

Hi, my name is Ritvars.
I have luck to be a happy espruino board user for some time. And found this board and firmware very useful for my needs. Especially useful is access to programming by terminal. Actually without PC. Just need another embedded microcomputer with LCD and keyboard. Someday i wish to make experiment with this.

About me... In past, programmer in small company. Now I spend my time as electrician in factory. I like reading, watch movies and much more interesting things. But my primary interest is embedded programming and electronic DIY.

Most recent activity

  • in JavaScript
    Avatar for Ritvars

    After i turned on 'Whitespace Only' for code and modules, there is no more faults. Code downloaded to board and running like shown on video.
    In my code, i have used just module for MAX7219.
    Without any 'Minification' options turned on, downloading just hangs.

  • in JavaScript
    Avatar for Ritvars

    Brokened part of my example is found. Before posting of my code i deleted some commented lines out from code. Without thees lines code is running on board and nothing hangs. But anyway, case is wierd. Theese lines are commented anyway. Why interpreter hangs?

    //disp.raw([1,2,4,8,16,32,64,128]); // Diagonāle
    //disp.raw([255,129,129,129,129,129,129,­255]); // Kvadrāts
    //disp.raw([0,126,66,66,66,66,126,0]); // Kvadrāts-1
    //disp.raw([0,0,60,36,36,60,0,0]); // Kvadrāts-2
    //disp.raw([0,0,0,24,24,0,0,0]); // Kvadrāts-3
    

    At end of each line is comment in my native language for myself. To remember what is done already.

  • in JavaScript
    Avatar for Ritvars

    Actually it's my fault matrix, matrica. Diff between english and my native language.
    But this trinity helps. I can get board back from "another dimension". Command line is live again. Code on board is not running anyway.

  • in JavaScript
    Avatar for Ritvars

    One more thing. On terminal side cursor are in waiting mode. Its like broken terminal, when Rx or Tx line is disconnected and user still writing in console.
    And what is more wierd, i have sucessfully download code to Espruino board, cursor still hangs, i have disconnect the board from USB cable and connect back. Urra, code is running.
    Something is broken between me and board :) Probably line endings, or something more special in my OS installation.? Thanks to kernel, not me.

  • in JavaScript
    Avatar for Ritvars

    Nop. The code in right side of my IDE is the exactly like this in forum thread. When i copy/pasted to left side, is working perfectly.
    Is there special options for OS on my laptop? I'm linux user. Ubuntu derivative, Linux Mint.

    Btw, this is first time when i get some strange (no syntactic) errors or behaviour.

  • in JavaScript
    Avatar for Ritvars

    The problem in short: i have written some small light show code for 8x8 LED matrix display using MAX7219 driver. Each small part of my code is designed and tested in left side of IDE window. All seems to working as expected. When i try to run all code parts together, my Espruino board hangs and should be restarted. All my code is bellow:

    SPI2.setup({mosi:B15, sck:B13});
    var disp = require("MAX7219").connect(SPI2,C4);
    
    var matrix = [255,129,129,129,129,129,129,255,0,126,6­6,66,66,66,126,0,0,0,60,36,36,60,0,0,0,0­,0,24,24,0,0,0];
    
    setInterval(function(){
      setTimeout(function() {disp.raw(matrica.slice(0,8)); }, 10);
      setTimeout(function() {disp.raw(matrica.slice(8,16)); }, 200);
      setTimeout(function() {disp.raw(matrica.slice(16,24)); }, 300);
      setTimeout(function() {disp.raw(matrica.slice(24,32)); }, 400);
    }, 1000);
    

    There is link to Youtube video: http://youtu.be/cTESkFNigac

    Code should be buggy. Or... i can't understand where is difference between two parts of Espruino IDE.
    Btw, sorry for worst english grammar ever, still learning.

Actions