pepijndevos wrote:Amazing, do share the result What needs to be implemented? I suppose the sensor does the TCP/IP stuff already?
I have it so that I can set up the DIWIFI for a WPA network, connect, and host TCP on a specific port. That all works great, as does receiving simple messages from something like a terminal. The library and test programs are all in a debug type setup, and in order to use any of it, you would need my debug library and optionally one of two RIC font packages.
The main problem right now, is parsing data that gets sent from a browser requesting a page.
@ Helmut, I agree about starting a new topic or using PM. Perhaps a mod can move this, as well as the pages of OT stuff about multiple NXTs.
I am getting quite desperate for this. I am already using 3x4 pixel font on the NXT screen with my debug library, and 25x12 (300) characters is far from enough.
Please let me know if you think it is still going to be a while, because I am going to have to come up with a different way to transmit all the data to a terminal. I guess I could probably send everything to the Arduino using I2C, and then print it to a serial terminal, but that's a whole lot of extra work.
I've uploaded a test release zip with an updated BricxCC executable in it which adds support for the NXT to the Simple Terminal window as well as support in the Watch window for watching any of the NXT mailboxes (either inbound or response).
I am going to be working this weekend on a suite of NXC API functions that work with the capabilities of the Simple Terminal window in BricxCC. That's not done yet. But the attached sample program can be used with the Simple Terminal window to try out the new capabilities.
The NXC API functions will likely be written to use the USB Poll buffer rather than a mailbox but I may make that user-configurable. The main reason for using the USB Poll buffer is that nothing else at all uses it and it can be read either via usb or bluetooth using the PollCmd and PollCmdLen system command functions.
You can manually clear the terminal window with Edit|Select All followed by Edit|Delete. I can add an Edit|Clear option, I guess.
I will probably add an option that changes its behavior to match what you would like in terms of new lines. I'll also add a save to file option from this window along with the ability to set the polling rate (currently hard coded at 50ms). Also an option in the Preferences dialog for whether to interpret 4 byte mailbox messages (well, technically, 5 bytes if you count the null terminator) as numeric values. I don't plan on doing the numeric and boolean special case handling for messages retrieved from the USB Poll buffer.
The mailbox protocol has 2 byte messages for boolean values (0 or 1 followed by a 0) (SendResponseBool), a 5 byte message for numbers (SendResponseNumber) and strings of any length (SendResponseString). These are supported by the blocks in NXT-G and in NXC so they need to be supported in the simple terminal if the user wants to use mailboxes instead of the USB Poll buffer.