Mam pytanie - czy użyć kodu i bibliotek dla DFRduino UNO R3 w c dla atmega 16, oto przykład kodu który znalazłem:
/*
* description:
* The sample code for digital weight scale of hx711. The weight will be printed in the serial.
* library host on https://github.com/aguegu/ardulibs/tree/3cdb78f3727d9682f7fd22156604fc1e4edd75d1/hx711
* connection:
Hx711.DOUT - pin #A2
Hx711.SCK - pin #A3
*/
#include <Hx711.h>
Hx711 scale(A2, A3);
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.print(scale.getGram(), 1);
Serial.println(" g");
delay(200);
}
/*
* description:
* The sample code for digital weight scale of hx711. The weight will be printed in the serial.
* library host on https://github.com/aguegu/ardulibs/tree/3cdb78f3727d9682f7fd22156604fc1e4edd75d1/hx711
* connection:
Hx711.DOUT - pin #A2
Hx711.SCK - pin #A3
*/
#include <Hx711.h>
Hx711 scale(A2, A3);
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.print(scale.getGram(), 1);
Serial.println(" g");
delay(200);
}