Archive

Archive for the ‘Computers’ Category

Things I Hate About “World Of Warcraft”

July 6th, 2011 No comments

Don’t get me wrong, I love World of Warcraft, but some things about it really annoy the hell out of me…

The Duelist

This turd is the online equivalent to the six and a half foot tall, shaven headed, tattooed nutjob who asks people in the pub for a fight for no reason. In this case, the nutjob is probably 14, has arms like pipe-cleaners (but oddly massive hands), and would probably pass out if ever asked to venture in to a pub.

The Recruiter

All the seem to do is spam people with requests to join their Guild. I’m sorry, mate, but if I’m busy kickin the snot out of something and your Guild Request box pops up and messes me about, I’m never going to help you with anything EVER AGAIN. If, however, you talk to me first and ask nicely, then I may join you group of splitters and quitters (see below).

Death Knights

Okay, so they look cool and are really hard from the outset. But, once you start upgrading the equipment, they start looking like some bastard colourblind harlequin. Imagine the Witch-King of Angmar attacking Meriadoc and Eowyn on the Pelennor. The War of the Ring would have taken a different turn had Merry and the bint from Rohan died laughing as the undead lord strode up to them wearing a lime green breastplate, crimson gauntlets, sky blue leggings, a purple helmet, and a turquoise cloak. Whatever a Death Knight chooses to wear should become black. Blacker than a Spinal Tap album cover. If not blacker.

Stormwind Loiterers

Okay mate, you’re Level 85 and have some stupid winged pet. I understand that you want to show off. But could you and your 27 mates kindly not do it in the Trade District of Stormwind City? Your mum might have spent a couple of grand buying you a PC for your “homework”, but I’m using a PC that was found in a skip. when I drop down to 3 frames per second it makes me want to stab you in the eye socket. With your own shin.

Whitesnake Quests

Oh, I’m sure you know what I mean. You’ve just gone deep into some mine or other, had the shit kicked out of you, got back, handed the quest in and… guess what… there’s  a boss to kill in the mine. Never mind that you’ve just killed him. And so, “Here I Go Again”… (hence the title)

Quitters

Those people who spend months convincing you to upgrade your PC and start playing. And within three weeks they’ve fucked off and either found another game, retired from the whole MMORPG thing, or can’t afford to play anymore.

Me

As a six and a half foot tall tattooed balding nutjob with arms like pipe-cleaners, I really have to hate myself for continuing to play the game.

Share

Dalek Invasion Of The Kitchen

December 15th, 2010 No comments

I decided to Blu-Tac my mobile phone to the front of the Arduino Dalek and let it wander around the kitchen.

At one point it does get confused and tries to run under a cupboard, but that is only because it tries to detect things which are about an inch above the floor,  and there is a big gap under that cupboard.

Enough waffle, here is the video:

Share
Categories: Arduino, Computers, Dalek, Robots, Tech, Toys, Video, Youtube Tags:

Vision of the Arduino Dalek

November 4th, 2010 No comments

Ok, so that post title isn’t based on a Doctor Who episode title. Sue me.

Recently I’ve bought two Sharp GP2Y0A21YK Infrared Proximity Sensors from RoboSavvy. These little things can detect object in a range of 10cm to 80cm.

Here is one

So, the task now is to wire them up, and use them to detect when the Dalek get within 20 cm of an obstacle.

The circuitry is fairly easy. The Red wire goes to the 5v connection, the Black goes to GND, and the yellow wire goes to one of the Analogue inputs on the Arduno. I’m using pins A2 and A3, one for each sensor.

My soldering is, as ever, attrocious, so we’ll not have a picture of of that. Instead, here is a picture of the sensors Blu-Taked on to the front of the thing.

And, as a bonus, a picture of the button that I’ve also fitted (and wired to Digital Pin 8).

So, what we are going to do now is have the Dalek spin left if detects an obstable to the right, and spin right if it sees something to the left.

Also, if the button on the back is pressed, it will sleep for five seconds.

Portions of this code come from Lucky Larry’s website.

// Project: Dalek control system
// Version 0.3 - IR Sernsors
// Tony Blews tony@tonyblews.co.uk

int ButtonPin       = 8;
int MotorDirectionR = 10;
int MotorDirectionL = 11;
int MotorPowerR     = 12;
int MotorPowerL     = 13;
int IRPinLeft       = 2;
int IRPinRight      = 3;

void setup()
{
 pinMode(MotorDirectionR, OUTPUT);
 pinMode(MotorDirectionL, OUTPUT);
 pinMode(MotorPowerR, OUTPUT);
 pinMode(MotorPowerL, OUTPUT);
 pinMode(ButtonPin, INPUT);    // declare pushbutton as input

 Serial.begin(9600);
 Serial.println("Serial control Dalek system starting...");

}

float check_distance(int IRpin) {
 float volts = analogRead(IRpin)*0.0048828125;   // value from sensor * (5/1024) - if running 3.3.volts then change 5 to 3.3
 float distance = 30*pow(volts, -1.10);          // worked out from graph 65 = theretical distance / (1/Volts)S - luckylarry.co.uk
 return(distance);                               // http://luckylarry.co.uk/arduino-projects/arduino-using-a-sharp-ir-sensor-for-distance-calculation/     
}

// modes for the motor control
// convention here is modeXX - where X is F for forward, S for stationary and B for backwards
// first X is the left motor, second X is the right one
// for direction control, the LOW if forward and HIGH is backward
// for power control, LOW is off and HIGH is on

// all stop
void modeSS()
{
 digitalWrite(MotorDirectionR, LOW);
 digitalWrite(MotorDirectionL, LOW);
 digitalWrite(MotorPowerR,LOW);
 digitalWrite(MotorPowerL,LOW);
}

// move straight ahead
void modeFF()
{
 digitalWrite(MotorDirectionR, LOW);
 digitalWrite(MotorDirectionL, LOW);
 digitalWrite(MotorPowerR,HIGH);
 digitalWrite(MotorPowerL,HIGH);
}

// move straight backwards
void modeBB()
{
 digitalWrite(MotorDirectionR, HIGH);
 digitalWrite(MotorDirectionL, HIGH);
 digitalWrite(MotorPowerR,HIGH);
 digitalWrite(MotorPowerL,HIGH);
}

// spin left
void modeBF()
{
 digitalWrite(MotorDirectionR, LOW);
 digitalWrite(MotorDirectionL, HIGH);
 digitalWrite(MotorPowerR,HIGH);
 digitalWrite(MotorPowerL,HIGH);
}

//spin right
void modeFB()
{
 digitalWrite(MotorDirectionR, HIGH);
 digitalWrite(MotorDirectionL, LOW);
 digitalWrite(MotorPowerR,HIGH);
 digitalWrite(MotorPowerL,HIGH);
}

//main program loop
void loop()
{
 if (digitalRead(ButtonPin) == HIGH)
 {
 modeSS();
 delay(5000); // sleep for 5 seconds if button pressed.
 }
 modeFF();
 if ((check_distance(IRPinLeft) <20) && (check_distance(IRPinLeft) <20) )
 {
 //back up a bit
 modeBB();
 delay(1000);
 //rotate on spot for 2 sec (approx timing for 180 degrees)
 modeFB();
 delay(2000);
 }

 if (check_distance(IRPinLeft) <20)
 {
 // rotate on spot for 1 second (approx timing for 90 degrees)
 modeFB();
 delay(1000);
 }
 if (check_distance(IRPinRight) <20)
 {
 // rotate on spot for 1 second (approx timing for 90 degrees)
 modeBF();
 delay(1000);
 }
}

Video coming soon, I promise.

Share

Power of the Arduino Dalek

September 17th, 2010 No comments

It has been a while since I’ve messed with the Dalek project, so this is just a brief update of the minor twiddling I’ve done.

Firstly, the Dalek now has a USB Type B socket on the rear of the casing replacing one of the “Dalek Bumps”, as shown:

USB B Socket, in place of Dalek Bump

Acquired from Maplin (part no N57FL), this USB Panel Mount Socket is reversible, with a Type A socket on one side, and a Type B on the other.

As a PC generally has a Type A socket, and the Arduino I’m using has a Type B socket, I opted to have the Type B on the outside.

This will allow the use of a normal A-B cable to connect between the PC and the case socket, and require a short A-B cable to connect between the case socket and the Arduino (as having a 3m cable curled round inside the thing seems a bit stupid).

Sadly, getting a short USB A-B cable isn’t easy. So I had to chop up an existing cable and butcher it.

All chopped and ready to solder

Bad soldering hidden by about 50cm of tape

Now, the Arduino can be left inside the Dalek case, which can be screwed shut again.

However, when the Arduino isn’t connected via the USB link, it loses power (tenuous link to the title of the post). Luckily, the Arduino Duemilanove that I’m using has a 2.1mm socket, and will run from a 9v battery.

So we need a PP3 9V battery clip, and a 2.1mm DC power plug.

Solder the battery clip’s black wire to the outside connection of the plug, and solder the battery clip’s red wire to the centre connection of the plug.

For clearer instructions, and clearer pictures (I have a crap camera), see the relevant page at Arduino Playground.

The yellow tape is not being used to hide a massive solder disaster this time, but merely to keep the wires together.

So, now I have a Dalek with a battery pack for the motors (from the original casing), a battery pack for the Arduino (ok, a PP3 taped inside), and a USB socket on the casing.

Now it can be programmed, unplugged, and be left to trundle into things.

So here is some code to make it wait for five seconds,  spin right for one second, wait for two seconds, spin left for one second, and repeat for ever (or until the power is removed):

// Project: Dalek control system
// Version 0.2 - Sit and spin
// Tony Blews tony@tonyblews.co.uk

int MotorDirectionR = 10;
int MotorDirectionL = 11;
int MotorPowerR     = 12;
int MotorPowerL     = 13;
long randNumber;

void setup()
{
 pinMode(MotorDirectionR, OUTPUT);
 pinMode(MotorDirectionL, OUTPUT);
 pinMode(MotorPowerR, OUTPUT);
 pinMode(MotorPowerL, OUTPUT);
   randomSeed(analogRead(0));

}

// modes for the motor control
// convention here is modeXX - where X is F for forward,
//S for stationary and B for backwards
// first X is the left motor, second X is the right one
// for direction control, the LOW if forward and HIGH is backward
// for power control, LOW is off and HIGH is on

// all stop
void modeSS()
{
 digitalWrite(MotorDirectionR, LOW);
 digitalWrite(MotorDirectionL, LOW);
 digitalWrite(MotorPowerR,LOW);
 digitalWrite(MotorPowerL,LOW);
}

// spin left
void modeBF()
{
 digitalWrite(MotorDirectionR, LOW);
 digitalWrite(MotorDirectionL, HIGH);
 digitalWrite(MotorPowerR,HIGH);
 digitalWrite(MotorPowerL,HIGH);
}

//spin right
void modeFB()
{
 digitalWrite(MotorDirectionR, HIGH);
 digitalWrite(MotorDirectionL, LOW);
 digitalWrite(MotorPowerR,HIGH);
 digitalWrite(MotorPowerL,HIGH);
}

//main program loop
void loop()
{
delay (5000);
modeFB ();
delay (1000);
modeSS ();
delay(2000);
modeBF();
delay(1000);
modeSS();
}

The next step will be to install some sensors.

USB Panel Mount Socket

Share

I have a VAX

August 22nd, 2010 1 comment

Technically, the post title is a lie. Having such an item would be impractical for me as it would take up too much space in my tiny flatshop (a hybrid flat/workshop type thing), and would cause the disk in my electricity meter to spin so fast that it could be used for sawing wood.

What I really have is a VMS machine, which is running on a simulated VAX 3900, which in turn runs on my puny Ubuntu 10.4 Linux machine (puny as in the hardware spec is pityful).

This is achieved by using something called SIMH, which simulates all manner of old DEC hardware, a copy of the OpenVMS Hobbist Kit, some OpenVMS licenses, and a copy of Paul Wherry’s guide to getting a VAX/VMS system running under SIMH.

To get SIMH working with Ethernet support, libpcap needs to be installed. To build this, flex, bison and m4 need to be installed. So these files need to be downloaded and copied to your linux machine:

Once these are on the linux box, should be installed as per the instructions with the packages in the order: flex, bison, m4, libpcap. With these installed, SIMH can be compiled as in Paul Wherry’s guide.

Instead of placing the files in /usr/local/vax, I placed the files in /usr/local/blinkyvax, and adjusted the paths in the vax.ini file for accordingly. This is because my eventual plan is to have four virtual VAXen running in a cluster named after the four Pacman ghosts – Blinky, Pinky, Inky and Clyde).

Getting hold of the OpenVMS media can be problematic, as the only legitimate way to get them is from Montagar Software for $30. Luckily, i was given the disks by someone who couldn’t getthem to work.

The easiest way to get hold of the Hobbyist Licenses is to go through DECUServe. To do this, telnet to eisner.decuserve.org, and login as REGISTRATION. Once this is done, you’ll be sent your membership number. This can be used, after about a week, on the Licensing page, to get your licenses. You’ll need the “OpenVMS VAX Base” and “OpenVMS Layered Products” licenses.

The SimVAX currently runs fine and can communicate with the other machines on my house network (through libpcap which wangles the ethernet card into promiscuous mode), but it cannot talk to its host machine (the one on which the simulator is actually running).

Sorting this niggle out is the next step, after which I can take another step forward in realising my dream of having my very own VMScluster.

Which sort of begs the question: Why?

Well. VAX/VMS was the second real multi-user operation system I ever got my hands on, and the first one I was actually paid to work with. Sometimes I get a little nostalgic. And then I get carried away.

As for the first multi-user OS I used, PR1MOS: there is an emulator out there, and if it ever becomes Open Source, I’ll be running that on my machine too.

Share