Parki Internals III : Design Hints and Informatics

What is a robot without its programming? Just a bunch of metal and electronics that lay in a garage. A good informatics design is just as important as a good mechanical and electronic design. Without them, robots cannot “live”.

With Parki, the mechanical part was very well designed. It was simple, but reliable. The electronics were at least as good as the mechanics, without it the robot would have just been a collection of aluminium pieces assembled together.

And we tried as much as possible to well design Parki’s mind software.:P

Continue reading

Your first SFML game, Part IV: The main loop

We already had a main loop for our game, but it didn’t to anything:D.
Here we’ll modify it to make it work with our board and our userInterface.

We keep the usual SFML headers, and we add our custom classes:

// main.cpp
#include <sfml /Graphics.hpp>
#include "board.h"
#include "uInterface.h"

We create the window and we add a frame rate limit. By The Way if you don’t want to use anti aliasing replace the appropriate lines of code :

Continue reading

Your first SFML game, Part III: The User Interface

We already have a fully working game. But… we can’t play it yet!! We have to decide how the game should work with the player… Well, I’ve already decided it for you 😀
When the player clicks a column, it will try to add a token.
If the column has no more empty spaces, the player should retry in another column.
When a player has won, or the board is full. A click on the screen will restart the game. You can play again 😉

To do these, we’ll have a class that will interact with the players.

We include board.h because we’re using the board within the userInterface class:

// uInterface.h

#ifndef UI
#define UI

#include "board.h"

Continue reading

Your first SFML game, Part II : The board

Hello reader!

In this post we’re creating the necessary code to display the  game’s board. It should be very easy to understand, so if you have any problems or suggestions please make a comment.

The main loop :

// main.cpp
#include <sfml /Graphics.hpp>
#include "board.h"

int main()
    // Create main window, using the best available resolution
    sf::RenderWindow App(sf::VideoMode::GetMode(0),
            "Your first SFML game: 4 in a row!");

    // Reduce CPU usage by limiting the times a frame
    // is drawn per second

    // This is the main loop
    // It will loop until you exit the program
    while (App.IsOpened())
        // Here we process the events list
        sf::Event Event;
        while (App.GetEvent(Event))
            // Close window : exit
            if (Event.Type == sf::Event::Closed)

        // Clear the screen with a color

        // Here you will draw all stuff in the frame buffer

        // Render the frame on screen

    return EXIT_SUCCESS;

If you compile this code, it will create a black window. This is the base of our code.

Continue reading

Your first SFML game, Part I : Introduction

Have you ever thought about creating you’re own super classic mario game, or you’re own zelda series? Well, you’re dream has come true… with SFML you’re about to create you’re first game!! To make it easy I’ve chosen to recreate the well-known game Connect Four. Ready??… Go!!

Before starting the game development be sure to have :

Let the coding start!!

There are two main ways of creating this type  of games (board games).

  • By drawing directly to the screen the components of the game (circles, lines, rectangles, etc).
  • or, By using textures (images) and placing them on screen.

For the sake of this example, we’re using the first approach. We’ll be drawing a background color with circles. Three kinds of circles will make the whole : empty spaces, red tokens and yellow tokens. The outline of a winner combination (4 in a row) will be highlighted.

In the end, we’ll have a game like this:


Here you’ll find the Windows executable.
And here the complete sources, including a Code::Blocks Project.

The sourcecode is released under the zlib/png license.

To be continued…

Why SFML Rocks and why you should use it

SFML is a recent open source multimedia library developed by Laurent Gomila which is a SDL direct replacement. SFML is multiplatform ready. It provides easy acces to graphics, input devices, sound, network and lots of  stuff that will do your programming tasks much eaisier and fun to code.

SFML is targeted mainly to game developers, but any kind of multimedia software can easily be done with this library.

What kind of stuff can SFML do? Visit this forum to find out cool creations, games and projects. You’ll be impressed.

Continue reading

The Sigma Project 2009

It all started a month and some weeks ago, it was the end of the scholar year and we were studying for the final tests. Those were times of hard work, nevertheless a new project was born.

The last day of the Rhones-Alpes Robot Cup 2009 we discussed, at the clubelek,  about possibles ways of improving the event and the image of the club. I said that doing small and fancy projects should help us out. Something like line followers or light followers. Some agreed, some did not. The discussion did not last long and the subject didn’t go any further.

Going back to the end of the school, I decided to build a tiny smart robot, that would be able to do several tasks. I focused in creating a robot that would show the kind of stuff that can be easily built with today’s technology. The kind of stuff the robot will do when completed is :

  • Intelligent autonomous maze exploration, taking the idea from the  Robothon SRS line maze contest.
  • Shortest path search towards the exit from the start point.
  • Wireless communication with a computer to show how the labyrinth is being explored.
  • Wireless communication of the robot’s decisions to a computer to show the path it’s going to take when exploring the maze.
  • Semi automatic maze exploration : a human will control the robot’s decisions using a computer software. A human will then try to find the exit of the maze.
  • 8-bit music player.
  • Autonomous Line follower, similar to the Robothon SRS line following contest.
  • Human controlled Line Follower with a wiimote like in mario kart : humans could match the robot or other humans. The fastest, the winner.

The Sigma Project 2009, welcome to earth…


The Sigma Project 2009

More info is coming up, keep tuned.

Parki Internals II: Electronics

Here we are, after several months of silence, I’m giving you out the schémathics of Parki.

You thought I was really going to give them to you?? Lol!!

I might consider it if you ask though… 😉

Let’s talk about more serious stuff. Parki’s core has 12 circuit boards which are :

  • The motherboard (1) : a Pic18f4680 as the core/brain of the robot and lots of connectors for the other circuit boards.
  • The Power Supply (2) : contains three high current capable voltage outputs : 5V for the logic, 6V for the servos and 19V for the motors.
  • 2 three channel input boards (3) : they work as an interface between the micro-controller and the Bumpers (Contact sensors).
  • 19V Power distributor board (4) : used to connect the output of the power supply and to distribute it to the motors.
  • three 5V Power distributor boards (5)  : one of them powers the motor boards, the others connected with a cable switch in between. When the cable is disconnected, the logic circuits are turned on and the robot starts moving.
  • Two Stepper Motor Boards (6) : uses a SN754410 as  motor driver. However, we burnt the IC and we didn’t have a replacement, so we changed to another IC the day of the contest.
  • Servos distributor (7) : interface the servos, the micro-controller and the power supply.
  • Line scanner (8) : an array of 14 IR sensors (QRD1114) scans the terrain to find lines under the robot. The purpose was to increase robot’s position accuracy. However we already had a very good one so we didn’t use this board in the end.

The following pictures illustrate Parkis electronic system.


And finally a schéma that specifies all the connections between the electronic boards.

PS : it’s in french and some small changes were made in the final version.



Hello there, it’s  been a while since my last update and i do apologize… well not really XD but …

I’m preparing a couple of articles so, keep tuned.

PS : This is for real…^^

By Rodrigo Posted in Life