Released: ROBOTC Driver Suite V3.3
Page 1 of 2

Author:  mightor [ Tue Mar 12, 2013 4:21 pm ]
Post subject:  Released: ROBOTC Driver Suite V3.3

Version 3.3 is out and should work just fine with all version of ROBOTC for NXT of at least 3.59. I still need more testers for the dWiFI and NXT2WIFI sensors, so if you’re keen, let me know. If you’re not keen, then, ehm, don’t.

This suite will not work with anything less than ROBOTC 3.59, make sure you update your IDE. You can download it here: [LINK].

What’s new?
  • New driver + example for the Dexter Industries dLight
  • New driver + examples for the Mindsensors Sensor MUX (includes a disco party)
  • New matrix math functions, based on the Arduino Matrix library, worth for both floats and longs
  • Fixed silly bug in NXTCam driver. Thanks fxlj007 for reading through the code!
  • Complete rewrite of the dWIFI config program and driver, I hope it still works!
  • Fixed axes in the dIMU driver, I had flipped x and y
  • Added a simple strtok() function to common.h
  • Minor costmetic tweaks to test programs
  • Minor documentation tweaks here and there
  • For those who like to peruse code, check out dexterind-imu.h for a glimpse of what’s to come
  • Fixed naming conflict between Hitechnic EOPD and Mindsensors SumoEyes driver (thanks Bill Fortney)
  • Fixed LEGO Light Sensor calibration data saving (thanks Jamie Diamond)

How can you help?
Send me your bug reports, tell me what’s not working for you. Alternatively, leave words of encouragement, kudos and/or compliments via email or in a comment.

Where can I download it?
You can get it at the usual place: [LINK].

Author:  UKTeacher [ Wed Feb 19, 2014 2:18 pm ]
Post subject:  Re: Released: ROBOTC Driver Suite V3.3

Hi Xander,

I have bought some NXT2WiFis and can't seem to get past the setup. I think the next stage is to Activate the brick.

I have run

benedetelli-nxt2wifi-config.c, and

both from your most recent rdpartyrobotcdr-3.3.1

The NXT has an IP of but does not allow me to save it to the brick. I can't progress to the next stage of the setup either.

Any clues?

Thanks very much for your help.

All best,


Author:  mightor [ Wed Feb 19, 2014 3:50 pm ]
Post subject:  Re: Released: ROBOTC Driver Suite V3.3

What do you mean by "can't save it to the brick"?

= Xander

Author:  UKTeacher [ Wed Feb 19, 2014 4:02 pm ]
Post subject:  Re: Released: ROBOTC Driver Suite V3.3

Hi Xander,

Thanks for your reply to my issues.

I am not really sure what I mean! Is the IP meant to be saved to the brick? Perhaps not?! It gives me a lovely IP, but I can't find it in any browser in the house to get the activation page.

Typing gives a server not found error.

I hope I'm just being a numpty and it's something simple that I'm doing wrong. Thanks for your guidance.



Author:  UKTeacher [ Wed Feb 19, 2014 5:58 pm ]
Post subject:  Re: Released: ROBOTC Driver Suite V3.3

Hi again,

I have put the latest firmware on the NXT2WiFi: 130807. This is the information from the firmware updater.
Initiating download...
Resetting by dtr...ok
Searching for bl .
Found PIC24FJ256GA106 fw ver. 1.2.10
Waiting for bootloader to be ready...ok
Writing flash...ok
Download finished

So I think that's good.

I am still having trouble getting a browser to see it and activate it.

Is this an issue for you, or is it one for Danny?


Author:  mightor [ Thu Feb 20, 2014 2:44 am ]
Post subject:  Re: Released: ROBOTC Driver Suite V3.3

You could try configuring it with the programs that he supplies and see if the problem persists.

= Xander

Author:  UKTeacher [ Mon Feb 24, 2014 12:12 pm ]
Post subject:  Re: Released: ROBOTC Driver Suite V3.3

Hi Xander,

Thank you for replying to my last post. I have been corresponding with Danny and I have managed to get the right files on the chip, and I can now see it in a browser. All good.

I wonder if there is a quick startup program to run on the NXT to control it via the NXT2WIFI? I have got your drivers 3.3.1.

Thanks in advance.


Author:  mightor [ Mon Feb 24, 2014 4:21 pm ]
Post subject:  Re: Released: ROBOTC Driver Suite V3.3

Are there no examples in my suite?

= Xander

Author:  UKTeacher [ Tue Feb 25, 2014 8:05 am ]
Post subject:  Re: Released: ROBOTC Driver Suite V3.3

Hi Xander,

It is probably just me not understanding the files and what's in them.

I see there are test 1- 5, and 3 looks a good one. And the nxt2wifi.h file looks great at about line 994. But running it alongside a browser pointed at the NXT2WIFI device gives no joy. Termite shows activity on the device, and the lights go on when on-screen buttons are pushed, but I am still receiving nothing onscreen on Dani's index page.

Normally, I would be quite keen to have a ride on the learning curve and figure it out. But this time I have a real constraint in that I would like to have a bunch of these little gadgets working like this by next week. I would very much appreciate any guidance you could give me.

Many thanks for your help.


Author:  mightor [ Wed Feb 26, 2014 1:57 am ]
Post subject:  Re: Released: ROBOTC Driver Suite V3.3

It is a bit hard for me to debug the issue remotely. I am under a bit of a time crunch myself with a project I am due to finish by next week and an article I am writing that should be done by Friday.

I'll try to find some time today to test out one of those examples and get back to you. I haven't used my NXT2WIFI sensor in absolute ages, I'll hook it up the charger :)

= Xander

Author:  UKTeacher [ Wed Feb 26, 2014 9:32 am ]
Post subject:  Re: Released: ROBOTC Driver Suite V3.3

Hi Xander,

Thank you for having a start at fixing my NXT2WIFI problem. I will confess that the problem was entirely my own ignorance, and I am sorry to bother you with it. Starting one of these up is not for the feint of heart, but I am glad I have done it. I am no expert, but it will be fun to play with. I have got a little custom webserver going now and the robot moves around. I'm a happy gal!

All the very best.


Author:  UKTeacher [ Sat Mar 01, 2014 10:50 am ]
Post subject:  Re: Released: ROBOTC Driver Suite V3.3

Hi Xander,

I wonder if you might help with with some of the commands in your benedettelli-nxt2wifi.h file.

I would like to broadcast the same message to multiple robots. I would like to open a UDP socket on every robot and send data on that socket, so they will receive the same data at the same time regardless of the IP.

I have been using N2WreadWS to read the button values from the webserver and print them to the debug stream which activates the NXT. What I would like to do is make sure these commands go to the UDP socket across a number of robots with different IPs. I see that I can't do that with N2WreadWS.

Are the commands I need:

NX2WUDPOpenClient, or

Then, do I write a command by calling N2WUDPWrite, and read it with N2WUDPRead?

Many thanks


Author:  mightor [ Sat Mar 01, 2014 11:24 am ]
Post subject:  Re: Released: ROBOTC Driver Suite V3.3

NX2WUDPOpenClient() creates a listening socket.
NX2WUDPOpenServer() creates a socket with which you can send.
You'll need to use a broadcast address to ensure that all units get the packet. You use the write and read commands as you said.

Keep in mind that UDP is fire and forget and that there's no guarantee that a packet is received. A good way to mitigate this issue is to send the packet out a few times with a sequence number inside the data, so that the client can simply ignore any packets with a sequence number it has already seen.

= Xander

Author:  UKTeacher [ Sat Mar 01, 2014 12:12 pm ]
Post subject:  Re: Released: ROBOTC Driver Suite V3.3

Hi again,

Would you mind terribly if I were cheeky and asked for an example of code?

My IPs are config'd already. I am confused:

When in the program do I open the UDP ports? I am using

if(N2WUDPOpenServer(UDPid, UDPport))
nxtDisplayTextLine(1,"UDP Listening");
where UDPid = 1 and UDPport = 222. I suspect it isn't opening because it's not hitting my display text line. I have probably got incorrect values for UDPid and UDPport? What variables would you suggest putting in these arguments?

And then, do I send a little packet to the NXT on the UDP socket by using N2WUDPRead()? Does that live in the main while true loop?

Thanks so much. Your help is really appreciated. I am sorry I am so clueless about all this.

All best,


Author:  UKTeacher [ Sun Mar 02, 2014 7:57 am ]
Post subject:  Re: Released: ROBOTC Driver Suite V3.3

Hi Xander,

I have had a play with this, and I suspect my last post was vague. I hope that this makes more sense of my puzzle.

I am still having trouble getting my head around sending a single browser button push to a bunch of robots equipped with NXT2WIFIs on different IPs but the same UDP. I can open a client socket on the robot with this (forgetting about error traps):


Then I open a listening socket:


I have given this socket an ID of 1. All this works find and I can see it on a terminal emulator (Termite).

Then I have an infinite loop waiting for buttons on the browser to be pushed:
while (true)
if (N2WUDPRead(1,0))
< something like play a tone, but this is where I want my brick command to live ..>

This loop used to have in it:
if (N2WreadWS(type, ID, state, value))
<.. do something like call a command to the NXT based on ID and a switch case ..>

...for a single robot serving up a browser page with button events.

The latter worked well but not with UDP (as stated very clearly in your driver--thank you!). What N2WUDP--- function do I use to prompt an event from browser to brick?

Thanks so much.


Page 1 of 2 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group