Connecting Arduino and PHP using Ethernet Shield

Hi guys, I am a newbie in this kind of programming... I am currently making a project that will make the arduino retrieve data from MySQL so that the ultrasonic sensor will be triggered.

I would like to ask if what is the way that can be I do to retrieve the data using Ethernet Shield. I did find some projects that uses this kind of method but the difference is that the sensor used in it and it is quite hard for me to understand them.

Hoping that you can help me guys.. :slight_smile: :smiley: :slight_smile:

show us some code... what did you try?

I am currently making a project that will make the arduino retrieve data from MySQL so that the ultrasonic sensor will be triggered.

I can not understand how you will trigger the ultrasonic sensor with data you retrieve from the database. Can you explain? Storing data into the database based on the data from the ultrasonic sensor makes sense. Using data from the database to trigger the sensor does not.

I did find some projects that uses this kind of method but the difference is that the sensor used in it

The source of the data is completely irrelevant, in terms of putting data into the database. The way that the the data returned is to be used is completely irrelevant in terms of getting data from the database.

I find it difficult to understand just what your project is, or what problems you are having with it.

PaulS:
Using data from the database to trigger the sensor does not.

In theory - I could see use cases where that could be the making sense: say you built a 3D model of a terrain based on camera vision, then you want to send a robot into that environment using the rough 3D terrain model to move around and make fine grain measurement in some spots where cameras did not have clear view. As your vehicle moves around, it is getting information from the SQL database for path calculation and where to take measurement to send back...

but in practice I think you are right and the OP meant the opposite, take measurement and send those to the DB :slight_smile: