Closed mydhitz closed 2 years ago
I would recommend you to take a course in C/C++ first, there are a lot of places where you can find good resources: such as www.learncpp.com or on youtube.
No offense :)
As for your code,
row = cur_mem->get_next_row();
after this you should check if row
is valid:
if (row)
{
.....
}
Original code checked it with while (row != NULL)
which you commented out.
int condition[i] = atoi(resultsc_str());
this is not correct
use just simple int variable:
int condition = atoi(results.c_str());
if (condition > 0){
....
oh thanks for answer and helpme, i just want to read second data from db and add to variable in my arduino, but show in serial is first data. and i use this code :
do {
row = cur_mem->get_next_row();
if (row != NULL) {
strcpy(results, row->values[0]);
Serial.print("> ");
Serial.println(results);
}
} while (row != NULL);
delete cur_mem;
Do you still need help or can I close this issue?
Sent from my iPad
On Jul 19, 2018, at 4:53 AM, dito notifications@github.com wrote:
oh thanks for answer, i just want to read data from db and add to variable in my arduino
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
hi @ChuckBell i ask again, how get data from record table to variable in arduino.
i want my variable in arduino is..
i have field in database
and i use and modify this code to
when i run and show record A1, how to show record a2 and a3 in condition if, if record A1 have value 0 then disable is work and show value 0 in my serial, but if record A2 and A3 have value 1 then enable is not work