<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>MCUXpresso General中的主题 dtostrf function</title>
    <link>https://community.nxp.com/t5/MCUXpresso-General/dtostrf-function/m-p/931365#M2192</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am tried to use the dtostrf() function to convert a floating variable to a string array but I am getting the following error&amp;nbsp; ../source/AdcSdkLcd.c:128:9: warning: implicit declaration of function 'dtostrf'; did you mean 'strstr'? [-Wimplicit-function-declaration].&amp;nbsp; What should I do to convert a floating variable to a string array?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Details:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using MCUXpresso 10.3.0 IDE&lt;/P&gt;&lt;P&gt;Using Freedom Development Board FRDM-K22F&lt;/P&gt;&lt;P&gt;Trying to display an ADC voltage on a Hitachi 2X16 HD44780U Dot Matrix Liquid Crystal Display Controller/Driver&lt;/P&gt;&lt;P&gt;I am able to display an integer on the LCD with the itoa() function.&lt;/P&gt;&lt;P&gt;The ADC voltage is displaying correctly on the Tera Terminal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 31 May 2019 09:28:10 GMT</pubDate>
    <dc:creator>josephg</dc:creator>
    <dc:date>2019-05-31T09:28:10Z</dc:date>
    <item>
      <title>dtostrf function</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/dtostrf-function/m-p/931365#M2192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am tried to use the dtostrf() function to convert a floating variable to a string array but I am getting the following error&amp;nbsp; ../source/AdcSdkLcd.c:128:9: warning: implicit declaration of function 'dtostrf'; did you mean 'strstr'? [-Wimplicit-function-declaration].&amp;nbsp; What should I do to convert a floating variable to a string array?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Details:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using MCUXpresso 10.3.0 IDE&lt;/P&gt;&lt;P&gt;Using Freedom Development Board FRDM-K22F&lt;/P&gt;&lt;P&gt;Trying to display an ADC voltage on a Hitachi 2X16 HD44780U Dot Matrix Liquid Crystal Display Controller/Driver&lt;/P&gt;&lt;P&gt;I am able to display an integer on the LCD with the itoa() function.&lt;/P&gt;&lt;P&gt;The ADC voltage is displaying correctly on the Tera Terminal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 May 2019 09:28:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/dtostrf-function/m-p/931365#M2192</guid>
      <dc:creator>josephg</dc:creator>
      <dc:date>2019-05-31T09:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: dtostrf function</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/dtostrf-function/m-p/931366#M2193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In standard C, you should use sprintf- there are plenty of examples of how to do this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 May 2019 17:51:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/dtostrf-function/m-p/931366#M2193</guid>
      <dc:creator>converse</dc:creator>
      <dc:date>2019-05-31T17:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: dtostrf function</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/dtostrf-function/m-p/931367#M2194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Con Verse,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your replay.&amp;nbsp; I cannot get function sprintf to work with a floating variable.&amp;nbsp; It returns a 0.000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;char buffer1[5];&lt;/P&gt;&lt;P&gt;float value1 = 3.123;&lt;/P&gt;&lt;P&gt;sprintf(buffer1,"%5.3f", value1);&lt;/P&gt;&lt;P&gt;PRINTF("\rUsing function sprintf() to convert floating number %f to a string produces the following string: %s\n", value1, buffer1);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Tera Terminal Display:&lt;/P&gt;&lt;P&gt;Using function sprintf() to convert floating number 3.123000 to a string produces the following string: 0.000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Joseph Grigaliunas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jun 2019 10:21:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/dtostrf-function/m-p/931367#M2194</guid>
      <dc:creator>josephg</dc:creator>
      <dc:date>2019-06-03T10:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: dtostrf function</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/dtostrf-function/m-p/931368#M2195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To start with your buffer is not long enough - what about the terminating \0?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jun 2019 17:00:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/dtostrf-function/m-p/931368#M2195</guid>
      <dc:creator>converse</dc:creator>
      <dc:date>2019-06-03T17:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: dtostrf function</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/dtostrf-function/m-p/931369#M2196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Con Verse,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll try increasing the size of the buffer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't understand what terminating \0 means.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Joseph Grigaliunas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jun 2019 19:04:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/dtostrf-function/m-p/931369#M2196</guid>
      <dc:creator>josephg</dc:creator>
      <dc:date>2019-06-03T19:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: dtostrf function</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/dtostrf-function/m-p/931370#M2197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suggest it is time you learnt about strings in C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://cs.nyu.edu/courses/spring05/V22.0201-001/c_tutorial/classes/String.html" title="https://cs.nyu.edu/courses/spring05/V22.0201-001/c_tutorial/classes/String.html"&gt;Strings in C&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jun 2019 08:06:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/dtostrf-function/m-p/931370#M2197</guid>
      <dc:creator>converse</dc:creator>
      <dc:date>2019-06-04T08:06:05Z</dc:date>
    </item>
  </channel>
</rss>

