Breaking News

아두이노 스마트 몸무게 저울










아두이노 무게 센서를 테스트하는 영상입니다. 

시리얼 플로터



시리얼 모니터 




설정 소스코드입니다.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include "HX711.h"
#define DOUT  3 // A1
#define CLK  2 // A0
HX711 scale(DOUT, CLK);
float calibration_factor = 7280//7050 worked for my 440lb max scale setup
void setup() {
  Serial.begin(9600);
  Serial.println("HX711 calibration sketch");
  Serial.println("Remove all weight from scale");
  Serial.println("After readings begin, place known weight on scale");
  Serial.println("Press + or a to increase calibration factor");
  Serial.println("Press - or z to decrease calibration factor");
  scale.set_scale();
  scale.tare(); //Reset the scale to 0
  long zero_factor = scale.read_average(); //Get a baseline reading
  Serial.print("Zero factor: "); //This can be used to remove the need to tare the scale. Useful in permanent scale projects.
  Serial.println(zero_factor);
}
void loop() {
  scale.set_scale(calibration_factor); //Adjust to this calibration factor
  Serial.print("Reading: ");
  Serial.print(scale.get_units()*0.4535923);
  Serial.print(" kg"); //Change this to kg and re-adjust the calibration factor if you follow SI units like a sane person
  Serial.print(" calibration_factor: ");
  Serial.print(calibration_factor);
  Serial.println();
  if(Serial.available())
  {
    char temp = Serial.read();
    if(temp == '+' || temp == 'a')
      calibration_factor += 10;
    else if(temp == '-' || temp == 'z')
      calibration_factor -= 10;
  }
}
cs

동작 소스코드입니다.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "HX711.h"
#define DOUT  3 // A1
#define CLK  2 // A0
HX711 scale(DOUT, CLK);
float calibration_factor = 7280//7050 worked for my 440lb max scale setup
void setup() {
  Serial.begin(9600);
  scale.set_scale(calibration_factor); //Adjust to this calibration factor 
  scale.tare(); //Reset the scale to 0
}
void loop() {
  
  float value = scale.get_units()*0.453592;
  Serial.print("Reading: ");
  Serial.print(value, 2);
  Serial.println(" KG"); // Change this to kg and re-adjust the calibration factor if you follow SI units like a sane person
}
cs


참고 자료 :
http://bota.tistory.com/290?category=693056
http://www.instructables.com/id/Arduino-Bathroom-Scale-With-50-Kg-Load-Cells-and-H/


JE코딩 교사양성과정 | 밴드
JE창의융합코딩 서울/인천/김포/고양/파주/강서/강화 인천2호전 완정역 소재 코딩교육 교사 양성과정 전문
band.us


아두이노+ 블루투스 = 블루이노(B... : 네이버 카페
아두이노와 BLE(Bluetooth Low Energy)를 활용한 Open Source Hardware, 블루이노(BlueInno) 공식 카페
cafe.naver.com



댓글 1개:

  1. Hi, I have a questions, the number (7050) what is that?
    I have a proyect about this, but I don't know this number

    Please Help me.

    답글삭제