i have tried compiling the following code in Arduino IDE 0023 , because there was some incompatibility issues with IDE V1.0 or above
//Compatible with Arduino IDE 22/23
#include <sunflower.h> //library
#define MoistureSensor 3 // the port moistureSensor connected to
sunflower flower;
void setup()
{
Serial.begin(115200); //Baudrate 115200
flower.Initialization(); //Initialization
}
void loop()
{
flower.SerialSet(MoistureSensor);
//get the settings from the PC software and the moisture value
flower.process(); //get the temperature and humidity value
flower.Potentiometer(); //get the watering threshold value
flower.print();
//output data including temperature, humidity, watering threshold value, moisture value.
delay(500);
}
on compiling i have recieved the following ERROR:
sketch_oct23a:11: error: 'class sunflower' has no member named 'SerialSet'
sketch_oct23a:14: error: 'class sunflower' has no member named 'Potentiometer'
Well this is what the potentiometer should do according to the instructions:
You can rotate the potentiometer on the board to change the watering threshold value. Once the
soil moisture value reaches the threshold value, the system will start to water the plant.
The potentiometer is to set the watering threshold value according to the following range of analog values received from the soil moisture sensor :
0 ~300 : dry soil
300~700 : humid soil
700~950 : in water
So it would be preferable to set the watering threshold to 700~950 : in water!
And for the
flower.SerialSet(MoistureSensor);
//get the settings from the PC software and the moisture value
....I found this code in the library in sunflower.cpp found in the AFWS sample code that i mentioned above and i was wondering if this is the part of the code that gets the settings from the PC software and the moisture value too