Wednesday, May 8, 2013

Difficulties faced

We faced a few issues as we moved on in the project:

Problem:  The LED matrix and the MP3 shield would not work on the same hardware SPI even if we correctly altered the chip select pin.
Solution: We implemented software SPI for the LED matrix as we had a few extra pins on the arduino.

Problem: The Bus stop reading the serial port read trash values and incorrectly updated the database.
Solution: We adjusted the minimum number of bytes read to make sure that no trash value is read. Also we set conditions in the database to avoid incorrect updation.

Problem: Developing a server that could handle multiple requests from users
Solution: We spawned a new process each time a request is made to the server by a user. We kill it after it processes the request.

Problem: Android application would crash sometimes when sending and receiving data from the android server.
Solution: We created a new thread to handle the socket connections. Only after the thread finished did we move to the next screen to display the results. This significantly reduced the untimely crashes.

Problem: Network problems would not allow connection to a remote socket and crash the application.
Solution: Implement a catch mechanism in the JAVA code to go back to the previous screen in case of network problems.

No comments:

Post a Comment