pH Meter Arduino Code / 아두이노 pH 센서 코드
2025. 4. 13. 17:44ㆍ7080기술창고
반응형
아두이노 pH 센서

아두이노 연결 방법

pH 센서 교정 코드
#include <Arduino.h>
const int adcPin = A0; void setup() { Serial.begin(115200); } void loop() { int adcValue = analogRead(adcPin); float phVoltage = (float)adcValue * 5.0 / 1024; Serial.print("ADC = "); Serial.print(adcValue); Serial.print("; Po = "); Serial.println(phVoltage, 3); delay(1000); } |

pH 값 측정 코드
#include <Arduino.h>
const int adcPin = A0; const float m = -5.436; void setup() { Serial.begin(115200); } void loop() { float Po = analogRead(adcPin) * 5.0 / 1024; float phValue = 7 - (2.5 - Po) * m; Serial.print("ph value = "); Serial.println(phValue); delay(5000); } |

반응형
'7080기술창고' 카테고리의 다른 글
SDN(Software Defined Network) 이란? (0) | 2025.04.17 |
---|---|
미국 전략 폭격기 B-1B (1) | 2025.04.15 |
순간접착제가 굳는 것을 완벽하게 막아 끝까지 사용하는 유일한 방법 (0) | 2025.04.12 |
양배추 참치 비빔밥은 간단하면서도 맛있고 건강까지 챙길 수 있는 메뉴 (0) | 2025.03.21 |
삼성전자 / 반도체 관련주 / 반도체 연구 개발 인력 집중 근무 (0) | 2025.03.20 |