Hello, I was trying to use an Arduino uno R3 to get information from a load cell (the hx711). Following tutorials, i installed the library need, plugged arduino, copied and pasted the code aaand... nothing, it says "not connected select a board and a port to connect automatically".
I checked the device manager, there is arduino, i checked the IDE, it recognizes arduino (both state com5 arduino).
The serial monitor doesn't give any output if not sometimes "clockwise" and "counter clockwise", whatever those mean, and a small banner in orange states "not connected select a board and a port to connect automatically" which now i have no idea how to solve.
The setup is:
/**
*
* How to Calibrate Your Scale
https://www.instructables.com/id/How-to-Interface-HX711-Balance-Module-With-Load-Ce/
1. Call set_scale() with no parameter.
2. Call tare() with no parameter.
3. Place a known weight on the scale and call get_units(10).
4. Divide the result in step 3 to your known weight. You should get about the parameter you need to pass to set_scale.
5. Adjust the parameter in step 4 until you get an accurate reading.
*/
#include "HX711.h"
HX711 scale(2, 3);
void setup() {
Serial.begin(9600);
scale.set_scale();
scale.tare();
Serial.println("peso 100gr e premi tasto");
while (!Serial.available()) {}
float cal = scale.get_units(10);
float peso = 100.0f; //100gr
float scale_par = cal / peso;
Serial.print("cal: ");
Serial.println(scale_par);
}
void loop() {
}
No clue what i should do now, i need help please.
Did you select a board using tools → boards?
yes, this is the situation (see attachement)
Also, not really sure it's relevant, but my is an arduino uno R3, here it just says Arduino Uno(?)
Hi @nickmoretto. I'm going to ask you to provide some additional information that might help us to identify the problem.
This procedure is not intended to solve the problem. The purpose is to gather more information.
Please do this:
- Select File > Quit from the Arduino IDE menus if it is running.
All Arduino IDE windows will close.
- Start Windows "File Explorer".
- Open the Arduino IDE installation folder.
ⓘ The default installation location is at one of the following paths:
- In the folder listing of the Arduino IDE installation folder, hold the Shift key while clicking the right hand button on the mouse.
A context menu will open.
- Select "Open PowerShell window here" from the menu.
Windows PowerShell will now open with the current directory set to the Arduino IDE installation folder.
- Type the following command in the PowerShell window:
& ".\Arduino IDE"
- Press the Enter key.
Debug output should now be printed to the PowerShell window as Arduino IDE starts.
- Wait for Arduino IDE to finish starting.
- If it is not already, connect the Arduino board to your computer with a USB cable.
- Verify you have Tools > Board > Arduino AVR Boards > Arduino Uno selected from the Arduino IDE menus.
- Verify you have the serial port of the UNO board selected from Arduino IDE's Tools > Port menu.
- If the Serial Monitor view is not already open in the bottom panel of the Arduino IDE window (as indicated by the presence of a "Serial Monitor" tab there), select Tools > Serial Monitor from the Arduino IDE menus to open it.
- Switch back to the PowerShell window.
- Press the Ctrl+Shift+A keyboard shortcut.
This will select all the text in the PowerShell window.
- Press the Ctrl+C keyboard shortcut.
This will copy the contents of the PowerShell window to the clipboard.
- Open a reply here on this forum topic by clicking the "Reply" button.
- Click the
<CODE/> icon on the post composer toolbar.
This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
- Press the Ctrl+V keyboard shortcut.
This will paste the output into the code block.
- Move the cursor outside of the code block markup before you add any additional text to your reply.
- Click the "Reply" button to publish the post.
Please let us know if you have any questions or problems while following those instructions.
You are wise to note the discrepancy, but the Tools > Board > Arduino AVR Boards > Arduino Uno selection is the correct one when using an UNO R3 board. This board definition supports the original UNO, the UNO R2, and the UNO R3, and at the time it was created there were no other UNO boards than that, so the developers just gave the board definition the general "Arduino Uno" name, which is unfortunately now a bit ambiguous as several other variants of the UNO have been created which are not supported by this Tools > Board > Arduino AVR Boards > Arduino Uno board definition.