[riot-notifications] [RIOT-OS/RIOT] drivers/hx711: driver and SAUL adaption for the HX711 sensor (#11416)

Philipp notifications at github.com
Tue Apr 23 16:59:13 CEST 2019


Citrullin commented on this pull request.



> +#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Initialization of the connected HX711 IC
+ */
+void hx711_init(void);
+
+
+/**
+ * @brief Read the average of a configurable times of a cleared and scaled value. Always rounded up.
+ * @param times
+ * @return returns (AVG(RAW_VALUE) - HX711_PARAM_OFFSET) / HX711_PARAM_SCALE
+ */
+int32_t hx711_get_units(uint8_t times);

Ohh, I missed that. It should be (SUM(RAW_VALUES) / TIMES - HX711_PARAM_OFFSET) / HX711_PARAM_SCALE
the raw_values are collected times times. Maybe the parameter could be better.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11416#discussion_r277723717
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190423/d95de712/attachment-0001.html>


More information about the notifications mailing list