Hopefully I am in the correct forum. Please forgive me if I am not.
I am using a Netduino Plus (flashed to 4.2) to communicate to a sensor with a serial interface. I had problems with it not working reliably so I started a new project with only the critical bits in play. I am seeing very similar results.
I send a serial Command to the sensors and look for a response. However in the test I set up I am using a program called Docklight, which is similar to HyperTeminal but has scripting, this can simulate the request/response serial commands of the sensor. I am seeing the same results either way.
I am using the RS-232 Shield found here
I have attached the code, but here is the issue.
I press the on-board button, Debug shows "Button Pressed" and then displays the expected response.
NOTE:
1. Request
2. Response
I press the button again, nothing happens.
Again, still nothing. Nothing happens regardless of how many times I hit the button. If I use the program Docklight to force a serial received event (send a serial message to the Netduino) then the Debug window will display the "Button Pressed" message and the expected response for however many times I hit the button.
NOTE:
1. Request
2. Response
3. Forced Response
4. Queued Request
5. Queued Request
6. Queued Request
7. Response
8. Response
9. Response
It will then function normally 1 time before hanging up again.
NOTE:
1. Request
2. Response
3. Forced Response
4. Queued Request
5. Queued Request
6. Queued Request
7. Response
8. Response
9. Response
10. Request
11. Response
The same symptoms happen even when I have an auto-scripted responses from turned OFF. I press the button and it sends the request. However, it does not display the "Button Pressed" message or send a serial request again until I force a response. I feel like I am screwing up something on the events.
Does anybody have any ideas? I am feeling stumped on this one. I am probably overlooking something very obvious to an experienced Netduino user.