) ||!isNumber(pinMapping[pinNumber])) {
		throw new Error("Pin number isn't valid");
	}

	return parseInt(pinNumber, 10);
}

function sanitizeDirection(direction) {
	direction = (direction || "").toLowerCase().trim();
	if(direction === "in" || direction === "input") {
		return "in";
	} else if(direction === "out" || direction === "output" ||!direction) {
		return "out";
	} else {
		throw new Error("Direction must be 'input' or 'output'");
	}
}

var gpio = {
	open: function(pinNumber, direction) {
		pinNumber = sanitizePinNumber(pinNumber);
		direction = sanitizeDirection(direction || "out");

		return qExec(gpioAdmin + " export " + pinMapping[pinNumber])
			.then(function (stdout) {
				return gpio.setDirection(pinNumber, direction);
			}, function (err) {
				printExecError("open", pinNumber, err);
				throw err.error;
			});
	},

	setDirection: function(pinNumber, direction) {
		pinNumber = sanitizePinNumber(pinNumber);
		direction = sanitizeDirection(direction);

		return q.nfcall(fs.writeFile, sysFsPath + "/gpio" + pinMapping[pinNumber] + "/direction", direction);
	},

	getDirection: function(pinNumber) {
		pinNumber = sanitizePinNumber(pinNumber);

		return q.nfcall(fs.readFile, sysFsPath + "/gpio" + pinMapping[pinNumber] + "/direction", "utf8")
			.then(function (direction) {
				return sanitizeDirection(direction.trim());
			});
	},

	close: function(pinNumber) {
		pinNumber = sanitizePinNumber(pinNumber);

		return qExec(gpioAdmin + " unexport " + pinMapping[pinNumber])
			.then(null, function (err) {
				printExecError("close", pinNumber, err);
				throw err.error;
			});
	},

	read: function(pinNumber) {
		pinNumber = sanitizePinNumber(pinNumber);

		return q.nfcall(fs.readFile, sysFsPath + "/gpio" + pinMapping[pinNumber] + "/value")
			.then(function (data) {
				return parseInt(data, 10);
			});
	},

	write: function(pinNumber, value) {
		pinNumber = sanitizePinNumber(pinNumber);

		value =!!value?"1":"0";

		return q.nfcall(fs.writeFile, sysFsPath + "/gpio" + pinMapping[pinNumber] + "/value", value, "utf8");
	}
};

gpio.export = gpio.open;
gpio.unexport = gpio.close;

module.exports = gpio;
Happy 2 Months Old Baby Wishes – Having heard a variety of congratulations on the day your baby was put to bed. It is every parent’s greatest joy to have their child in a healthy state, blessed with the best celebration to welcome him/her here on earth.
However, since it is the second month of the baby’s anniversary, you should not hesitate to celebrate by expressing your gratitude and how happy you are to have the baby alongside your family, friends, and colleagues who are all there to help you. It is true that the baby is too young to understand what you have in store for him/her, but it can be kept in record for the baby when he/she is older to see how mom and dad never joked and how much he/she was worth to them while he/she was growing up.
Writing for your two-month-old baby will undoubtedly be difficult. In this post, I’ve compiled a well-curated collection of Happy 2 Months Old Baby Wishes that I used to welcome my baby when he/she was still a baby. I’m sure you’ll give it a shot. Also, learn to keep detailed records for your baby so he or she can see how loved they were when they were a baby.
Because it’s your second month birthday today, we’re throwing a party. My wish for you is that you continue to mature into the mature young man that you are. Remember, even as you enter your second month, you will always be my favorite baby boy!
With your charming physique, charming smile, and baby kick, you make every sleepless night worthwhile. For me, you have always been a source of great pride. 
Everyone is won over by your infectious grin, which brings us all joy. It’s amazing how much we resemble each other. I can’t wait for you to mature and people to start referring to you as my siblings.
Having a daughter in the family is a true blessing, and we are overjoyed that you have joined ours. On your special day, greetings! You are being recognized as a one-of-a-kind person in every way.
We value your birthday because you have been a special baby, and we want to wish you a happy birthday!
Little boy, happy birthday! Please ask God to bless you and make you a prosperous young man, as well as to fill your life with joy and love.
You are a truly extraordinary young man.  The cutest birthday boy ever! I am excited to see you succeed in all of your endeavors.
On your birthday, sweetheart, thank you for being the best and for the love that we all have for you.
I consider myself extremely lucky to have you in my life.  You deserve everything good in the world, and I hope that they all come to you. Congratulations on your two-month anniversary!
This was my first experience with unrequited love, and I welcomed it. I’m hoping that my one-sided devotion to you will eventually win you over. Happy two months to us, my darling, and may you live long enough to know my love.
I wished for a baby boy two months ago, hoping that his smile would mend my broken heart. You approached me, smiled at me, and assisted me in healing. Happy two months, and may your knowledge guide and lead you to make the right choices.
I held your hands in mine, and it gave me hope. Your two-month-old smile has provided me with the most effective treatment. I adore you and wish you the best of luck!
You’ve been alive for two months! With your adorable looks, I’m sure you’ll be a woman-slayer. I’m the first to fall in love with you; others will follow. I wish you continued good looks.
On this day, I’d like to wish you a happy birthday. You are insignificant, but you are vital to me.  No more postponement. I’m the same way.
We can’t express how much you mean to us in words. Your presence is the source of all good in our lives. Congratulations on your first birthday, sweet little bay!
God gave us the most wonderful gift ever when He sent us a little angel.  Your second month birthday has arrived!
Congratulations on the birth of such a wonderful son! Thanks to you, everything now has a more appealing appearance! With a simple smile, you can make everyone around you happy and smile all day! It’s your two-month anniversary!
Finally, I understand what people mean when they talk about the joys of motherhood. I thank God for giving you to me, and I wish you a happy two-month birthday.
For the first time in my life, I experienced unrequited love, and I relished the opportunity to indulge in it. I’m hoping that my one-sided affection for you will eventually sway you to my side of the bed. Happy two-month anniversary, my sweetheart, and may you live long enough to feel the warmth of my love for you.
I asked for a baby boy two months ago, hoping that his smile would find its way into my heart and help me heal my broken heart. This week, I received my wish. You gave me the strength to mend myself after coming over and smiling at me. Thank you so much for doing so. Two months have passed, and may you continue to be happy as you grow older. May wisdom guide and lead you to the best decisions you can make.
I curled up your tiny little hands in mine, and I knew I could find hope in you. Despite the fact that you are only two months old, your smile has been the most effective therapeutic drug I have ever used. I adore you and wish you nothing but the best!
You’ve been alive for two months now, my darling! I can tell you’re going to be a charming gentleman who will win the hearts of many women just by looking at you. I’m the first to fall in love with you, and I’m sure many more will follow. I hope to see you grow into a lovely lady.
I’d like to wish you a very happy birthday on this special occasion. You’re still tiny, but you’re very special to me. I’ll take your hands in mine one of these days and hand you the world. So,