티스토리 뷰
Arduino UNO R3 : YF-S401 연결도
Spec.
[Arduino IDE 사용] / [Visual Studio Code사용]
Arduino IDE or VS code 초기 셋팅 및 설정 참고
https://jinozblog.tistory.com/207
[Code 작성 및 시리얼모니터링]
volatile double waterFlow;
void setup()
{
Serial.begin(9600); //baudrate
waterFlow = 0;
attachInterrupt(0, pulse, RISING); //DIGITAL Pin 2: Interrupt 0
}
void loop()
{
Serial.print("waterFlow:");
Serial.print(waterFlow);
Serial.println(" L");
delay(500);
}
void pulse() //measure the quantity of square wave
{
waterFlow += 1.0 / 5880.0;
}
반응형
'python > Lecture' 카테고리의 다른 글
[arduino] DS18B20 Digital Sensor 연결 및 wifi 통신 with MariaDB (0) | 2023.11.22 |
---|---|
[arduino][python] DS18B20 Digital Sensor Bluetooth 통신 (0) | 2023.11.21 |
[arduino] CFD-02 IR Sensor 연결 및 모니터링 (0) | 2023.11.21 |
[arduino] CM1106 NDIR CO2 Sensor I2C 연결 및 모니터링 (0) | 2023.11.21 |
[arduino] DS18B20 Digital Sensor 연결 및 모니터링 (0) | 2023.11.21 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- Raspberry Pi
- git
- 자가격리
- Django
- Regression
- analysis
- 확진
- sublime text
- template
- 코로나19
- CSV
- 라즈베리파이
- Pandas
- 코로나
- ERP
- server
- DS18B20
- SSH
- r
- github
- DAQ
- MacOS
- pyserial
- vscode
- COVID-19
- Templates
- Python
- raspberrypi
- arduino
- Model
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함