0

我必须为自动停车系统创建一个 Android 应用程序。让我给你这个应用程序开发的整体背景想法。

当我进入我的办公室时,我应该能够通过我的手机 Antroid App 找出哪个楼层有停车位。

停车位可用性信息应在我的 Android 应用程序将通过 web 服务访问的数据库中自动更新。

假设我要在每个停车位的前面放置一个传感器。因此,当一个人停车时,传感器将被激活。所以此时在我的数据库中应该输入一个新数据。

当那个人把他的车从那个停车位拿走时,我的传感器将处于非活动状态。所以此时应该从我的数据库中删除相应的数据。

所以基本上我想知道我们可以根据传感器输出进行数据库更新吗?如果是这样,我们怎么能达到?

如果您对理解我的要求有任何疑问,请告诉我。

期待您的快速回复。谢谢!

问候, Velava.S

4

1 回答 1

0

You would probably have to connect the sensors to a central server which would monitor the status of each sensor. Dependant on how the sensors worked they would either send a signal when there state changed, at fixed time intervals, or the server would have to poll input.
Once a change has been sent/recieved by the server it would update a database of all sensor states.

When your app then makes requests to this server it would respond with a formatted XML response on the availability of each floor.

I'm afraid I can't give exact details on how to connect the sensor array, most likely for this type of project it would be a custom built box, if you search around you should find some suppliers, or if you are just learning you can have a look at http://www.arduino.cc/ - these are programmable microcontrollers so you could build a prototype with them.

于 2012-07-04T10:11:49.807 回答