Except for the transistors They work, but they look like crap. I think for the next one (I'll need 3 altogether) I will just make a separate board with the resistors and transistors and it can just plug into the main board. It could be sort of an optional expansion packReally clean lines there man, nice work!
I'm using the MySql ConnectorHow is the sql data sent to the database? I can help here for sure but need a little more detail.
int counter = 0;
while ((!mySqlConnection.connected()) && (counter < 5))
mySqlConnection.connect(ip, espCfg.esp8266_Config.mySqlServerPort, espCfg.esp8266_Config.mySqlUsername, espCfg.esp8266_Config.mySqlPassword);
Serial.print("Cannot parse IP Address for Sql Server: ");
lastSqlConnCheckOkTimestamp = millis();
lastSqlConnCheckFailedTimestamp = millis();
sendError("Unable to connect to MySql");
The mySqlConnectionClose() simply did a mySqlConnection.close(); but it didn't help, just slowed things down, so now the method is empty...int fetchSensorIdList()
int _sensorCounter = 0;
PSTR("SELECT `sensorId`, `blynkSendFreqSec`, `secondsBetweenScans` FROM `%s`.`vw_active_sensor_info` where `moduleId` = %i order by `portNumber`; "),
MySQL_Cursor *cur_memList = new MySQL_Cursor(&mySqlConnection);
column_names *colsList = cur_memList->get_columns();
row_values *rowList = NULL;
rowList = cur_memList->get_next_row();
if (rowList != NULL)
for (int f = 0; f < colsList->num_fields; f++)
if (strcmp(colsList->fields[f]->name, "sensorId") == 0) sensorList[_sensorCounter].sensorId = atoi(rowList->values[f]);
if (strcmp(colsList->fields[f]->name, "blynkSendFreqSec") == 0) sensorList[_sensorCounter].blynkSendFreqSec = atoi(rowList->values[f]);
if (strcmp(colsList->fields[f]->name, "secondsBetweenScans") == 0) sensorList[_sensorCounter].secondsBetweenScans = atoi(rowList->values[f]);
} while (rowList != NULL);
mySqlConnectionClose(); // ADDED Aug 22 - does no good...
How is the sql data sent to the database? I can help here for sure but need a little more detail.
Oh oh, I'm going to do it again... Postpone?Wednesday, August 21, 2019
Rumors, whispers, and a WTH?
Some good news, I've managed to convince the
accountantwife to release a few more dollars this month for my hobby As it sits, I've got 20 pumps and 4 x 8 relay modules in my shopping baskets along with a few other goodies for some other projects. If priorities don't change before the end of the month, I will be moving forward with the automatic watering.
I know eh? I can hear the whispering... "He's said that before!"
Did you put a mySqlConnection.close() back into your code at least?The mySqlConnectionClose() simply did a mySqlConnection.close(); but it didn't help, just slowed things down, so now the method is empty...
Well it's good to hear from youSorry I haven't commented much, but following your activity. Your variable getting appended may be just be a good old-fashioned memory leak.
Yes, I had no choice... I spent two days chasing this, but such a simple fix, I had to take it for now... The difference in speed really isn't too bad, and it really doesn't matter if it takes 1 minute or 5 minutes to scan all the sensors and save the data, since I only scan every 15 minutes.Did you put a mySqlConnection.close() back into your code at least?
Yeah, it's not gonna happen this time around... my shopping list has grown, but my budget hasn't I've learned not to scrimp just because I can't afford it now, I'd rather wait and spend the money to get a quality item that's going to last, and work properly...As far as home-etching, I have yet to see a hobby version worth anything that's "affordable". If you find out, I'll be excited!
the call to connectedToSql() opens the connection to the database if it is not already connected.Just noticed this...
but later on you do the mySqlConnectionClose(); again towards the end of the routine. How does your .execute() method even work correctly on a closed connection?