New Kid on the WiFiBlock
A new player has entered the arena of WiFi sensors. A French company by the name of HumaRobotics has developed a new WiFI sensor for the NXT, the WiFiBlock. This sensor is a bit different from existing sensors in that it uses I2C, not RS485 to communicate with the NXT.
It runs on 3xAA batteries that are kept in the black case, which covers the entire sensor. I’ve had one of these sensors for testing for a little while now but mine’s a “naked” prototype specimen, without the case. The LED under the logo you see on the left in the middle of the case pulsates slowly, which is a very cool effect. There are status LEDs next to the NXT connector on one of the short sides (top or bottom, depending on how you’re holding it).
The WiFiBlock is capable of making raw TCP, UDP and standard HTTP GET and POST requests. It can speak WPA, WPA2, OPEN and WEP encryption protocols, so it’ll work on most networks. I’ve used it a lot in combination with the Access Point functionality on my Android phone.
As for performance, you can expect to get about the following:
- UDP Tx 14 request /sec
- UDP Tx/Rx: 9 requests / sec
- HTTP GET : 5 requests / sec
- HTTP POST: 3 requests / sec
I2C vs RS485
While the I2C vs RS485 might worry people, regarding total throughput and speed, you must remember that your NXT is not going to send or receive massive amounts of data. You’re more likely to use it for sending small messages or fetching instructions from a remote server.
Stateless
Speaking of connections, one thing that is different from other sensors it how it handles sending and receiving data to and from a remote host. Standard operation is as follows:
- Setup WiFi and network (done only once at the start of your program)
- Configure remote IP address and port
- Preload data to be sent
- Send the packet
- Wait for response
- Handle response on NXT
The difference is that in the case of the WiFi block, for each request made like this, a new connection is setup, data is sent, a response (if any) is received and connection is torn down again. This makes the WiFiBlock in essence state-less.
Loose ends
On your right you can see a picture of a robot featuring the WiFiBlock, it’s about the size of a battery pack and has LEGO Technic axle holes in each corner. There is a tutorial on the product page which shows you how you can easily make a web page that can be used to control your robot!
I am currently working on a ROBOTC driver for this sensor and will release it as part of my suite when it is done. It will also be available from the HumaRobotics website.
You can read more about this sensor on its product page: [LINK].
When you posted that teaser, I suspected that this was a Wi-Fi sensor. I don’t know why, it just looked like one to me.
[…] : http://botbench.com/blog/2012/03/27/humarobotics-wifiblock/ Tags: HumaRobotics, WiFi Sensor, […]
How does this compare with the FIRST Tech Challenge Samantha module?
I am not that familiar with the Samantha module from what I understand is that it is a way to send direct messages to the brick over WiFi. So it is more like a wireless USB connection than something that the brick can actively use to connect to services on the Internet.
That is correct. The Samantha module is basically a way of transmitting NXT USB communications over wifi, whereas this appears to provide the program with IP communication.