I'm a mechanical engineer without much electronics experience so go easy on me
I'm working on a project that requires reading a load cell and then sending the measurements along with their timestamps to a Python script for live plotting. I've got the load cell communicating with the Arduino, and the Arduino with Python over serial, however I'm having issues getting the sampling rates I would like. I'm using an HX711 board with the 80 SPS modification (checked continuity and the trace that needed to be cut is in fact cut). However, when I run my code on the Arduino I can't get any more than around 10 SPS. I've tried using both normal digital I/O as well as SPI, but it made no difference. I would greatly appreciate any help, I'm frankly at the end of my wits.
At 115200 bauds you get roughly 11520 characters out per second
If the HX711 is really spitting out data at 80 Hz you have enough time to print 144 bytes out (assuming no long blocking of interrupts) so I don’t think this is an issue here, the output buffer likely doesn’t fill up and print does not get blocking.
That being said, to play it safe it’s better to tick the box so that the serial monitor adds the time stamp and the arduino does not have to transmit it.
Testing according t suggestion in post 2 would help confirm the mode is correct
I wrote up a bit of code and it showed that it's taking a sample every 100 ms or so without the print delay. I don't understand how this can be the case, when I confirmed there was no continuity after cutting the trace on the HX711 board. I don't think such a drastic reduction in sample rate could be on the Arduino's side though, could it?