Rabu Sensor PH 4502C
Alat dan bahan ESP32 Sensor PH Kabel jumper female to female kabel data type c Sensor yang dipakai Wiring Kaliberasi Kode yang dipakai int pH_Value; float Voltage; void setup () { Serial . begin ( 9600 ); pinMode (pH_Value, INPUT); } void loop () { pH_Value = analogRead ( 34 ); Voltage = pH_Value * ( 3.3 / 4095.0 ); Serial . println (Voltage); delay ( 500 ); } Hasil dari kaliberasi larutan PH 10 yang akan dipakai untuk tes pada sensor PH Kode yang dipakai #include <Wire.h> float calibration_value = 21.34 + 1.0 ; unsigned long int avgval; int buffer_arr [ 10 ], temp; float ph_act; // Tentukan pin analog untuk sensor pH #define PH_SENSOR_PIN 34 // GPIO34 contoh, bisa ganti ke pin analog lain void setup () { Wire . begin (); Serial . begin ( 115200 ); // Baudrate umum ESP32 delay ( 2000 ); } void loop () { // Baca data analog for ( int ...