My research on growth rates in Algae with exposures to various visible spectras(the idea is to make the process safe for at home users) caused me to whip up a quick code for exploiiting the growth curves for maximizing the output at extraction time(etime).
int greent=; int bluet=; int redt=; int maxb=; int maxg=; int maxr=; int gpin = 13; int bpin=11; int rpin=10; int levels=0; //sensor probe int etime=; // dynamic input for extraction time, can be changed in program void setup(){ pinMode(gpin, OUTPUT); pinMode(bpin, OUTPUT); pinMode(rpin, OUTPUT); pinMode(probe, INPUT); digitalWrite(bpin, LOW); digitalWrite(gpin, LOW); digitalWrite(rpin, LOW); } void loop(){ levels= probe.val for(time< etime){ //take 'time' as processor clock time if( etime-time=< maxb){ digitalWrite(bpin, HIGH); digitalWrite(rpin, LOW); digitalWrite(gpin, LOW); } if(etime-time=<maxb/2){ digitalWrite(gpin, HIGH); digitalWrite(bpin, LOW); digitalWrite(gpin, LOW); } if(levels>ideal && etime - time > threshold){ digitalWrite(rpin, HIGH); digitalWrite(bpin, LOW); digitalWrite(gpin, LOW); } }
No comments:
Post a Comment