Arduino & mySql

Hello there,

To begin with, I set up my database which includes (an id (which is auto increment), username, email, and 2 more which are place0 and place1 (those two are boolean type)). Now my question is how can I connect an esp8266 directly to the database and update the booleans from 0 to 1 and back using a button for each one? Also, how can I read the boolean on the esp and turn an led for example? I need to make it to update the values for a selected user…not all of them…for example, I have users with id 1, 2, 3…i need to make the updates only on 1 if that one is selected…

Thanks very much

Nikolaos Konstantinou

NcCon

Hello @nicolascon96 !

Great to see you back. Well, the ESP will not access the database, the ESP will make a request to the server where the database is located. So, if you want to change something inside it, you must tell the ESP what instruction you want to request. For example: if you want that pressing a button of the ESP changes the id of a user for another one, you configure that within the request the ESP requests to make it.

Please, refers to this material.

Hope this could help you :grin:

2 Likes