Home Blog Page 43

Make Your Own Concrete Planters Using Scrap Plastic Bottles

If you’ve been on Pinterest lately, you’ve likely seen a couple of fantastic concrete ideas including these little planters. They are super simple to make and are really cheap, an old plastic bottle is used as the mould and a small bag of cement is all that you need to buy. Here’s a guide to make your own small concrete planters.

What You Need To Make These Concrete Planters

  • An Old Plastic Bottle Per Planter
  • A Small Bag Of Dry Cement Mix – Buy Here
  • Vaseline – Buy Here
  • Craft Knife – Buy Here
  • Sand Paper (120-160 grit) – Buy Here
  • A Few Small Stones To Be Used As Weights

How To Make The Concrete Planters

Cut the plastic bottle into three sections. Cut the bottom and the top of the bottle off of the middle section. The bottom section of the bottle is going to be the mould for the outside of the planter and the top section of the bottle will be the planter insert in which your plant will go.

cut the plastic bottle

Now rub the bottle top and bottom with Vaseline to make the plastic come away from the cement easily. Rub Vaseline on the inside of the bottom part and on the outside of the top part of the bottle.

rub vaseline on the inside

Now mix up the cement with water as per the instructions on the packaging. Mix a big batch if you’re making a number of planters or a portion of the bag for one or two planters. If you prefer a whiter look for your planters then use cement used for smoothing walls.

mix the cement and water

Pour the cement mix into the large container, the bottle base.

fill plastic bowl with cement

Gently press the small bottle top into the cement in the larger container. The bottle top should sit roughly in the centre of the cement mix (although it can be offset for an artistic look) and should be about a finger width from touching the bottom of the large container otherwise the cement may be too thin and will crack.

put smaller plastic insert into the cement

once you are happy with the position, place a stone or two into the bottle top to keep it in place.

add a stone weight to keep the insert in place

Now allow the cement to cure for a day or two as per the directions on the packaging.

allow the cement to cure

Once the cement has cured, press the cement out of the mould. It should come out quite easily because of the Vaseline.

remove the planter from the mould

Take a small piece of sandpaper and clean up the edges.

sand the edges smooth

Now fill the planters up with some soil and place your plant inside, its that easy.

Have you made any interesting things with concrete? Let us know in the comments section below.

This guide is based on How to Make Concrete Planters by Inablue and has been modified and used under the creative commons license CC BY NC SA.

Make a Ring by Melting Pennies

Make this zinc based ring, which can be given as a gift or even used as a wedding band by melting a couple of pennies. Pennies minted after 1983 are made from zinc with a copper coating. The copper can easily be smelted off using a propane torch.

While a lathe helps with the shaping of the ring, it is not completely necessary. You can use a rotary tool or a couple of files to shape the ring by hand if you don’t have a lathe.

Caution: Melting pennies releases Zinc Oxide fumes which cause flu-like symptoms including fever, chills, nausea, headache, fatigue, muscle aches, joint pains, shortness of breath, chest pain, and cough. Use a well ventilated area with power assisted ventilation to avoid breathing these fumes.

What You’ll Need To Make A Ring From Pennies

  • About 10 Pennies Depending on the Ring Size
  • Steel Spoon
  • Propane Torch
  • 1/2″ Pipe Section – As A Mould

How To Make The Ring From Pennies

Place the 10 pennies onto a spoon and heat them with a propane torch. Hold the spoon with locking pliers or a clamp of some sort as it will become extremely hot. After a while, the pennies will start to liquefy, you can then use a metal probe to separate the copper from the zinc.

Now pour the molten zinc into the 1/2″ tubing to form a zinc ingot.

making the ingot

Allow the metal to cool down for about a half hour, it should then come out of the mould quite easily.

the pennie ingot

You’ll now need to work the ingot into the shape for your ring. Start off by rough shaping the outside, rounding the edges and removing any rough spots. You can do this with a lathe or a rotary tool. Once you’ve shaped the outside, drill a hole in the centre which is large enough to fit over the smallest section of your pry bar.

drill a hole in the centre

To expand the hole, gently hammer the ring over your pry bars, starting out with a small bar and moving up in size as the ring expands. Be careful not to increase the size too quickly as you may tear the metal. Keep hammering until the ring is the right size for your finger.

size the ring

Once you’re happy with the size, you can start with the final shaping. Use a rough sandpaper to shape the inside and outside edges of the ring, round the edges and remove and blemishes.

sand the ring to shape

A lathe helps with the sanding process but a rotary tool works fine and you can also do it by hand.

Finally, finish the ring off by polishing the surface with a light abrasive metal polish and a buffing wheel.

polish to a shine

Have you made a ring from commonly available materials? Let us know your tips and tricks in the comments section below.

 

Share This Guide

Make a ring by melting down pennies

LED Lantern From A Recycled Soda Can

If you love drinking soda then you’ll likely throw out a lot of cans. Here’s a creative way to recycle them by making a small LED lantern.

You could also replace the LED with a tea light however the LED has a few advantages, for one it is a lot safer as it doesn’t heat the can up and it also lasts a lot longer than the candles do.

What You Need To Build A LED Soda Can Lantern

How To Make The LED Lantern

Start off by cleaning out the soda can, rinse it out with fresh water and a bit of dish soap or alternately stick it into the dishwasher with your next load of dishes.

clean out the soda can

Now you need to mark the cut intervals on a piece of masking tape. Stick a strip down the length of a ruler and mark the tape with a marker or pen in 1cm (1/2″) intervals, you can increase or decrease the interval sizes to your liking.

mark the cut intervals on masking tape

Once you have finished marking out your tape, stick it onto the can. Stick the marked piece around the bottom of the can and an unmarked piece around the top of the can as shown.

stick the tape onto the can

Next, use a ruler and make light cuts along the interval lines between the masking tape. You don’t need to cut all the way through the can in this step, just make sure that the lines are well marked, a scratch through the paint finish is perfect.

make the straight cuts

Once you have finished marking all of the intervals, you can begin making the deep cuts through the sides. Work slowly and don’t apply too much pressure or you’ll dent the can. It may take a few runs to get through the metal.

To make this step a bit easier, you can fill the can with water and freeze it. Once the water is frozen, cut the lines through the sides. The ice will help keep the can in shape and prevent it from collapsing.

make the cuts all the way through

Once you have made all of the cuts, you need to bend the sides outwards to form the lantern. Apply pressure to both sides of the can and make sure that the strips move outwards and not inwards. Squash the can a little to create a gradual bend in the side strips. Don’t squash the can too much so that the bends become sharp, they should be rounded.

squash the can to form the lantern

Lastly prepare the LED by placing the button battery between the two terminals, the LED should then light up. If it does not light up immediately, flip the battery over between the terminals and try again. Wrap some tape around the terminals to keep the battery in place and the terminals in contact with the battery.

prepare the led

Place the LED into the can and your LED soda can lantern is now ready to be used. Place them around the house or down a lane, path or driveway in your garden.

The battery should last for about 8 hours and can easily be replaced for the lantern to be used again.

Have you made these lanterns? Let us know your tips and tricks in the comments section below.

This post is based on Recycled Soda Can LED Lantern by geekrex, it has been modified and used under CC BY NC SA

 

Top Painting Tips for 2017

Paint is an excellent way to bring a fresh look to a room or upscale and item of furniture, here are some tips to make your next painting job a breeze.

Keep It Wrapped Up

wrap your brushes in plastic

Paintbrushes can be kept for years if they are stored correctly, wrap them up in some plastic wrap or an old sandwich bag to keep the bristles together and keep them from fraying. You can also use this tip when you need to take a break in the middle of a paint job and you don’t want to have to clean the brush, the plastic wrap will keep the paint from drying out.

Add Texture To Your Walls

use string to add texture

Wrap a strand of string around your roller to give your walls some texture when painting, this technique is perfect for a feature wall.

 

Make It Sticky Again

microwave your masking tape

If you’ve got an old roll of masking tape which is stuck together, put it in the microwave for a minute. The heat will help melt the glue a little so that you can use the tape again.

Strain Your Old Paint

strain your old paint before painting

Rather than throwing out your old tins of paint which have accumulated a few globs and flakes, use an old container and turn it into a paint strainer. The paint strainer filters out any unwanted bit and leaves you with a container of usable paint again. You can do this with most paints which are newer than four years, anything older than this and its probably best to throw them out anyway.

To make a paint strainer, simply cut a hole into the lid of a container or bucket and faster a stocking or pantyhose to the lid. Feed it through the hole and your strainer is ready to use.

Newspaper Is The New Painting Tape

Instead of using masking tape, use a couple of wet strips of newspaper, stick them onto the glass alongside the strip you are painting and they’ll do the job of masking tape. They are also much easier to remove.

 

Do you have any tips and tricks for painting? What have you painted recently? Let us know in the comments section below.

The 10 Best DIY Solar Panel Tutorials

Whether you’re looking to take your home off grid completely or your’re simply interested in using a few panels here and there to supplement your electrical supply, these solar panel tutorials will certainly help you out. These tutorials offer a range of different panel designs to suite almost every application and every budget.

This post has been sponsored by PoolHomeSchool, a great resource for swimming pools, including care and maintenance tips and guides as well as product reviews and buying guides.

Homemade 63 Watt Panel

homemade 63 watt solar panel
From: Instructables

Make this 63 Watt panel using bought cells, perfect for camping or running small household items.

Build A Panel Out Of Damaged Solar Cells

solar panel from damaged solar cells
From: Mnn

Making your own panel doesn’t get cheaper than using damaged solar cells. Build a panel from discarded damaged or cracked solar cells for a really cheap solution. If you’re skeptical about using broken cells, have a look at our test, they really do work.

Glass Frame DIY Solar Panel

glass frame diy solar panel
From: The DIY Life

Say goodbye to water, moisture and dust by building a panel with a glass frame instead of the conventional wood or aluminium frame. The glass seals the best and provides the best protection against water and dust.

Power Your Apartment With Solar Panels

power your apartment with solar
From: Instructables

Create a sustainable living space by combining solar panels and batteries to power your apartment.

Build A Solar Panel Out Of Soda Cans

solar panel made out of soda cans
From: Freeonplate.com

Save the earth twice by using alternative energy and recycling by making use of old soda cans with this soda can panel.

Folding 15 Watt Panel

folding 15 watt solar panel
From: Instructables

If you’re looking for a compact, portable and durable panel for camping or outdoor trips then try out this tutorial.

DIY Swimming Pool Heater

diy solar swimming pool heater
From: Instructables

Relax in a warm pool all year round without breaking the bank, this pool heater uses a selection of common hardware to harness the warmth of the sun and in turn use it to heat up your pool’s water. If you’re not up for the challenge in building your own, you could always consider buying a solar pool heater. Have a look at this great buyers guide.

Home Built Power System

home built solar power system
From: Instructables

Forget about monocrystalline or polycrystalline cells, this tutorial uses tougher CIGS to keep your electronics running now matter what the weather is like.

Simple DIY Home Power System

diy home solar power system
From: Eartheasy

Bring some of the benefits of electrical power to your off grid home with this basic energy system. This solar panel system enables you to charge devices, provide energy for lights and even power a small refrigerator.

DIY Curved Panel

diy curved solar panel
From: Instructables

If you’ve got a lot of broken cells and a curved surface, try making this curved panel.

Have you tried any of these tutorials or built your own solar panels? Let us know in the comments section below.

Top 10 DIY Bathroom Upgrades, Easy Weekend Projects

The bathroom may not be your favorite room in your house but it is one of the most important when you’re thinking about selling your home. You can also make your day to day life a lot easier with a well organised bathroom. So boost your DIY skills and give your bathroom an organisation or functionality update this weekend. Here are 10 projects to do so which are easy to do and won’t cost you much money.

Add An LED Strip Light Under Your Cabinet

add led strip lights under your cabinets
From: DIY Network

Instead of a night light, add an LED strip light to the underside of your bathroom cabinets, they’ll prevent stubbed toes and give you just enough light to see where you’re going without waking you up completely.

Mount Mason Jars Above The Sink

mount mason jars above the sink
From: The Apron Blog

If you’ve got accessories and products you want to keep out of the way but still in reach, mason jars are the solution. Mount them onto a piece of wood using some hose clamps for a stylish storage solution. They are also easy to remove for cleaning and you can use the coloured jars to match your colour scheme.

Organise Your Bathroom Cabinet With A Slide Out Drawer

build a slide out cabinet drawer
From: Remodelaholic

It’s much easier to reach the products at the back of your cabinet if you’ve got a slide out drawer. You can customise this project to your needs with multiple drawers and different compartments.

Make A Cork Bath Mat

make a cork bath mat
From: Craftynest

If you’ve got a jar or box of wine corks lying around, turn them into a functional bath mat, the corks are naturally soft and mould resistant.

Keep Your Cords & Accessories Together With PVC Pipes

pvc pipes to keep cords together
From: Unplggd

Cords are one of the most annoying things about storing your gadgets, no matter how well you pack them up, they always seem to get tangled. Keep your cords together by mounting a few PVC pipes on the cabinet door. Now you’ve got place for each accessory and its cord is kept far away from the others.

Build A Storage Unit Behind Your Mirror

build a storage cabinet behind your bathroom mirror
From: Shanty 2 Chic

If you’ve got a full length mirror in your bathroom or bedroom, use the space behind it by building a shallow storage cabinet with the mirror as the door. You may even be able to recess the cabinet into the wall for further space savings.

Create A Stackable Plate Organiser To Keep Your Counter De-cluttered

stackable plate organiser
From: Thoughtfully Styled

While this is not a new idea, its not commonly done in the bathroom, its usually used for serving food. Buy why not save on counter space by using a plate stacker in the bathroom, what’s even better is that you can just put the plates in the dishwasher when they become dirty.

Make A Smart Mirror

This one is for the more techy people, make yourself an Android powered smart mirror to display things like the weather, your calendar and news notifications. Its a mini control centre to glance at while you’re brushing your teeth in the morning.

Add A Second Shower Rod For Additional Storage

add a second shower rod for storage
From: Reddit

This is one of the easier and more useful projects, add another shower tension rod with some hooks and baskets and you’ve instantly got a lot more storage in the shower. You can also use it as a clothes line for drying towels and laundry.

Update Your Bathroom Fixtures

Perhaps one of the easiest and most effective ways to make your bathroom look more modern is to update the fixtures such as the faucets or taps and shower head. You’ll be surprised at what a big difference these updates can make to the appearance of your bathroom.

Have you tried any of these projects? What have you done in your own bathroom to update it? Let us know in the comments below.

Share These Projects

10 projects to update your bathroom

10 Awesome Recipes For Cosmetic Products You Can Make Yourself

There’s no denying that cosmetic products are expensive, the all natural ones even more so. Fortunately, a number of products can be made at home without and fancy equipment and without any harsh chemicals, you know exactly what you’re putting into them.

Have a look at these 10 recipes for homemade cosmetic products which we’ve found for you.

Try this whipped body butter to soften and soothe your skin.

whipped body butter
From: naturalbeautyworkshop

This shampoo made from pure natural oils will help your hair grow faster and stronger. You can add a variety of oils to suite your hair type.

strenghtening shampoo
From: ehow

The soothing scent of lavender helps you to relax and de-stress while the natural oils will get to work on your skin, clearing blackheads and blemishes and reducing wrinkles. Try this face mask out after a stressful day at work.

soothing face mask
From: clones n clowns

Makeup removing face wipes are really expensive for what they are, try these long lasting makeup wipes out. They work just as well as the store bought ones and cost a fraction of the price.

makeup remover face wipes
From: coxquads.blogspot.fr

Try out a natural sunscreen which provides protection from the sun while moisturising and nourishing your skin.

light SPF sunscreen
From: sweetroots

This lemon and sugar face scrub helps to exfoliate and fights both acne and wrinkles.

lemon sugar face scrub
From: cocorrina

Indian skin care powder works to get rid of pimples, age spots, wrinkles and blemishes.

indian skin care powder
From: diybeautyblogger.com

This Epsom salt foot scrub will leave your feet feeling soft and also deodorised.

epsom salt foot scrub
From: nerdsandnomsense

Cuticle oil stops your skin from tearing, strengthens your nails and helps to heal your hands after a manicure. Follow this recipe for homemade cuticle oil.

cuticle oil
From: whatthegelnails.com

Shower jellies are perfect to cool off an exhausted body after a hard days work. They soothe your skin and help you to relax, they’re also super quick to make.

cooling shower jellies
From: lifeannstyle.com

Have you made your own cosmetic products? Let us know which recipes you’ve tried in the comments section below.

10 Woodworking Projects To Build With 2x4s

If you’ve ever worked with 2x4s, I’m sure you know just how versatile they can be – and they’re really inexpensive. We’ve put together a list of ten of our favorite woodworking projects which are built entirely from 2x4s, so pick out your favorite and get to work on a new piece of furniture to upscale your home and impress your family and friends.

Find Your Next Woodworking Project Using 2x4s

Build yourself a classic wooden desk, its hard wearing and can be sized to suite that gap in the corner of your lounge or passage.

2x4 homemade desk
From: A Turtles Life For Me

Now this is an original and useful piece, a kitchen phone table to create a bit of extra space on your kitchen counters.

2x4 kitchen phone table
From: Funky Junk Interiors

Add some storage space and a counter for decor to your lounge with a rustic farmhouse console, specially made to suite the length of your sofa or couch. If you’re a bit more experienced with wood work, you could even carving patterns into the legs or turning your own legs on a lathe with a wood chisel.

2x4 rustic lounge console
From: Anna Whie

An ottoman has become commonplace at the end of our beds but why not try building your own bed end bench from 2x4s? You can even choose a stain and fabric colour to match your existing furniture and bedding.

2x4 bed end bench
From: Anika’s DIY Life

Do you have a space near your entrance for a entrance table? It’s a really useful place to keep your keys, wallet, handbag and phone and, with a few decor items, can really brighten up your homes entrance.

2x4 entrance table
From: The Project Lady Blog

If an entrance table is not your thing then how about a more functional bench? We love the two toned colour scheme with the white paint and the stained wood.

2x4 entrance bench
From: The Creative Mom

We’ve already discussed how useful a storage basket or bin can be for getting your home organised and clutter free, why not make a decorative one to fit in with your home’s decor. Here are plans to build your own portable storage basket from 2x4s.

2x4 storage bin
From: More Like Home

This decorative 2×4 garden lantern will look right at home on your porch or under a tree, it’s a great project if you’re just getting started with wood working as the cuts and edging don’t need to be perfect.

2x4 garden lantern
From: DIVA of DIY

This useful little table for your patio or porch is perfect for your evening drink or to do some re-potting.

porch or patio side table
From: Refresh Restyle

If you’re looking for some extra storage space in the lounge or a side table for your bed, this 2×4 side table cart may be just what you need.

2x4 bedstand or side table
From: Infarrantly Creative

We hope this list has inspired you to get your woodworking tools out and start on your next project. Have you built anything useful out of 2x4s? Let us know in the comments section below.

Share These Ideas

10 Woodworking projects to build with 2x4s

Make Your Own Chalk Paint – Cheap & Easy Recipe

Chalk paint is great for those furniture update projects, it requires very little prep work and does a great job masking imperfections and dark paint colours. The only real downfall is the cost, especially when you’re looking at painting a large cabinet or book case. Fortunately you can now make your own chalk paint which looks identical to the store bought ones and costs only a fraction more than ordinary paint.

Once you’ve made your own chalk paint, you’ll need something to paint! Here’s a guide to giving some old chairs a makeover, or you could try your hand at flipping other items of furniture.

What You’ll Need To Make Your Own Chalk Paint

  • 3 Parts Latex Paint – Buy Here
  • 1 Part Plaster of Paris Mix – Buy Here
  • Water
  • An Empty Tin or Mixing Container
  • Paint Stirrer / Electric Mixer – Buy Here

How To Make The Chalk Paint

To make the chalk paint, you first need to mix up the Plaster of Paris and water. Stir the Plaster of Paris well using the paint stirrer or electric mixer until it is smooth and doesn’t have any lumps.

Now add the paint to the Plaster of Paris mix in the ratio of three parts paint to one part Plaster of Paris. Stir the mixture again with the stirrer or mixer until the paint is well blended and the colour is consistent throughout. If the mixture comes out too thick then add a bit more water and if it comes out too thin then add a bit extra Plaster of Paris.

The paint should get a chalky consistency but if it is mixed in the correct ratio, the colour won’t change. You can lighten the original colour a little by mixing in additional Plaster of Paris up to about a 1:2 ratio but don’t exceed this or the paint quality and finish will deteriorate.

Your paint is now ready to use. The beauty of chalk paint is that you don’t need to do any prep work, just wipe the furniture down and make sure that there are no greasy or dirty areas and you’re ready to start painting.

For a distressed look, use a fine (180 grit or above) sandpaper to gently remove some of the paint around the edges and corners once it has dried fully.

repurpose old furniture
Old French Furniture by French Finds

Use your homemade chalk paint to repaint that old dresser, odd chair or side table that doesn’t quite fit in. You could even start flipping thrift store furniture to make a bit of extra money on the side.

Have you tried making your own chalk paint? Let us know your recipe and painting tips in the comments section below.

Share This Recipe:

Make your own chalk paint, cheap and easy recipe

Using Arduino Functions Correctly, Make Your Code More Efficient

Dividing your code up into functions or methods allows you to perform similar actions multiple times without having to duplicate the code. Functions are essentially modular blocks of code which perform a defined task and then return to the area of code from where the function was initially called.

This exercise assumes that you have a basic understanding of the Arduino IDE and how to upload a sketch, if you haven’t done this before, have a look at our guide to writing and uploading your first Arduino sketch.

The advantage of using functions come in when you need to debug or modify your code. Say you use the number of times an LED blinks throughout your code to readout different values and you decide that you want the LED to blink more quickly. If you haven’t used methods, you’d have to go and change the rate each time you’ve asked the LED to blink whereas with a method, you only need to change a single line.

The predefined sections of code setup() and loop() are functions which your Arduino has been programmed to recognise. There are essentially four types of functions which you can use, we’ll go through each one, how to define it and how to call it in the order of increasing complexity.

Basic Void Functions

To demonstrate the use of functions, we will use the Arduino’s on board LED and the Serial monitor function later on to display the returned results.

The function gets defined outside of any of the other functions in the code in a similar way to the setup() and loop() functions. The basic structure is:

void functionName()
{
  function contents
}

The function is called within the code using the syntax:

functionName();

The function can be called from within the setup() function, the main loop() function or from within other functions in the code.

Here is an example of a function which blinks the on board LED once. The function is called up in the main loop to blink the LED three times.

//The DIY Life
//By Michael Klements
//01/03/2017

void setup()
{
  pinMode(13, OUTPUT);  //Assign the on board LED to pin 13
}

void loop() 
{
  blinkLED();
  blinkLED();
  blinkLED();
}

void blinkLED()
{
  digitalWrite(13, HIGH);
  delay(1000);
  digitalWrite(13, LOW);
  delay(1000);
}

Basic Return Functions

The placeholder void before the function name indicates that nothing is being returned by the function. It is often useful for a function to be able to return some type of variable to your main method. The type of variable which the function returns then replaces the void before the function name. In this example we will call a function to blink the LED a random number of times, this number will be returned to the main method and displayed in the Serial window.

The function is now declared as:

long blinkLED()

As is called using:

long noTimes = blinkLED();

The complete sketch now becomes:

//The DIY Life
//By Michael Klements
//01/03/2017

void setup()
{
  pinMode(13, OUTPUT);  //Assign the on board LED to pin 13
  Serial.begin(9600);   //Start the serial monitor
}

void loop() 
{
  long noTimes = blinkLED();
  Serial.println(noTimes);
}

long blinkLED()
{
  long randomNumber = random(15);  //Creates a random number between 0 and 15
  for (int i=1; i<= randomNumber; i++)  //Blinks the LED the random number of times
  {
    digitalWrite(13, HIGH);
    delay(500);
    digitalWrite(13, LOW);
    delay(500);
  }
  return randomNumber;
}

Passing Parameters To Void Functions

To increase the functionality of our function, we can pass it parameters from our main block of code. In order to pass the function parameters, we first need to tell the function what type of parameters to expect and assign variable names to them, this is done by defining the parameters in the same way you do within the code but now in the brackets after the function name. We can pass the function any variable types allowed by the Arduino IDE.

void blinkLED(int noTimes, int time)

Now, when we call the function, we will need to pass it the variable it is expecting in the same data type. You can do this by passing it actual values or passing it variables of the same data type.

Call your function using values:

blinkLED(3,1000);

Call your function using variables:

blinkLED(noTimes,time);

The complete sketch would now look like this:

//The DIY Life
//By Michael Klements
//01/03/2017

void setup()
{
  pinMode(13, OUTPUT);  //Assign the on board LED to pin 13
}

void loop() 
{
  blinkLED(3,1000);
}

void blinkLED(int noTimes, int time)
{
  for (int i=1; i<= noTimes; i++)
  {
    digitalWrite(13, HIGH);
    delay(time);
    digitalWrite(13, LOW);
    delay(time);
  }
}

Passing Parameters To Return Functions

Finally, we can combine the two and pass parameters to a function which also returns a variable. In this example, we will call a function which then blink the LED a random number of times between zero and a limit we send to the function, the random number will then be displayed on the serial monitor.

The complete sketch is now:

//The DIY Life
//By Michael Klements
//01/03/2017

void setup()
{
  pinMode(13, OUTPUT);  //Assign the on board LED to pin 13
  Serial.begin(9600);
}

void loop() 
{
  long noTimes = blinkLED(20);
  Serial.println(noTimes);
}

long blinkLED(int limit)
{
  long randomNumber = random(limit);  //Creates a random number between 0 and 15
  for (int i=1; i<= randomNumber; i++)  //Blinks the LED the random number of times
  {
    digitalWrite(13, HIGH);
    delay(500);
    digitalWrite(13, LOW);
    delay(500);
  }
  return randomNumber;
}

And that is everything you need to know about using functions with an Arduino. If you have any questions or suggestions, let me know in the comments section below.