Go Down

Topic: Serial programming and php (Read 520 times) previous topic - next topic

Danni-Hansen

Hey Arduino people.

Im doing a big project in my home, and need to control some servos, from my php work.


How do i do that?
Im using a php_serial.class.php

And are not sure how to use it.

Btw.. Could not post the code here, it's to long.

PaulS

Quote
And are not sure how to use it.

You don't know how to use the php class to send data to/receive data from the Arduino or don't know how to make the Arduino receive data from the PC/send data to the PC?

Quote
Could not post the code here, it's to long.

Can you post it as an attachment?

Danni-Hansen

this is the attachment

i've also included the pde file...

PaulS

Opening the serial port when a button is pressed, and closing it, are both actions that are going to reset the Arduino. The LED will be on for less time than it takes for your eye to recognize that.

You need more buttons, with different actions. You need a connect button, that will open and configure the serial port.

You need a disconnect button to close the serial port.

In the other button callback blocks, don't open or close the serial port.

Danni-Hansen

Hey Paul.

Thanks for reply.

Can you code PHP? If yes, a little code would be greath :-)
Cause im not sure i understand what you ment.

Thanks again

Go Up