Building an Arduino Game System 1.0: Setup and schematics

Posts in this series so far:

  1. Introduction
  2. Setup and schematics
  3. Making a Breakout Game (coming soon)

Setup and Schematics

In this first blog post on my Arduino Game System project, we will look at the basic schematics and ideas the project is based on.

Just like most other Arduino projects, the Game System consists of three parts; input (sensors), logic and output.

Input (sensors)

As an input for the Game System we obviously need some buttons, so we can control the players, navigate a menu etc.

In this first version of the Arduino Game System I have chosen to have six different buttons, four movement buttons and two action buttons.

I have used simple tactile switches in this version of the system. Small 6 mm switches for the direction buttons and the larger 10 mm ones for the action buttons. If you decide to make some kind of casing for your Arduino Game System later on, the small switches fits perfectly under a d-pad like the one on the original Game Boy.

Logic

The logic in this system is done on an Arduino Uno. But you can also use other equivalent boards.

For some boards you may have to change the output pins for the composite signal. In this case remember also to change the pin number in the TVout library.

Output

What kind of output you need of course depends on the screen you are going to use.

For this first version og my Arduino Game System, I used a small car rear view monitor I found on Amazon. This is a NTSC/PAL TFT screen which requires a composite video input. For this reason this version of the Game System will have a composite tv signal for its output.

To generate the composite signal I used the Arduino TVOut library.

After some time (and a lot of game code) I did have some problem with this library. But for smaller games this if just fine to begin with. I would like to make a new library for composite video signals at some point, but it is not really a priority at the moment.

To generate the composite video signal you need to resistors. Each connected to a digital pin in one end and connected together to form the signal in the other end as shown in the image above.

Which resistors and pins to use are specified here. As stated previously you may have to change the output pins when using other boards than the Arduino Uno.

Making the games

This post was about the setup of the first version of my Arduino Game System.

If you have some experience with Arduino and programming you might be  able to make your own game right away.

Here at GitHub I have put a bunch of classes which can be used as inspiration for the basic structure of your game. Please note that this repository is a work in progress and meant for inspiration and testing – it might not all work perfectly together all the time 😉

For those of you who are looking for more help getting started with making Arduino games, I also plan to make a small in-depth blog series on how to make a simple Breakout/Arkanoid game for the first version of my Arduino Game System.

I hope you found this post useful 🙂

/Signe

Advanced 3D printed humanoid robots you can build

This friday is all about advanced 3D printed humanoid robots, that you can build!

As the title says, these are advanced projects. And thus mostly meant as inspiration and motivation. In the end of this post you will however find information about an entry level bipedal robot.

InMoov – life-sized and open source humanoid robot

This first robot is huge! And might not be the first project you’ll build. Actually you might never get to build this unless you have a lot of money and spare time.

Or you could be lucky and work at a place that would find this kind of project interesting.

InMoov was developed by Gael Langevin who is a French sculptor and designer.

If you watch the video below and totally fall in love with InMoov, but don’t have the resources to make all of the robot, dont worry. You can easily start with the fingers, a hand and then maybe a full humanoid robot arm!

For more information about how to get started with InMoov, take a look at inmoov.fr .

Poppy – open source humanoid robot (83 cm tall)

This one is so cute, and I totally want one!

A humanoid robot like Poppy is absolutely my ultimate goal.

The smart serial servos used does however make the price for a Poppy a bit higher than I can afford at the moment 😉

But maybe once I’m done with my masters in Computer Science and Engineering and hopefully get a well paid job.

The Poppy humanoid would however be a cool university project!

Luckily the Poppy Project has also made it relatively easy to get started without building a full (super cute) Poppy.

Instead you can start with the Poppy Torso or the Ergo Jr robot arm.

For more information on how to build these project go to poppy-project.org .

Darwin-OP clone (45 cm)

This next robot is one that is used in some of the soccer Robocup competitions around the world.

In the video below is a walk test of a Darwin-OP clone which is made using these instructions on instructables.

Just like the previous robots this can be an expensive build because of the smart servos used.

If you have the cash and don’t want to make it all from scratch, it is also possible to buy an original Darwin-OP (or ROBOTIS-OP). One place to buy it is here at robotshop.com .

Now if you like the Darwin robot but can afford the “real” thing, it is also possible to buy a Darwin-Mini.

The Darwin-Mini is a cute smaller version of the original Darwin-OP and should also be easier to get started with.

Bioloid humanoid robot clone (39.7 cm)

Feeling a bit frustrated with the prices of the above robots?

But you still really want a top notch humanoid to program and mod so it can be your best friend/assistent/what-ever ?

Then this next project might be for you.

While the price is still not student friendly, it is a big step down from the previous robots.

The Bioloid still uses smart serial servos, but a variant that is a bit cheaper than the ones used for Poppy and Darwin.

Actually the instructions on instructables for this Bioloid clone was made by the same guy how made the instructables for the Darwin clone. His reason was that even though it is cheaper the build your own Darwin than to buy one, he knew that the price tag was still to high for most people.

So he made this instructable on how to build a humanoid robot for under 1000 USD.

Entry level Bob The Biped

Okay so all of the robots above might be well beyond your paycheck?

Luckily there are other places to start!

But first I have to note, that the reason that the robots are so expensive is, that it requires a lot of servos if you want to make a robot with enough joints to make it seem human-like.

In addition the needing a lot of servos, the servos used are smart servos which can also have a higher price tag than normal servos.

But fear not!

It is of course possible to make smaller and more simple bipedal robots. These are also good practice while you save up money for those 17-18 smarts servos you need for a bigger robot!

A good place to start is to make one of the various versions of Bob The Biped. Bob only requires four regular micro servos 🙂

I hope the videos in this post were inspirational.

You might not be able to go out a build one of the first four robots any time soon. But my intension was mostly to show what is possible, and maybe give some inspiration and motivation for you to start working on and learning about bipedal humanoid robots 🙂

I am currently building a version of Bob the Biped myself. When it is done I will try to make a post about the build, how to get started and also ideas on how to make a simple biped robot more advanced.

/Signe

Featured image credits:

Poppy Project / Rafiaa Khaddhar

Photo M. Lapeyre

Can be found here.

Building an Arduino Game System: Introduction

Earlier this year, I made an 8×8 LED matrix Arduino breakout game. The game was inspired by the classic Atari Breakout, but limited to 8×8 pixels for the display.

It was a fun way to test the LED matrix and also show how useful these small LED matrixes actually are!

The project also got my interested in other ways to create more advanced Arduino games and maybe even some kind of Arduino Game System.

Posts in this series so far

  1. Introduction
  2. Setup and schematics
  3. Making a Breakout Game (coming soon)

Arduino Breakout

As a start I made a new Arduino Breakout Game using a small tv screen as the display. For this project I used the Arduino TVout library to generate a composite video signal in software.

I will be making another blog post about this game at some point, but for now all I have is some pictures and a video of the ball movements from when I started making the game.

Arduino Game System

After working on the Breakout Game above I wanted to start working on a more dynamic game system. This new system will have a start menu where you can choose what game to play, display high scores etc.

I usually only write about my projects after they are finished, but since I have had some very nice feedback on the initial images and videos I have shared on both my Facebook and Instagram pages, I have decided to make a blog series about the project while I am working on.

This blog series will not be a regular tutorial or How-To, but instead give an insight into what I am working on, the difficulties I encounter, the possible solutions to potential problems and the design choice I make.

Stay tuned for the first blog post which will include the schematics and the base code for my first Arduino Game System.

Until then here is a short video of the Arduino game I am currently working on.

/Signe

 

How to add jumper wires to your dc motor – no soldering

In this blog post I will present you to a simple no-soldering way to add jumper strips to you dc motors.

This method can be used when you just want to try out a new idea or if you are a beginner with no soldering iron.

For more permanent connections, soldering could however be required.

What you need: 

  • dc motor: the motor you want to connect to your project
  • 2 x jumper wires: make sure one of the ends (male/female) fits to where the motor should be connected later
  • Gaffa tape
  • Wire cutters

Step 1: Strip off insulation

First we have to clip off one of the ends of the wire. Make sure that you clip off the right head, and not the one you need later to connect the motor to your project!

After removing the end, strip off 2-3 cm insulation.

The wire is now ready to be attached to the dc motor.

Step 2: Attach wire to motor

Insert wire through hole at motor.

Fold the wire back onto itself and twist it together.

Be careful with this part. The metal connectors on the motors can be quite fragile, so don’t move then around to much.

Add a small piece of gaffe tape to strengthen the connection.

Repeat step 1-2 for the second wire.

Tips and tricks

Congratulations you have now added jumper wires to your dc motor!

Using this method you can now connect your motor to a male/female header on your project.

Remember that the connectors on the motor can be fragile, so you should be careful not to pull to much in the wires after they have been connected. You could also tape the wire to the side of the motor to decrease the chance of pulling off the metal connectors.

3 Maker’s Muse videos to watch when starting 3D printing

If you just bought your first 3D printer or is thinking about it, these three videos are a must see!

Maker’s Muse is a youtube channel focusing on 3D printing and you will find a lot of valuable information here.

I have been watching tons of videos on 3D printing on Youtube the last couple of months. And about two weeks ago we finally got out own printer 🙂

The following three videos are the ones I found most useful starting out.

10 places to get FREE 3D Printing Files

A good way to get to know you printer is by printing different small models.

This video introduced 10 places where people share free 3D models.

Be sure to check the license of the models you download and give credit where it is needed 🙂

The Best Way to Orient you 3D prints

Okay so you are ready to print your first model, but how should it be oriented when printing?

This video introduces you to pros and cons of different orientations.

Stop the stringing with Retraction

One of the first problems I experienced with my prints was stringing.

Stringing is when there are strings of filament in places where they should not be. This happens when filament is oozing out of you nozzle in places the printer should not print.

The video bellow is an introduction to retraction which can be used to limit stringing.

I am definitly a fan of Maker’s Muse, and if you liked the videos above I would encourage you to like their youtube channel for more cool content!

A note on Slicer software

To prepare a 3D model (in .stl format) for 3D printing you also need a slicer software which help create the .gcode for your printer.

Though this is also a big part of 3D printing, I have not included a video about it in this post.

When you first get your printer it doesn’t matter much which slicer software you use. Instead of spending a lot of time selecting the perfect slicer, just pick one and start printing models.

After the first couple of prints you can start looking into different slicer software if you are not content with what you started with 🙂

 

Happy 3D printing!

Copenhagen Maker Festival 2016

Copenhagen Maker Festival was on this weekend. I went with the family on Saturday.

Here is some of the highlights from our trip.

Atmosphere

We arrived around shortly after they opened. The atmosphere pictures are from when we arrived. After lunch the place was packed!

copenhagen maker

copenhagen maker

No maker festival without 3D prints

The 6-year-old maker was really exited to finally see a 3D printer in person. Luckily there was a lot of models at both Labitat and Reprap.me.

When I first told her about 3D printers, her response was that she wanted one, so she could print a Pikachu. Reprap.me had this one on display at Copenhagen Maker.

img_1060
Pikachu!
img_1061
Reprap.me also had free 3D printed diamonds. Being able to print diamonds is not on the 6-year-old makers list of reasons for buying a 3D printer.
img_1062
3D prints at reprap.me
img_1066
3D printed shoes at reprap.me
img_1068
My favorit 3D print at the festival
3D prints at Labitat
The 6-year-old maker is exploring 3D prints at Labitat
3D prints at Labitat
More prints at Labitat

MyLogo Game – with DIY Hama beads

Making a Logo for the My Logo Game
Making a Logo for the My Logo Game
my logo
The point board for the My Logo Game

IoT pen-plotter (ydefeldt.com)

img_1070
Final adjustments before the 6-year-old maker had her portrait printed on the IoT pen-plotter

Printed ceramics

This was really cool. Making ceramics in to ways: the old school way and using a 3D printer.

img_1075
Old school ceramics and 3D printed ceramics. Laura Penman

Polygo: Geometric Creatures

Really cool laser cut triangles which can be puzzled together to form many different geometric shapes and creatures.

These were also used to make a huge LED flower, which can be seen in the video at the top of this post.

img_1077
Polygo: Geometric creatures. Simion Iulian Belea
img_1079
Of course all the signs at the faire was laser cut.

DIY t-shirt printing

Makershirt brought two heat presses so the kids could make their own t-shirts. Definitely the 6-year-old makers favorite DIY-activity at the festival.

img_1086
DIT t-shirt print at Makershirts.dk

My favorite DIY at the Maker Festival

InfinityPV brought lots of their cool flexible printed solar cells. I am definitely using this for some kind of wearable project at some point.

Inside it generates 3V and outside it reached 6V.

img_1103
Defiantly the coolest freebie at the festival!

Time for a break

Of course we also needed a lunch break at some point. Or well, someone would much rather play than eat 😉

She wore a dress I made out of an adult t-shirt we bought at the DTU RoboCup competition earlier this year.

skaermbillede-2016-09-26-kl-10-40-30
Active break at the playground
skaermbillede-2016-09-26-kl-10-41-18
Active break at the playground

Thats all for now.

I am going to Berlin Maker Faire next weekend, so expect more cool maker festival pictures and videos in October!

Lego lock and puzzle boxes – Video Day 36/16

Lego lock and puzzle boxes

One of the projects on my never ending projects-to-do-list is a secret puzzle and mystery box. You know one of those where the lock of the box is a combination of different small puzzles.

On my search for inspiration I found the following three cool Lego videos. The first is a Lego safe with a combination lock mechanism. The two last are a simple and a more advanced Lego puzzle box.

I showed the two Lego puzzle box to the 5 year-old maker (soon to be 6 year-old maker!), and she can’t stop asking if we got the parts to make them. And if not, when we can buy the remaining parts.

Enjoy!

Working LEGO Combination Safe

How to Build a LEGO Puzzle Box | BRICK X BRICK

Lego puzzle box

How old school graphics work – Video day 35/16

Today is all about old school graphics.

September is here, which means no more vacation and lots of studying!

And of course also new Friday Videos here at Maker Tech 😉

I am currently working on projects about getting different kinds of tv outputs from the Arduino. Mainly for games but the same tricks could of course also be used for other applications 🙂

So todays videos are also about graphics. Old school graphics.

How old school graphics worked – by 8-Bit Guy

I found this 8-Bit Guys channel on youtube some time ago. He has a lot of interesting videos, but the three below are especially good if you are into graphics, retro gaming, programming tricks and so on.

They are also really good to watch if you want to do graphics on a small micro controllers like the Arduino etc..

From the videos you get an insight into what simple tricks were used to create relatively complex graphics with a small processor.

Enjoy!

8×8 LED matrix – Atari Breakout inspired Arduino game

In this post you will find details on how to start making your own 8×8 LED matrix Arduino breakout game.

The gameplay is simple but still entertaining because of the different ways the ball bounces when hitting the paddle.

Features

  • Three buttons:
    • L: move paddle left.
    • R: move paddle right.
    • Action: release the ball
  • Increases speed of game for each game won (max. three times).
  • Blinking sad and happy smiley for when you lose or win the game
  • Ball bounce in the different ways depending on where on the paddle it hits:

In the middle: ball bounces directly upwards

middle
Ball hits paddle in the middle

On either end of the paddle: ball continues in same x-direction but the y-direction changes. Exception: If the balls x-direction was 0 is will be changed to either -1 if it hits paddle on the left and 1 if it hits the paddle on the right.

sideL
Ball hits paddle on left
sideR
Ball hits paddle on right

On either side of the paddle (not directly over the paddle): ball bounces back to the direction it came from. Changes both the x- and y-direction. 

endL
Ball hits comes from the left and hits the left side of the paddle
endR
Ball hits comes from the right and hits the right side of the paddle

It is only possible to hit all the bricks by combining the different ways the ball can bounce.

Parts

This is mainly a software project and thus only require a few parts.

  • 1 x Arduino Uno
  • 1 x Adafruit Small 1.2″ 8×8 LED Matrix w/I2C Backpack – Pure Green
  • 3 x 6 mm tactile switches (buttons)
  • 3 x 10 kΩ resistors
  • Solderless Breadboard (830 point)
  • wires

You can also use a LED matrix without the backpack, but this will require additional code and connections. I will try to make a post with inspiration on how to do this at a later time – but it is a more advanced project.

Circuit and schematics

Pins used:

  • 9: L button
  • 8: R button
  • 7: Action button
  • A4: I²C D (data)
  • A5: I²C C (clock)
  • 5V power
  • GND

Bellow is photo, illustration and schematics of the connections and circuit. Hopefully this will be enough for you to assemble it correctly. Do not hesitate to leave a comment if you need additional information 🙂

8x8 led matrix arduino game photo

8x8 led matrix arduino game drawing
Drawing of the connections (the LED matrix on this illustration is a bit smaller than the model I am using).
8x8 led matrix arduino game schematics
Schematics

Source code

The code for this project can be downloaded here on GitHub.

I use a 8×8 char array to keep track of where the different objects of the game is positioned at a given time.

The reDraw function in game.ino then uses this char array to visualize this using the correct pixels on the led matrix.

Files:

  • game.ino: this is the Arduino sketch that starts the program. It holds the loop function which controls the game according to the current game state.
  • Breakout.h + Breakout.cpp: This class holds most of the game rules and reactions on different player input.
  • Ball.h + Ball.cpp: Hold information on a balls position and how the ball bounces in different directions.
  • Paddle.h + Paddle.cpp: Determines how the paddle moves left and right in addition to store where the paddle is located and how wide it is (size).
  • Config.h: Defines the Arduino pins used, start values of different objects and enums in the code.
  • Faces.h: Layout matrixes of the sad and happy faces used for game lost and game won.

The source code is released under the GNU GPLv3 license.

Libraries

In addition to the source code you also need the Adafruit Backpack Library and the Adafruit GFX Library installed.

Next Moves

Additions you could try to implement:

  • Make the game harder by decreasing the size of the paddle after a certain number of wins.
  • Add a scoring system to the game.
  • Make it possible to move the paddle before sending the ball on its way.
  • Bring the prototype to the next level and make some kind of case for the game.
  • Add sound effects
  • Tired of playing the same game over and over? Why not make a full-blown 8×8 LED Matrix handheld gaming console? Snake, pong, space invaders, car game, Simon Says, Tetris or maybe even an adventure maze game?

Notes

For information about how to install the backpack to the LED matrix, and how to install the needed libraries, checkout Adafruits own guide here.

Makers and the Maker Movement: Maker Faire

What is a Maker Faire, and can I attend?

In this third and last blog post in this summers theme on Makers and the Maker Movement is all about Maker Faires.

The first post focused on who are the Makers, and how do you become one.

The second post focused on what the Maker Moveement is, and how it started.

What is a Maker Faire?

Maker Faires were first created by Make: Magazine in 2006 with the purpose to “celebrate arts, crafts, engineering, science projects and the Do-It-Yourself (DIY) mindset”.

Since then it has grown into many Maker Faires being held around the year all over the world.

maker faire growth - maker movement

They are about showing off what makers are making, being inspired, getting ideas, being amazed and maybe even learning a new thing or two.

And they are about meeting other makers.

Makers, Maker Movement and Maker Faire

The Maker Movement is all about sharing and learning from each other. And we can do this easily with the internet.

But gathering lots of makers in a Maker Faire makes it even easier to share. Especially between active makers and all the potential new makers who visit the faire.

Knowing where to look for information can be tricky if you are new to the Maker Movement. By attending a Maker Faire this gets a lot easier, because you have direct access to lots of makers!

The always popular, Bellagio-esque, fountains of soda from Eepybird will be back to wow the crowds. Kids-of all ages! -- will love this live science experiment that they can also try at home.
Cola + Mentos = Fountains of soda – Maker Faires are fun for all ages!

What is on display at a Maker Faire?

If it can be and has been made by someone, then it might also be found at a Maker Faire.

Beginner projects. Advanced projects. Useful projects. Useless projects. Art projects. Using all kinds of materials for all kinds of purposes.

Can I attend?

Yes!

Everyone can attend one of the many Maker Faires around the world.

stormtrooper maker faire
Stromtrooper in action at Power Racing Series at World Maker Faire New York 2015

You can attend as a guest and just walk around and experiencing the ambiance of the Faire. Or you might even want to try some of the things on display. Some places it is even possible to just walk in and start making something yourself!

For those who make things themselves it is also possible to attend as a maker, and get a booth where you can display you projects.

To find a Maker Faire near you, follow this link to a map of all the Maker Faires in the world.

Source of image from maker faires: http://www.marketwired.com/press-release/