Avatar for krishna

krishna

Member since Feb 2015 • Last active Jan 2016
  • 3 conversations
  • 10 comments

Most recent activity

  • in JavaScript
    Avatar for krishna

    Hi Gordon,
    in this project we are trying transmit GPS data on "NRF"... this is the script which i am using.

    var data=command.test();
    var arr = [];
    data+=command.gps();
    
    eval(data);
    eval(Modvar.nrf());
    Serial2.setup(9600);
    Serial5.setup(9600);
    Serial5.on('data', function (data) { print(+data); });
    function onInit(){nrf.init([0,0,0,0,2],[0,0,0,0,1­]);}
    onInit();
    setInterval(function() {
      nrf.masterHandler();
    //  print(process.memory());
    }, 50);
    
    function nrf_print(data){
    
     // var i =nrf.sendString("\n"+data);
      print("result :"+data);
       
    }
    
    
    //eval(command.gps());
    
    var gps =ConnectGps(Serial2, function(data) {
    
       if(data.tag == "GGA")
       {
         console.log("\r\n lat:" +data.lat);
         console.log("\r\n lon:" +data.lon);
         console.log("\r\n fix:" +data.fix); 
    
         // lat
         arr[6] =  parseInt(data.lat[0],10)*10 +  parseInt(data.lat[1],10);
         arr[7] =  parseInt(data.lat[3],10)*10 +  parseInt(data.lat[4],10);
         arr[8] =  parseInt(data.lat[5],10)*10 +  parseInt(data.lat[6],10);
    
         // lon
         arr[9] =  parseInt(data.lon[0],10)*10 +  parseInt(data.lon[1],10);
         arr[10] =  parseInt(data.lon[3],10)*10 +  parseInt(data.lon[4],10);
         arr[11] =  parseInt(data.lon[5],10)*10 +  parseInt(data.lon[6],10);
       }
    
    
     else if(data.tag == "RMC")
      {
    
        console.log("\r\n time:" +data.time);
        console.log("\r\n date:" +data.date);
        console.log("\r\n speed:" +data.speed);
    	console.log("\r\n valid:" +data.valid);
    	console.log("\r\n course:" +data.course);
    
        // time  
        arr[0] =  parseInt(data.time[0],10)*10 +  parseInt(data.time[1],10);
        arr[1] =  parseInt(data.time[3],10)*10 +  parseInt(data.time[4],10);
        arr[2] =  parseInt(data.time[7],10)*10 +  parseInt(data.time[8],10);
    
        // date
        arr[3] =  parseInt(data.date[0],10)*10 +  parseInt(data.date[1],10);
        arr[4] =  parseInt(data.date[3],10)*10 +  parseInt(data.date[4],10);
        arr[5] =  parseInt(data.date[7],10)*10 +  parseInt(data.date[8],10);
    
        // valid
        arr[12] = data.valid[0];
    
        // speed 
        arr[13] = parseInt(data.speed,10);
        nrf_print(arr);
      }
       
    });
    

    in this

    nrf_print(arr);
    

    if i changed this one to static data like nrf_print("Helloworld"); there is no problem with memory... i think this "arr "array is creating some problem...

    Thanks
    Vishnu

  • in General
    Avatar for krishna

    Thanks for reply...!!

    • 4 comments
    • 1,867 views
  • in Interfacing
    Avatar for krishna

    Iam using STM32F103VCT6 espruino board,
    with espruino_1v77.
    still the result was all zeros.
    Thanks for reply....!!!

    • 14 comments
    • 4,989 views
  • in General
    Avatar for krishna

    How much the size of memory available to use in espruino(STM32F103VCT6) board...??

  • in Interfacing
    Avatar for krishna

    yes it will help full to me.
    but,
    I tried this but the result was all zeros

  • in Interfacing
    Avatar for krishna

    yes i can..
    but how many times can i do the read and write operations to the AT24 series EEPROM?

  • in Interfacing
    Avatar for krishna

    ya i knw that but i have to make use of NVRAM.
    thanks for your reply...!!

  • in Interfacing
    Avatar for krishna

    can any body give me the sample code for DS1307??

Actions