Aquarium Controller with arduino uno & ESP 01


#1

Hello I want to controll my aquarium with Cayenne as my first IoT project. I already have an arduino 1 and an esp 01(I guess it is easily connected to Cayenne however I saw some complains in the forums is it true?). I illuminate the aquarium with leds some red some yellow and the majority of them white connected to 3 different drivers for each and I want to simulate the sunset and that stuff. Also I want to schedule an automatic feeder for the fishes. And want to monitoring temperature with DS18B20. I have all this actually planed however I also want to monitoring a PH sensor I found the model ph 4502c and the web page says that I need the following code :
// pHRead.ino // Constants:- const byte pHpin = A0;// Connect the sensor’s Po output to analogue pin 0. // Variables:- float Po; void setup() { Serial.begin(9600); } void loop() { Po = (1023 - analogRead(pHpin)) / 73.07; // Read and reverse the analogue input value from the pH sensor then scale 0-14. Serial.println(Po, 2);// Print the result in the serial monitor. delay(1000);// Take 1 reading per second.

Will it work if I simply paste it on arduino IDE or want would you recomend?


#2

Yes it possible to send pH value to cayenne using this:

virtualWrite(1, Po, "analog_sensor", "null")