4 Replies Latest reply on May 29, 2017 7:28 AM by guerange.patrick

    sprintf from psoc creator 2.2 to psoc creator 4.0

    guerange.patrick

      Hello,

         

       

         

      I work from a project from psoc creator 2.2 with cypress kit-014 and i try to build it with new psoc creator 4.0 and cypress kit-059

         

      with my new custom board.

         

      How modify my project to work correctly with sprintf ?

         

      sprintf doesn't work.

         

              // Calcul de la température en °Celcius
              Tx = ( Nx * q ) / 0.01 - 273.15;

         

              // Affichage du nombre Nx
              CharLCD_Position(3,0);
              CharLCD_PrintString("Nx =   ");
              CharLCD_PrintNumber(Nx);
              
              // Affichage de la température
              // avec le caractère spécial °
              CharLCD_Position(2,0);
              CharLCD_PrintString("T  = ");    
              sprintf(tstr,"%+9.4f",Tx);        
              CharLCD_PrintString(tstr);

         

       

         

      Thank you for the help.

         

       

         

      Patrick Guérangé

         

      Teacher

         

      France