Arduino

After some coercion from @jaaaaam I finally bought an Arduino from EarthShine Design.
The kit contains lots of things to get started with the Arduino, as well as being accompanied by a basic starter manual.
For the last few weeks i’ve been teaching myself to program using Processing using the Learning Processing book on O’Reilly’s Safari service.
Having no prior knowledge of programming, it took some time to get my head around how things work.

One of the examples in the starter manual was a traffic lights system.
The example given would just cycle a loop, and when you push the button, the loop would reset and it would run again.
I decided i’d like to try and challenge myself and change this.

I wanted the lights to

  • Loop the car lights in sequence
  • Check for request from the button for a pedestrian to cross
  • If there is a request, start the crossing sequence
  • Once crossing is completed, return to the car lights sequence

Here is the code I came up with

// Car light pins
int carRed = 12;
int carYellow = 11;
int carGreen = 10;

//Pedestrian light pins
int pedRed = 9;
int pedGreen = 8;

//Crossing button
int button = 2;

//Delay times
int crossTime = 5000;
int delayTime = 3000;
unsigned long previousMillis = 0;

//Crossing request
int request = 0;

// Array for all lights
int allLights[] = {
 12 , 11, 10, 9 ,8};

// Array for carGreen pedGreen
int carsGo[] = {
 10, 9};

// Array for carYellow pedGreen
int carsWait[] = {
 11, 9};

// Array for carRed pedRed
int carsStop[] = {
 12, 9};

// Array for carRed pedGreen
int pedsGo[] = {
 12, 8};

void setup() {
 //Set pins to output
 pinMode(carRed, OUTPUT);
 pinMode(carYellow, OUTPUT);
 pinMode(carGreen, OUTPUT);
 pinMode(pedRed, OUTPUT);
 pinMode(pedGreen, OUTPUT);
 //Set button pin to input
 pinMode(button, INPUT);
 //Set Car lights to green and Pedestrian lights to red
 digitalWrite(carGreen, HIGH);
 digitalWrite(pedRed, HIGH);
}

void loop(){
 //Start normal traffic light sequence
 normalLights();
 //Check for crossing request
 checkCrossingRequest();
 //If crossing request is present, run pedestrian crossing sequence
 lightsCheck();
}

//Function to turn all lights off
void allLightsOff(){
 for(int i = 0 ; i < 5; i++){
 digitalWrite(allLights[i], LOW);
 }
}

//Function for pedestrian lights
void pedLights(){
 //Delay for .5 sec
 delay(500);
 // Turn off all lights, turn on pedestrian red, turn on car yellow
 allLightsOff();
 digitalWrite(pedRed, HIGH);
 digitalWrite(carYellow , HIGH);
 //Delay for 1 sec
 delay(1000);
 // Turn off all lights, turn on pedestrian red, turn on car red
 allLightsOff();
 digitalWrite(pedRed, HIGH);
 digitalWrite(carRed, HIGH);
 //Delay for 1 sec
 delay(1000);
 // Turn off all lights, turn on pedestrian green, turn on car red
 digitalWrite(pedRed, LOW);
 digitalWrite(pedGreen, HIGH);
 //Delay for crossing time
 delay(crossTime);
 //Flash lights 10 times, each time taking .5 sec
 for (int x=0; x<10; x++) {
 digitalWrite(pedGreen, HIGH);
 delay(250);
 digitalWrite(pedGreen, LOW);
 delay(250);
 }
 //Turn off all lights, turn on pedestrian red, turn on car red
 allLightsOff();
 digitalWrite(carRed, HIGH);
 digitalWrite(pedRed, HIGH);
 //Wait 1 second
 delay(1000);
}

//Normal light sequence
void normalLights(){
 //Set currentMillis to the current time on the board
 unsigned long currentMillis = millis();
 //If current time minus the time the loop was last run is greater than 4 times the delay time, reset last run time
 if(currentMillis - previousMillis > delayTime*4){
 previousMillis = currentMillis;
 }
 // if loop lenght time is greater than 3 times the delay time, set car lights yellow off and red on
 else if(currentMillis - previousMillis > delayTime*3){
 digitalWrite(carYellow, LOW);
 digitalWrite(carRed, HIGH);
 }
 // if loop lenght time is greater than 2 times the delay time, set car lights green off and yellow on
 else if(currentMillis - previousMillis > delayTime*2){
 digitalWrite(carGreen, LOW);
 digitalWrite(carYellow, HIGH);
 }
 // if loop lenght time is greater than the delay time, set car lights red off and green on
 else if(currentMillis - previousMillis < delayTime) {
 digitalWrite(carRed, LOW);
 digitalWrite(carGreen, HIGH);
 }
}

//Check for a crossing request and return a value of 1 or 0
int checkCrossingRequest(){
 //Set val to button
 int val = digitalRead(button);
 if (val == HIGH) {
 return 1;
 }
 else{
 return 0;
 }

}
//Check the value of the crossing request, if 0 do nothing, if 1 do pedestrian sequence
void lightsCheck(){
 request = checkCrossingRequest();
 if (request > 0) {
 pedLights();
 }
}

Here is the hardware side of things

I’m looking forward to hooking up the 8×8 led display and 16×2 LCD I have.

Further projects will involve CoffeeTronics i hope :)

Chicken Tikka Masorta

This is my twist on chicken Tikka Masala.

Spices

  • 1TBSP Mild Curry Powder
  • 2TBSP Paprika
  • 1TBSP Garam Masala
  • 1TSP Cayenne Pepper

Toasted and ground

  • 1TSP Coriander Seeds
  • 1TSP Whole Cumin Seeds

Meat

  • 4 Breasts of Chicken chopped

Others

  • 1 Tin of Plum tomatoes
  • 1 Tin of Tomato puree
  • 2 Garlic Cloves
  • 1 Red Onion
  • 200G Low Fat Greek Yoghurt
  • Fresh Coriander
  • 250ml of Chicken stock

Marinade

Toast the coriander and cumin and grind in a mortar and pestle or in a food processor

Mix with remaining spices.

Chop garlic and fresh coriander and add to the mix.

Mix in the yoghurt and 1TSP Tomato paste until everything is evenly coloured

Add in all the chopped chicken and leave sit for 1 hour.

Cooking

I normally use a castiron casserole pot for cooking this, you could use a large heavy bottomed pot aswell.

Chop and fry the 1/2 red onion in some olive oil spray (or normal olive oil) for 3 minutes on a low heat to soften it.

Add the marinade and chicken to the pot and stir.

Add the tin of chopped tomatoes and the rest of the tomato paste and stir it in.

Add the chicken stock and stir it in.

Bring to the boil and reduce the heat to a simmer.

Stir every now and again and cook covered for 20 minutes.

For the last 10 minutes take off the lid, this will allow the sauce to thicken.

This works well with fluffy basmati rice and a naan bread.

Rice

Bring some water to a boil in a medium sized pot.

Take about 25-40g of rice per person and put in a sieve and run under cold water until it runs clear.

Put rice into the water and cook for 5 minutes.

The rice should almost be cooked, drain it and fill about 2cm of water into the pot again.

Bring the water to the boil, then place the sieve with the drained rice ontop of the pot, cover with the pot lid.

Allow the rice to cook until it is soft, use a fork to make it fluffy.

The Result

UPDATE!

I’ve changed the cooking part slightly and it gives a much creamier texture.

Cooking

I normally use a castiron casserole pot for cooking this, you could use a large heavy bottomed pot aswell.

Blend the  red onion and some garlic and sweat it in some neutral oil.

Blend the tomatoes, paste and stock and add to the pan.

Add the marinade and chicken to the pan and mix.

Bring to the boil and reduce the heat to a simmer.

Stir every now and again and cook covered for 20-40 minutes.

For the last 10 minutes take off the lid, this will allow the sauce to thicken.

This works well with fluffy basmati rice and a naan bread.

Modding the Mad Catz Xbox 360 Street Fighter IV Arcade FightStick

After a few months of searching i was finally able to track down a Mad Catz Xbox 360 Street Fighter IV Arcade FightStick from Amazon.co.uk for €90

Here is a stock version of the stick:

madcatz-streetfighter-499x438

I decided on using the following parts for my stick.

The modding itself was very easy after reading an article on the SRK Forums

End result was a nice and fresh stick
IMG_0025

Close up of the ball
IMG_0026






Someone said as an inexperienced stick player that i probably wouldn’t notice the difference in parts. Infact its the opposite, the new parts make a huge difference with accuracy.
Overall i’m very happy with the stick and hope to mod an MC Cthulhu and imp into it to allow me to use it both on the xbox and ps3. (Guide)

Next project will be building a stick from scratch using a Polycarbonate Control Panel
.

Safety Razor

For the last few weeks i’ve been using a Boots Double Edge Razor. Shaving with a Gillette Fusion for the last few years has worked out ok, but I wasn’t satisfied with the results.

Changing to a safety razor was an interesting and bloody experience for the first shave or two, but after reading some guides online, things became a bit more clear.

So i decided to take the plunge and buy some proper equipment:

p-1600-1200-2d6d41e4-231d-4186-80c8-90a867cdeaac.jpeg

First shave was pretty smooth, with a few nicks, but the alum block sorted that out. There’s a huge difference between the Boots razor and the Merkur one. Hopefully after a few more shaves there will be less blood.

Chicken with crispy prosciutto and Parmesan served with prosciutto wrapped asparagus and pasta

Here’s a recipe I saw on Jamie’s Ministry of Food

What you need

  • 30g of grated Parmesan cheese
  • 2 sprigs of fresh thyme leaves removed from the stalks
  • 10 slices of Prosciutto ham
  • 2 Chicken breasts
  • 1 Lemon
  • Freshly ground pepper
  • Olive oil
  • Cling film
  • 2 Cherry tomatoes
  • 10 Asparagus tips

Chicken

  1. Score the bottom of your chicken with diagonal lines.
  2. Place both pieces of chicken side by side on an even surface.
  3. Season lightly with some freshly ground pepper.
  4. Zest some lemon onto the chicken and add 15g of parmesan to each fillet.
  5. Lay 3 prosciutto slices onto each fillet, this will also work as the salt seasoning, so no need for extra salt.
  6. Place a layer of cling film of each fillet and squash them by hitting them with a frying pan. Try get them as thin as you can, about 1cm or so for each fillet.
  7. Heat a pan to a medium heat and drizzle some olive oil on.
  8. Place the fillets prosciutto side down and fry for 3 minutes, flip and fry for another 3 minutes, flip one more time and fry for 30 seconds to crisp the prosciutto.
  9. Take off the pan and serve.

Asparagus

  1. Lay 2 pieces of prosciutto down on a flat surface.
  2. Add 4 asparagus tips to each piece of prosciutto.
  3. Squeeze a cherry tomato so that all the pips come out and open it up and lay it down on the 4 tips.
  4. Place 2 more asparagus on each of the prepared pieces.
  5. Roll the prosciutto over the asparagus and keep rolling until its all together.
  6. Roll each package in one more piece of prosciutto to keep it together.
  7. Place each package on a roasting dish.
  8. Cut the lemon that was zested earlier in half and place in the middle of the 2 packages.
  9. Drizzle in olive oil, making sure you cover the tips.
  10. Cook at 200*c for 5 minutes.
  11. When cooked, squeeze the lemons over each package and serve

  1. I served this with some chunky pasta tossed in a bit of butter.

dinner

Hot and spicy beef stirfry

This is one of my girlfriend Catriona’s favourite dishes.

What you Need

  • Thinly sliced beef
  • Vegetables – Carrots, Broccoli, Mangetout, baby corn – M&S Chefs prepared vegetables
  • Vermicelli Noodles – 2 portions
  • 1 tsp Chili Powder
  • 1 tsp Cayenne Pepper
  • 2 Cloves of garlic – minced
  • 1 tbsp Sesame seeds
  • 2 capfuls of Xiaoxing rice wine
  • 1 dash of Rice Vinegar
  • Sesame seed oil
  • Ground nut oil
  • Dark and light soy sauce

Preperation

  • Chop vegetables into bit size pieces.
  • Slice beef into bit size pieces.
  • Add some sesame seed and ground nut oil to your wok and heat on high.
  • Mince garlic.
  • Prepare 1tsp of chili powder and 1tsp of cayenne pepper and 1tbsp of sesame seeds.
  • Prepare noodles as directed for stir frying – For me i had to place the noodles in boiling water for 3 minutes.

Cooking

  1. Add the chili powder and cayenne pepper to the oil and mix.
  2. Add the garlic and let it reach a nice golden colour.
  3. Add your beef, make sure all the pieces have separated.
  4. Add 2 capfuls of rice wine plus 1 dash of rice vinegar and mix into the beef and oil.
  5. Once meat is browned, add all of the vegetables and mix into the sauce.
  6. When the vegetables are starting to get soft, add the sesame seeds and mix.
  7. Now add the noodles and mix thoroughly.
  8. Add some light soy for taste and dark soy for colour.
  9. Continue to fry for another minute until all the noodles have reached the same colour then serve.

Glazed filet steaks with mash and asparagus

What you need

  • 2 8oz filets
  • 2 cloves garlic, whole, lightly crushed
  • 1 Sprig rosemary
  • 1 Sprig thyme
  • 1 bay leaf
  • Approx 250ml chicken stock – I used a stock cube to make this
  • Olive oil
  • Salt & freshly ground black pepper
  • 2 lemons, zested
  • Handful flat leaf parsley, chopped finely
  • 500g of Maris Piper potatoes
  • 8 Asparagus tip

Mashed Potatoes

  1. Wash and peel potatoes.
  2. Chop potatoes in small cubes to cook faster.
  3. Place potatoes into the pot and run under cool water until all the starch has disappeared form the water.
  4. Add some sea salt and bring to the boil.
  5. Prick the potatoes with a fork, when they slide off easily you’ll know they’re done.
  6. Drain potatoes in a colander and leave them sitting in it with the lid left on top and allow to dry for a bit.
  7. Use a potato ricer to mince your potatoes into the pot
  8. Add some butter and milk to taste and mix thoroughly
Glazed Steak
  1. Heat a small bit of olive oil in a pan to a high heat
  2. Season your steaks with salt and pepper
  3. Place steaks onto the pan away from you and allow to sear
  4. Turn steaks with some thongs and do this for 2.5 minutes, the goal is to get a good colour on the steaks
  5. Once steaks are full seared, add the garlic, rosemary, bay leaf and thyme to the pan and allow to heat for a few seconds
  6. Add 1/4 of the stock to the pan, making sure it touches everything
  7. Roll the steaks in the stock to try and get a coating
  8. Once the stock is gone, keep adding a small bit at a time, just enough to coat the bottom of the pan
  9. Mix the ingredients in the stock again and keep coating the steaks
  10. Repeat this for 8 minutes.
Asparagus
  1. Prepare asparagus by chopping off the woody stalks
  2. Steam for 4-8 minutes until they have turned bright green
  3. Quickly sear in the pan after the steaks have been cooked to add more flavour
Gremolata
  1. Finely zest both lemons
  2. Finely chop some parsley
  3. Mix both and chill in the fridge until serving

Serving

  1. Lay 2 asparagus in the center of the plate. Roughly 9/10ths the length apart
  2. Place another 2 on top of those in the other direction to create a square
  3. Butterfly cut the steaks and place on top of the asparagus
  4. Sprinkle the gremolata on top of the steaks
  5. Add a dollop of mash on either side of the steak
  6. Drizzle a small bit of the pan juices all along the edge of the steak
  7. Serve

Roast Chicken

Sunday is roast day, doesn’t matter what animal it is, but it needs to be roasted.

Yesterday i decided to do chicken with roast potatoes, mashed potatoes and roast carrots & parsnips.

What you Need

  • Whole Chicken – I used M&S’s chicken for this
  • 2x 500g of Maris Pipers Potatoes – These potatoes seem to be the perfect all rounder
  • Seasonings – Salt, pepper, paprika
  • Carrots – 2 or 3 would feed 1-2 people
  • Parsnip – 1 large one would feed 1-2 people
  • Butter & milk – For the potatoes
  • Olive Oil
  • Bisto
  • Stock Cube – I used Knorr bouillon cubes
  • 1 Lemon – Cut into wedges
  • 2 Cloves of garlic

Chicken

  1. Take chicken out of packaging and remove the binding.
  2. Clean the chicken if it has not been prepared already.
  3. Make a mixture of salt, pepper and olive oil for rubbing onto the chicken.
  4. Rub the inside of the cavity with this mixture, then fill it with lemon wedges and garlic.
  5. Separate the skin from the breasts by pushing your fingers in-between it, be careful not to push too hard as it might tear the skin. Rub some of the oil mixture onto the breasts aswell.
  6. Bind the chicken backup with the legs sticking into the cavity.
  7. Rub down the chicken with the oil mixture making sure its completely covered.
  8. Sprinkle a little paprika onto the chicken and rub it all over for a bit of colour and flavour.
  9. Place into baking tray or back into the foil tin the chicken came in and place in the oven on the middle/top shelf at about 150ºc for time specified for the chicken, about 1hour per kg or so.

Mashed Potatoes

  1. Wash and peel potatoes.
  2. Chop potatoes in small cubes to cook faster.
  3. Place potatoes into the pot and run under cool water until all the starch has disappeared form the water.
  4. Add some sea salt and bring to the boil.
  5. Prick the potatoes with a fork, when they slide off easily you’ll know they’re done.
  6. Drain potatoes in a colander and leave them sitting in it with the lid left on top and allow to dry for a bit.
  7. Use a potato ricer to mince your potatoes into the pot
  8. Add some butter and milk to taste and mix thoroughly

Roast Potatoes

  1. Wash and peel potatoes.
  2. Chop potatoes in small cubes to cook faster.
  3. Place potatoes into the pot and run under cool water until all the starch has disappeared form the water.
  4. Add some sea salt and bring to the boil.
  5. Prick the potatoes with a fork, when they slide off with a small bit of resistance you’ll know they’re done.
  6. Drain potatoes in a colander and leave them sitting in it with the lid left on top and allow to dry for a bit.
  7. Put some olive oil on a baking tray and place potatoes on it.
  8. Put in the oven for 35-45 minutes.
  9. Drain on paper towels to remove excess oil.

Roast carrots and parsnips

  1. Wash and peel the vegetables.
  2. Cut into sticks.
  3. Place in a preparation bowl and add brown sugar to coat.
  4. Put in the fridge until needed.
  5. Place on baking tray or in the roasting dish (chicken was inside its foil container) and drizzle with a bit of olive oil and add a bit more sugar.
  6. Cook for 25-35minutes until they’re cooked to preference.
  7. Drain on paper towels to remove excess oil.

Gravy

  1. Add 20ml or Bisto into a pot.
  2. Add 1 bouillon cube.
  3. Add the juices from the chicken, make sure to tip it up to get all the juices from the cavity.
  4. Add about 150ml of hot water and mix and bring to the boil to thicken.

To serve, I cut the breasts away from the chicken and placed on the plates.

Potatoes and vegetables were served in bowls with paper towels

Gravy was served in a gravy jug.

Mash was served in dollaps on the plate with the chicken.

Its alive!

After some modding to the psu, my Roomba 535 is now in action. After it’s inital 16 hour charge it was time to test it out. I gave it a small test and tried it in the hallway. After about 30mins of runtime it started making some weird noises so I decided to check it out. The brushes were completely clogged with hair and fluff from the carpet. After a quick clean of it’s parts it spent another 30mins or so cleaning and gave a little chirp to let me know of was complete. First results were a success. I will now need to try clear some paths in the bigger rooms so it can run it’s own course.

Tags:

First post

So first post and I’m trying it from my iPhone. The client seems pretty fully featured bar missing horizontal support. I’ve just tried getting the maemo client for my Nokia N800 to connect but with no joy.
More to come