Robot rebuild in progress

Windows 8

I installed the Windows 8 Developer Preview on my robot today. Already tested the usb phidget boards, they all work. You can download the Microsoft Windows 8 developer preview for free from the

Power test

I did a small power test with the robot today. It was very successful. Next time I’ll have to measure the weight of the robot, object pushed and friction accurately. Wheel spin was a bit of a problem. I’ll have to remove the electrical tape from the wheels and also control the velocity better via code to detect wheel spin.

Robot setup:
1x 6.7v battery at 6600 mAh
6x drive motor at 75:1 gear ratio
5% acceleration
100% velocity

Results:
max current: 2.746 amps
weight pushed : I guess around 4 to 5kg

Sonar

Mounted the 3 sonar sensors. They are amazingly accurate. One is pointed forward and the other two left and right. This gives me a very good picture of obstacles and which way to turn when navigating without video or user interaction. Kind-of like park assist for robots :)

Sonar

Webcam

I can see! Got a webcam for the robot. Using the DirectShow.Net library I created a simple windows service which streams video from the robot to a client app via wifi, so now I can see where the robot goes.

Webcam

HDD replacement

A few weeks back the robot died, it was booting up into windows and then just freezing. It turns out that the original Seagate Hard Disk Drive (HDD) I got with the fit-pc2i was faulty and could not be repaired using the seagate drive utilities. I’m not 100% sure why the HDD drive broke, but at the moment I believe it to be one of three reasons; either was from a bump while driving the robot, or it was from the build-up of static electricity on the robot or, most likely it was caused by running the robot on low voltage. Originally I ran the fit-pc2i on 8.4 volts as this is within the recommended range of 8 to 15 volts. So now the robot is upgraded to run on 12 volts and a Solid State Drive (SSD).

Sql remembers the value of declared variable inside while loop iterations

It’s sometimes the simplest things that go forgotten and then dreadfully wrong. Have a look at the sql script below, if you do not specify a value for a variable declared inside a while loop it will remember its value into the next iteration of the loop, resulting in the output A=2 and B=1.

declare @loopCount int
select @loopCount = 0

while @loopCount < 2
begin
	declare @a int
	declare @b int = 0

	if @a IS NULL
	begin
		select @a = 0
	end

	select @a = @a + 1
	select @b = @b + 1

	select @loopCount = @loopCount + 1
end

select @a as a, @b as b

CSS3 !

Replaced all the mozilla and webkit border radius css elements in my blog’s style sheet with the CSS 3 equivalent. Now I have nice rounded corners in IE9.

/* CSS 3 */
border-radius: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
border-bottom-left-radius: 5px;

/* Mozilla */
-moz-border-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
-moz-border-radius-bottomleft: 5px;
-moz-border-radius-bottomright: 5px;

/* Webkit */
-webkit-border-radius: 5px;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-webkit-border-bottom-right-radius: 5px;
-webkit-border-bottom-left-radius: 5px;