Hi,
In the example how to realize a load-cell to an ESP32 at: ESP32 with Load Cell and HX711 Amplifier (Digital Scale) | Random Nerd Tutorials I see a mechanical drawing as well as a photo with the text on top of the photo: “The following figure shows what my load cell with the acrylic plates looks like”. The construction is a little out of focus. So I can not see how you have mounted the load cell. On one end of the load-cell there are two M5 screw holes and on the other end two screw holes of M4. may I conclude that you have to use all 4 holes and that the M5 holes are used to connect the load-cell to the bottom baseplate and the M4 screws to connect the load-cell with a plate on which the objects to be weighed are placed on?
Hi.
Hi. Use the screws to mount the plates to the load cell. They must be on opposite ends.
Then, the ones made of plastic are just to stabilize the plate.
Maybe this image shows it better:
I hope this helps.
Regards,
Sara
Hi Sara,
Thank you for your reply with the photo.
I was too premature to ask because when I had scrolled down further down the page I had also found that photo.
During following the instructions how to upload the code mentioned under the line Calibrating the Scale (ESP32 with Load Cell) it seems that I have two options:
using Arduino IDE or
VS Code with Platform IO
When I take the Arduino IDE then I get a compilation error: “soc/rtc ” No such file.
Managing the library nothing about soc/rtc is found.
How can I solve this error?
When I use VS Code Platform IO then I had a bit problems with creating a new project on Platform IO.
After I have created the project I followed your steps 1 and 2 with the 1), 2) , 3), and 4) that went OK
But after I had clicked on Add to Project I had to select the project I am working on. That was ok
Then I had to include the line lib_deps = bodge/HX711@^0.7.5.
However when I opened platformio.ini I found other lib_deps from an other project apparently but I have deleted thos lines and added the line lib_deps = bodge/HX711@^0.7.5 and the line monitor _speed = 115200 was already there.
But now the question: Where do I paste your code (mentioned above) into VS CODE
Please, can you say how to go further for both options?
Thank you for your help.
Hi.
Are you using an ESP32 or ESP8266 board? Make sure you have the right board selected in Tools > Board before trying to upload the code.
In VS Code you should paste the code in main.cpp.
Take a look at this tutorial to learn more about using VS Code: https://randomnerdtutorials.com/vs-code-platformio-ide-esp32-esp8266-arduino/
Regards,
Sara
Hi Sara,
The right board ESP32 was not yet selected in Tools>Board of the Arduino IDE. When I had corrected for the ESP32 then there was no compilation error anymore. Result: The weighing machine is working now!
But then I am wondering now where the soc/rtc.h-file is found by the compiler, because the library does not show this file. Or is it a built-in file that is selected dependant of the board I have chosen with Tools>Board?
About VS Code I will take the time using your link. Thanks.