Hardware opens another dimension to your software

I have to confess, I’ve always been in love with hardware. To me hardware is just a wonderful dimension that you programmers can benefit from greatly when you get the hang of its basics. That is of course if you are like me, somebody who want to take his work off the screen every once in a while. Now that we have fantastic and cheap prototyping hardware like Arduino and Raspberry Pi (RPi), it’s a matter of just experimenting and time in order for you to integrate hardware into your applications. Moreover even games, I’ll be talking about my experience so far with the Arduino and Raspberry Pi.

The cute little: Arduino

The Arduino is a hardware prototyping device that has an Atmel microcontroller. It’s basically a small computer that contains a CPU, memory and a storage space. You can utilize those to write application that interact with the physical world. Along with the microcontroller you’ve got multiple pins that you can use as input/output ports. These ports will allow you to send and receive data with many other electronics using digital or even analog. Arduino comes in many flavors from boards to tiny pieces that you can even put in your own clothes. The board can be programmed with a tool called Arduino IDE which is a compact programming environment.

This comes with a subset of the C/C++ programming family. Meaning if you know C/C++ you’re in good shape to program the device and let it interact with the outside world. It can run on battery, this is just so cool if you want to use the device somewhere far from your PC comfort zone.

I’m sure I won’t be able to do justice to the Arduino by writing a small paragraph about it here while the Internet is full of resources. However just know that you have the ability to program the device to control other electronics. Also devices based on many external factors.

For instance you can hook up a motion sensor and then you can send a Whatsapp message for a specific recipient whenever this happens. Talking about that, it’s the project that I’ve done when I was experimenting with Arduino and it worked like a charm.

Arduino is just cool and cheap. What you get in the end is the knowledge that you have to acquire to work with electronics and how to program microcontrollers. This is something that you as a programmer don’t get exposed to very often. However, the good news is, learning those concepts that will allow you to work hardware of many kinds, and it’s not very difficult to learn.

Here is a small thing that I did with the Arduino, it’s a small demo that allows the Arduino to talk to you every once in a while. In order to boost your game development self esteem when you need so while you are in the middle of a nasty loop!

ArduinoTalksGameDev

Big brother: Raspberry Pi

The Raspberry Pi (RPi) is a much matured device compared to the little Arduino. The RPi has an Ethernet interface, couple of USB ports, HDMI output, output jack for audio. It also gives you the ability to load an operating system for an SD card. So in a nutshell, RPi is a true full PC, you get to run Linux and its variants on the machine. That even includes Android, the twist with RPi is that you have multiple pins that you can do input and output with.

They’re normally referred to as: GPIO ports, that stands for General Purpose I/O pins. Since it’s a full Linux box, it gives you more options from connecting to the Internet natively to scheduling jobs to turn on or off a light. As with the Arduino case above, I know that I can’t do justice to RPi as well. However, it’s a fantastic machine you should take a look at if you’re intending to create hardware applications that relies on such high level operating system functions.

Here is another cool picture that shows that ability to even control the RPi box wirelessly while it’s meters away from you. I can turn fans on and off, all from my might PC!

RPiThroughSSH

Hardware and game development.. really?

Both devices serve as a fantastic entry point for everyone interested in working with hardware. Especially software guys. That’s what interested me the most, as a programmer and a game developer myself. I believe that I can create a unique experience for players by integrating hardware for games. Especially by utilizing cheap technologies that have many applications in the gaming world, education or even.. gamification anyone?

Integrating hardware within games is much more than just creating a new “turbo” controller to cheat. It’s about adding more elements that create a special experience out of your game. For example requiring the player to do a physical activity in order to complete an objective in the game is a true experience-changer.

Now just think about it for a second, for every hardware technology out there: infrared, LEDs, RFID, motions sensing and all the cool stuff out there. Wouldn’t it be so cool to just go ahead and create a game with game mechanics? That makes a good use out of those tools in hand? I personally think this is the new “cool” of gaming. just imagine adding that to the Oculus Rift for example? Seriously, think about it before you continue reading.

The line between reality and virtual reality is getting blurry day by day. I’m sure with such technologies the gap is even getting smaller. It’s up to us programmers – and particularly game developers – how we want to drive such technology to serve our aim to provide an amazing experiences to players. It’s just so many parts to choose from, so many scenarios to use those stuff in. So many ideas to excite the player along the way, think about it.

Okay but why?

I’d really recommend for you to experiment with hardware if you have the time. Many things are going to be clear to you, and if you are a game developer. This will open a new door for your ideas, that is if you need a new inspiration source.

How about you do your homework and you Google what you can do with those great tiny cute devices? Let me know what you think.

2 Thoughts to “Hardware opens another dimension to your software”

  1. Nice stuff. What API did you use for sending WhatsApp messages from Arduino?

    1. Thank you man! The trick was to send a message to my machine, and then my machine would use the API “WhatsAPI” to send the actual message to my phone, look up the repo on GitHub, it’s decently documented.

Leave a Reply