<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>HX711 with nRF52832</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/65451/hx711-with-nrf52832</link><description>Hey all, I am bit late to the party but I was following Vidar&amp;#39;s HX711 Library and was able to configure it to work after a long period of time (Pardon me, I am new to this). 
 I am currently using the 15.2 SDK and ADC measurement is populating as per</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 04 Sep 2020 01:45:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/65451/hx711-with-nrf52832" /><item><title>RE: HX711 with nRF52832</title><link>https://devzone.nordicsemi.com/thread/267927?ContentTypeID=1</link><pubDate>Fri, 04 Sep 2020 01:45:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8fcb101-52b2-462e-829a-9f94be443241</guid><dc:creator>kennethaw</dc:creator><description>&lt;p&gt;My mate has an oscilloscope but it seems like there is nothing faulty, SCK and DOUT was showing up.. So I am a little skeptical about my connections and my usage of pins..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HX711 with nRF52832</title><link>https://devzone.nordicsemi.com/thread/267839?ContentTypeID=1</link><pubDate>Thu, 03 Sep 2020 12:42:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c1fae7d-b05a-4cdc-b4cb-96107c1e24a5</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;It sounds like something else must have been changed then? Could it be a bad connection? Do you have a scope/logic analyzer to inspect the data traffic on the bus lines?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HX711 with nRF52832</title><link>https://devzone.nordicsemi.com/thread/267735?ContentTypeID=1</link><pubDate>Thu, 03 Sep 2020 06:10:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c05d80da-155b-4aee-b05d-3381fd56d60d</guid><dc:creator>kennethaw</dc:creator><description>&lt;p&gt;Nope, it seems like it only establishes the connection.. Nothing much.. Showing the &amp;#39;Data len is set to 0x&amp;#39; line if it is connected.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HX711 with nRF52832</title><link>https://devzone.nordicsemi.com/thread/267730?ContentTypeID=1</link><pubDate>Thu, 03 Sep 2020 05:54:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06efcf7a-4767-480e-8d80-8f2246c91222</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Do you receive data if you revert my changes?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HX711 with nRF52832</title><link>https://devzone.nordicsemi.com/thread/267725?ContentTypeID=1</link><pubDate>Thu, 03 Sep 2020 04:56:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0576e75-97f8-4bed-9b5d-171a245cd69a</guid><dc:creator>kennethaw</dc:creator><description>&lt;p&gt;Hi Vidar, connection is established but there is still no Rx or data.. Notifications are enabled, codes are checked thoroughly, pretty odd situation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HX711 with nRF52832</title><link>https://devzone.nordicsemi.com/thread/267724?ContentTypeID=1</link><pubDate>Thu, 03 Sep 2020 04:48:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f77a73a-d50d-46d1-ab44-82b3f4bf36a7</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi, I&amp;#39;ve updated my previous reply. Please try again with the correct format specifier. The &amp;quot;%s&amp;quot; specifier was completely wrong, and it may have led to a buffer overrun actaully.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HX711 with nRF52832</title><link>https://devzone.nordicsemi.com/thread/267721?ContentTypeID=1</link><pubDate>Thu, 03 Sep 2020 04:27:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b52d1f73-718b-42fe-b891-f5e29a35c241</guid><dc:creator>kennethaw</dc:creator><description>&lt;p&gt;Hey, many thanks for the code snippet. I have tried to do the same but realised that the debugger stop logging the ADC measurements once I am connected. And when I checked with my phone, there&amp;#39;s no Rx or any data as well.. I suspect that it is coming from&amp;nbsp;&lt;strong&gt;(void)ble_nus_data_send(&amp;amp;m_nus, buffer, &amp;amp;length, m_conn_handle);&lt;/strong&gt;, for some reason, there&amp;#39;s a breakpoint on my assembly screen and I will have to continue the execution process. I am also looking at&amp;nbsp;&lt;strong&gt;uart_event_handle(app_uart_evt_t * p_event)&lt;/strong&gt; function because I feel that the data_array is probably assigned/written incorrectly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HX711 with nRF52832</title><link>https://devzone.nordicsemi.com/thread/267631?ContentTypeID=1</link><pubDate>Wed, 02 Sep 2020 12:54:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b715ebab-b41b-4b82-8343-378e0b63dc9a</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thanks. I have added the integer to string conversion with sprintf and also disabled the default 3-minute advertisement timeout in the modified main.c file below. I think the latter change may fix the connection issue you mentioned.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;main.c:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-abcdfbfa73b24ee88ceb76a53526b38c/main.c"&gt;devzone.nordicsemi.com/.../main.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Edit: &lt;/strong&gt;I used the wrong format specifier for sprintf. Was &amp;quot;%s&amp;quot;, but should have been &amp;quot;%d&amp;quot;. So you need to change from this line&lt;/p&gt;
&lt;p&gt;length = sprintf(buffer,&amp;quot;%s&amp;quot;, value);&lt;/p&gt;
&lt;p&gt;to this&lt;/p&gt;
&lt;p&gt;length = sprintf(buffer,&amp;quot;%d&amp;quot;, value);&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HX711 with nRF52832</title><link>https://devzone.nordicsemi.com/thread/267592?ContentTypeID=1</link><pubDate>Wed, 02 Sep 2020 10:19:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:afdb7285-a7b5-4606-bc11-c89b0795eef6</guid><dc:creator>kennethaw</dc:creator><description>&lt;p&gt;Sure! I really appreciate your help! As for the pinout, I have assigned it to Pin 17 for SCK and Pin 19 for DOUT, do let me know if you want a picture of the setup.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ble_5F00_app_5F00_uart_5F00_test.zip"&gt;devzone.nordicsemi.com/.../ble_5F00_app_5F00_uart_5F00_test.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HX711 with nRF52832</title><link>https://devzone.nordicsemi.com/thread/267590?ContentTypeID=1</link><pubDate>Wed, 02 Sep 2020 10:16:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a7e7ff6-a716-4c90-8b98-aeab4e42bdf6</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Could you upload the project you are working on so I can take a look? &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HX711 with nRF52832</title><link>https://devzone.nordicsemi.com/thread/267589?ContentTypeID=1</link><pubDate>Wed, 02 Sep 2020 10:13:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec438e83-3b01-4cf0-89ab-e229df345c21</guid><dc:creator>kennethaw</dc:creator><description>&lt;p&gt;Also, sometimes the connection with the peripheral is a bit odd, it often does not establish a connection and shows connecting for a long period of time..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HX711 with nRF52832</title><link>https://devzone.nordicsemi.com/thread/267587?ContentTypeID=1</link><pubDate>Wed, 02 Sep 2020 10:10:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e47d3d33-3dac-4f17-a23e-4e0a75d6008d</guid><dc:creator>kennethaw</dc:creator><description>&lt;p&gt;Hello, good afternoon to you..&lt;br /&gt;&lt;br /&gt;Attached is my data received, or the output received from peripheral.. Also, do you have any examples for sprintf? If it is possible, can you send a code snippet for the conversion on the application itself? Thank you Vidar!&lt;br /&gt;&lt;br /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Screenshot_2D00_2020_2D00_09_2D00_02_2D00_10_2D00_13_2D00_14_2D00_31_2D00_7a7aea78bb25c5878df51a56b652ca20.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HX711 with nRF52832</title><link>https://devzone.nordicsemi.com/thread/267579?ContentTypeID=1</link><pubDate>Wed, 02 Sep 2020 09:49:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f576c0e9-8096-46e8-b881-f6a5933ece10</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m happy to help:) Do you see any received data if you inspect the log? Screenshot below shows when the text string &amp;quot;hello&amp;quot; is received from the peripheral.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-abcdfbfa73b24ee88ceb76a53526b38c/Screenshot_5F00_20200902_2D00_114538_5B00_1_5D00_.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Edit: &lt;/strong&gt;Note that you can use &lt;a href="http://www.cplusplus.com/reference/cstdio/sprintf/"&gt;sprintf&lt;/a&gt; or similar to convert the decimal value to a text string before you send it over BLE.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HX711 with nRF52832</title><link>https://devzone.nordicsemi.com/thread/267513?ContentTypeID=1</link><pubDate>Wed, 02 Sep 2020 01:30:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4594a3f7-0bcd-4860-bf95-3424c3b64dcd</guid><dc:creator>kennethaw</dc:creator><description>&lt;p&gt;Hey Vidar,&amp;nbsp;many thanks for your assistance and years of service. As you mentioned nRF UART v2.0 is deprecated hence I switched to nRF Toolbox but I was not able to get any results, Rx transmitted.. It only shows connected.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HX711 with nRF52832</title><link>https://devzone.nordicsemi.com/thread/267463?ContentTypeID=1</link><pubDate>Tue, 01 Sep 2020 12:30:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7eda639f-6e30-437b-945f-a5d4c4035991</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Loadcells tend to be quite linear, so I think simple linear regression with 2 or more calibrations points should give you a fairly accurate conversion. The conversion may look something like this in your code:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;float weight;

/* Convert ADC reading to a weight measurement */
weight = (raw_sample * x + b) // &amp;#39;x&amp;#39; and &amp;#39;b&amp;#39; can be found using linear regression: https://stackoverflow.com/questions/5083465/fast-efficient-least-squares-fit-algorithm-in-c &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]Another question I have is if there is a need to configure VDD pinout.[/quote]
&lt;p&gt;This is ok. You don&amp;#39;t have to supply it through a GPIO.&lt;/p&gt;
[quote user=""]nRF UART v2.0 android application[/quote]
&lt;p&gt;&amp;nbsp;Recommend you use the UART app inside the nRF toolbox container app, or nRF connect. nRF UART v2.0 is deprecated. And remember that the received values will not be encoded as a ASCII text string, but the integer value.&lt;/p&gt;
[quote user="kennethaw"]Also, I have note that I will have to&amp;nbsp;configure optimization level to at least level 1 in order to populate the results, else it will print &amp;#39;ADC readout error&amp;#39; with a bunch of hexadecimals..[/quote]
&lt;p&gt;&amp;nbsp;The hx711.c needs to be built with optimization as you say. The program will not be able to read the GPIO input fast enough otherwise. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HX711 with nRF52832</title><link>https://devzone.nordicsemi.com/thread/267416?ContentTypeID=1</link><pubDate>Tue, 01 Sep 2020 09:44:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1641b7ac-accb-4b3a-9a05-0631eafeeb9c</guid><dc:creator>kennethaw</dc:creator><description>&lt;p&gt;Also, I have note that I will have to&amp;nbsp;configure optimization level to at least level 1 in order to populate the results, else it will print &amp;#39;ADC readout error&amp;#39; with a bunch of hexadecimals..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>