Thanks, this time I achieved that through LST, and selective leaf removal. I left more leaves on the branches that I wanted to grow taller.I really like how you have each plant canopy so nice and level. I am going to have to back-read your technique!
Lovely clear code, thia is why I hate the fact that java was my first language lol the code would of been 2-3 times longer with instantiating the class and all that ballsCode:#define CZR_HUMIDITYone 0x1000 #define CZR_FILTLEDone 0x0800 #define CZR_RAWLEDone 0x0400 #define CZR_MAXLEDone 0x0200 #define CZR_ZEROPOINTone 0x0100 #define CZR_RAWTEMPone 0x0080 #define CZR_FILTTEMPone 0x0040 #define CZR_FILTLEDSIGNALone 0x0020 #define CZR_RAWLEDSIGNALone 0x0010 #define CZR_SENSTEMPone 0x0008 #define CZR_FILTCO2one 0x0004 #define CZR_RAWCO2one 0x0002 #define CZR_NONEone 0x0001 #define CZR_HTCone (CZR_HUMIDITYone | CZR_RAWTEMPone | CZR_RAWCO2one) #define CZR_COMMANDone 0x00 #define CZR_STREAMINGone 0x01 #define CZR_POLLINGone 0x02 #define CZR_HUMIDITYtwo 0x1000 #define CZR_FILTLEDtwo 0x0800 #define CZR_RAWLEDtwo 0x0400 #define CZR_MAXLEDtwo 0x0200 #define CZR_ZEROPOINTtwo 0x0100 #define CZR_RAWTEMPtwo 0x0080 #define CZR_FILTTEMPtwo 0x0040 #define CZR_FILTLEDSIGNALtwo 0x0020 #define CZR_RAWLEDSIGNALtwo 0x0010 #define CZR_SENSTEMPtwo 0x0008 #define CZR_FILTCO2two 0x0004 #define CZR_RAWCO2two 0x0002 #define CZR_NONEtwo 0x0001 #define CZR_HTCtwo (CZR_HUMIDITYtwo | CZR_RAWTEMPtwo | CZR_RAWCO2two) #define CZR_COMMANDtwo 0x00 #define CZR_STREAMINGtwo 0x01 #define CZR_POLLINGtwo 0x02 class COZIRone { public: COZIRone(Stream*); void initone(); float Celsiusone(); float Fahrenheitone(); float Humidityone(); uint32_t CO2one(); uint16_t CalibrateFreshAirone(); void SetDigiFilterone(uint8_t ); uint8_t GetDigiFilterone(); void SetOutputFieldsone(uint16_t ); void GetRecentFieldsone(); void GetVersionSerialone(); void GetConfigurationone(); private: Stream *serone; char buffer[64]; void SetOperatingModeone(uint8_t modeone); void Commandone(const char* ); uint32_t Requestone(const char* ); }; class COZIRtwo { public: COZIRtwo(Stream*); void inittwo(); float Celsiustwo(); float Fahrenheittwo(); float Humiditytwo(); uint32_t CO2two(); uint16_t CalibrateFreshAirtwo(); void SetDigiFiltertwo(uint8_t ); uint8_t GetDigiFiltertwo(); void SetOutputFieldstwo(uint16_t ); void GetRecentFieldstwo(); void GetVersionSerialtwo(); void GetConfigurationtwo(); private: Stream *sertwo; char buffer[64]; void SetOperatingModetwo(uint8_t modeone); void Commandtwo(const char* ); uint32_t Requesttwo(const char* ); }; COZIRone::COZIRone(Stream * strone) { serone = strone; } COZIRtwo::COZIRtwo(Stream * strtwo) { sertwo = strtwo; } void COZIRone::initone() { // overide default streaming (takes too much perf SetOperatingModeone(CZR_POLLINGone); // delay for initialization } void COZIRtwo::inittwo() { // overide default streaming (takes too much perf SetOperatingModetwo(CZR_POLLINGtwo); // delay for initialization } void COZIRone::SetOperatingModeone(uint8_t modeone) { sprintf(buffer, "K %u", modeone); Commandone(buffer); } void COZIRtwo::SetOperatingModetwo(uint8_t modetwo) { sprintf(buffer, "K %u", modetwo); Commandtwo(buffer); } //polling modeone------------------------------------------------------ float COZIRone::Fahrenheitone() { return (Celsiusone() * 1.8) + 32; } float COZIRone::Celsiusone() { uint16_t rvone = Requestone("T"); float fone = 0.1 * (rvone - 1000.0); return fone; } float COZIRone::Humidityone() { return 0.1 * Requestone("H"); } uint32_t COZIRone::CO2one() { return Requestone("Z"); } //polling modeone------------------------------------------------------ float COZIRtwo::Fahrenheittwo() { return (Celsiustwo() * 1.8) + 32; } float COZIRtwo::Celsiustwo() { uint16_t rvtwo = Requesttwo("T"); float fone = 0.1 * (rvtwo - 1000.0); return fone; } float COZIRtwo::Humiditytwo() { return 0.1 * Requesttwo("H"); } uint32_t COZIRtwo::CO2two() { return Requesttwo("Z"); } //CALIBRATION MODE--------------------------------------------------- uint16_t COZIRone::CalibrateFreshAirone() { return Requestone("G"); } uint16_t COZIRtwo::CalibrateFreshAirtwo() { return Requesttwo("G"); } //SET DIGITAL FILTERING---------------------------------------------- void COZIRone::SetDigiFilterone(uint8_t valueone) { sprintf(buffer, "A %u", valueone); Commandone(buffer); } uint8_t COZIRone::GetDigiFilterone() { return Requestone("a"); } void COZIRtwo::SetDigiFiltertwo(uint8_t valuetwo) { sprintf(buffer, "A %u", valuetwo); Commandtwo(buffer); } uint8_t COZIRtwo::GetDigiFiltertwo() { return Requesttwo("a"); } //READ SERIAL---------------------------------------------------------- void COZIRone::GetRecentFieldsone() { Commandone("Q"); } void COZIRtwo::GetRecentFieldstwo() { Commandtwo("Q"); } //COMMAND MODE---------------------------------------------------------- void COZIRone::GetVersionSerialone() { Commandone("Y"); } void COZIRone::GetConfigurationone() { Commandone("*"); } void COZIRtwo::GetVersionSerialtwo() { Commandtwo("Y"); } void COZIRtwo::GetConfigurationtwo() { Commandtwo("*"); } //PRIVATEone------------------------------------------------------------------------------------------------- void COZIRone::Commandone(const char* sone) { // TODO // CZR_Serial.println(s); serone->print(sone); serone->print("\r\n"); } uint32_t COZIRone::Requestone(const char* sone) { Commandone(sone); // empty buffer buffer[0] = '\0'; // read answer; there may be a 100ms delay! // TODO: PROPER TIMEOUT CODE. delay(200); int idxone = 0; while (serone->available()) { buffer[idxone++] = serone->readBytesUntil(0x0A, buffer, 64); } buffer[idxone] = '\0'; uint32_t rvone = 0; switch (buffer[0]) { case 'T' : rvone = atoi(&buffer[5]); if (buffer[4] == 1) rvone += 1000; // negative values are mapped above 1000..1250 => capture this in Celsius() break; default : rvone = atol(&buffer[2]); break; } return rvone; } //PRIVATEtwo------------------------------------------------------------------------------------------------ void COZIRtwo::Commandtwo(const char* stwo) { // TODO // CZR_Serial.println(s); sertwo->print(stwo); sertwo->print("\r\n"); } uint32_t COZIRtwo::Requesttwo(const char* stwo) { Commandtwo(stwo); // empty buffer buffer[0] = '\0'; // read answer; there may be a 100ms delay! // TODO: PROPER TIMEOUT CODE. delay(200); int idxtwo = 0; while (sertwo->available()) { buffer[idxtwo++] = sertwo->readBytesUntil(0x0A, buffer, 64); } buffer[idxtwo] = '\0'; uint32_t rvtwo = 0; switch (buffer[0]) { case 'T' : rvtwo = atoi(&buffer[5]); if (buffer[4] == 1) rvtwo += 1000; // negative values are mapped above 1000..1250 => capture this in Celsius() break; default : rvtwo = atol(&buffer[2]); break; } return rvtwo; }
This is the code to get two COZIR GC-0020 0-2000ppm sensors working on an Arduino mega2560; I'm using two of the hardware serial ports.
Thanks, you just reminded me that I need to upload the latest. I'll do that a bit later.Lovely clear code, thia is why I hate the fact that java was my first language lol the code would of been 2-3 times longer with instantiating the class and all that balls
Thank you. It's lower than the tap water where we used to live.Hey nice journal Dstroy!
I like to see how you keep your ppm running low.
good job
Some people (included me) start thinking you have to push your plants to 1000 sometimes 1200ppm and end up burning the ladies.Thank you. It's lower than the tap water where we used to live.
ThanksSome people (included me) start thinking you have to push your plants to 1000 sometimes 1200ppm and end up burning the ladies.
its good to see you can go on flowering with 300 range without any issues.
I will keep my eyes on your journal!
Thanks, I'm still learning. I will later.