質問

The situation:

I have a python script to connect/send signals to serial connected arduino's. I wanted to know the best way to implement a web server, so that i can query the status of the arduinos. I want that both the "web server" part and serial connection runs on the same script. Is it possible, or do i have to break it into a daemon and a server part?

Thanks, any comments are the most welcomed.

役に立ちましたか?

解決 2

For those wondering what I have opted for; I have decoupled the two part:

The Arduino daemon

I am using Python with a micro web framework called [Bottle][1] which handles the API calls and I have used PySerial to communicate with the Arduino's.

The web server

The canonical Apache and PHP; are used to make API calls to the Arduino daemon.

他のヒント

Have WAMP server. It is the easiest and quickest way. The web server will support php, python , http etc. If you are using Linux , the easiest tool for serial communication is php. But in windows php cannot read data from serial communication. Hence use python / perl etc.

Thanks

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top