Hi all,
I'm trying to build a thrust stand, I watched many videos about that topic but no one have the same issue:
I have a ESC of a brushless Motor and an HX711 amplifier connected to my Arduino UNO R3. If I use them seperatly, all work fine. But if both are connected and I try to read the value of the HX711, my Brushless Motor starts to spin randomly for about 0.3s. Sometimes this happens every 3 seconds, sometimes every 10 seconds, this is really random.
Can someone help me? I am really confused, it have tried so many things.
My Connections:
ESC - Arduino:
Signal - Pin 6
GND - GND
HX711 - Arduino:
GND - GND
VCC - 5.0v
DOUT - Pin 2
SCK - Pin 3
My Arduino is connected via USB cable on my Laptop.
My Code:
#include "HX711.h"
#include <Servo.h>
const int LOADCELL_DOUT_PIN = 2;
const int LOADCELL_SCK_PIN = 3;
Servo myservo1;
HX711 scale;
void setup() {
Serial.begin(9600);
scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);
myservo1.attach(6,1000,2000);
delay(1);
myservo1.write(10);
}
void loop() {
if (scale.is_ready()) {
long reading = scale.read(); //this line produces the error
Serial.print("HX711 reading: ");
Serial.println(reading);
}
}