How do we program the giant robot hexapod to respond to the environment





A serious hard case, giant ants from Australia


NOW LOOK, HEAR, FEEL - Yes, eyes and ears will make a giant machine like Dino the DinoBot more user friendly to humans. Touch sensors are also useful as limiters. We may even give this ant the power of speech.



There is no point building a giant robot like Dino the DinoBot if it won't do anything interesting. Walking is the first thing to sort, so that the machine does not bump into anything. Object recognition is probably asking too much at this stage, but many micro computers can handle such information, such as the Raspberry Pi.


With dedication it is possible to learn to code in around 12 weeks. Learning the principles of software craftsmanship is easier if you have a goal in mind. The experience is sure to help you get your first well paid job.


In the not too distant future, jobs will be scarce as robots take over the routines that provide us with sustainable food supplies, transport and accommodation. Those who design and service the machines will be the ones who earn the most, or rather, those who will enjoy doing something worthwhile.







Programming is usually the final step involved in building a robot. The answer to what language should I choose is really dependent on the things you want your DinoBot to do, and that dictates what hardware you will need. By hardware, we mean the computer system (motherboard, processor, memory and peripherals) that you need to operate the robot.


We would suggest using the smallest and cheapest system that will allow you to do what you want your DinoBot to do. So, make a wish list of features and work from there. You will probably find that an Arduino or Raspberry pi will do the job with the appropriate shields or other interfaces. These computers work well together.


You need to know a bit about the computing hardware and programming them, to enable you to decide what you might need or want as part of your shopping list. Alternatively, forget computers and just drive the robot as a drone, using radio control. No, you need a bit of both.


There are many programming languages which can be used to program micro-controllers, the most common of which are:



Assembly; its just one step away from machine code and as such it is very tedious to use. Assembly should only be used when you need absolute instruction-level control of your code.



Basic; one of the first widely used programming languages, it is still used by some micro-controllers (Basic Micro, BasicX, Parallax) for educational robots.



C/C++; one of the most popular languages, C provides high-level functionality while keeping a good low-level control.



Java; it is more modern than C and provides lots of safety features to the detriment of low-level control. Some manufacturers like Parallax make micro-controllers specifically for use with Java.



.NET/C#; Microsoft’s proprietary language used to develop applications in Visual Studio. Examples include Netduino, FEZ Rhino and others).



Processing; (Arduino); a variant of C++ that includes some simplifications in order to make the programming for easier.



Python, one of the most popular scripting languages. It is very simple to learn and can be used to put programs together very fast and efficiently.



You should chose a micro-controller based on the features you need (number of I/O, user community, special features, etc). Often, a microcontroller is intended to be programmed in a specific language. For example:


*  Arduino micro-controllers use Arduino software and are re-programmed in Processing.
*  Basic Stamp micro-controllers use PBasic
*  Basic Atom micro-controllers use Basic Micro
*  Javelin Stamp from Parallax is programmed in Java


If you have chosen a hobbyist microcontroller from a popular manufacturer, there is likely a large book available from your local electronics store, so you can learn to program in their chosen programming language. If you instead chose a microcontroller from a lesser known manufacturer (e.g. since it had many features which you thought would be useful for your project), it’s important to see what language the controller is intended to be programmed in (C in many cases) and what development tools are there available (usually from the chip manufacturer).


Don't get too ambitious. Choose your computer system so that it is affordable and well supported in the programming community.





With the wealth of developer boards now available at reasonable prices, this super size robot gives you a chance to let your imagination go wild. What would you have the world's largest robot ant do? What would you like us to make it possible to do?


There are hundreds of existing open source projects that can either be incorporated or adapted for the giant ant robot. We will be sharing ideas as they occur to us, or as any independent roboteer tells us about their idea.



Terry will be John Storm for the movie pilot featuring the giant ant robot


MEET TERRY - If you live in Sussex and not too far from Eastbourne, why not help us to make this project more interesting and get some practical experience under your belt while you are at it. Anyone interested in robotics or entomology is most welcome, from university students to retirees. Terry will be playing the part of John Storm in a pilot film that could be shot in 2016 if crowd funding is successful. So, also get in touch if you are interested in film making or acting and might be able to help out on that front.


Jameson Hunter will be working with a London group for much of the script work and crowd funding, but would be pleased to work with local acting groups, or actors who might live close to Eastbourne.





In mathematics and computer science, an algorithm is a self-contained step-by-step set of operations to be performed. Algorithms exist that perform calculation, data processing, and automated reasoning.

An algorithm is an effective method that can be expressed within a finite amount of space and time and in a well-defined formal language for calculating a function. Starting from an initial state and initial input (perhaps empty), the instructions describe a computation that, when executed, proceeds through a finite number of well-defined successive states, eventually producing "output" and terminating at a final ending state. The transition from one state to the next is not necessarily deterministic; some algorithms, known as randomized algorithms, incorporate random input.

An informal definition could be "a set of rules that precisely defines a sequence of operations." which would include all computer programs, including programs that do not perform numeric calculations. Generally, a program is only an algorithm if it stops eventually.

Algorithms are essential to the way computers process data. Many computer programs contain algorithms that detail the specific instructions a computer should perform (in a specific order) to carry out a specified task, such as calculating employees' paychecks or printing students' report cards. Thus, an algorithm can be considered to be any sequence of operations that can be simulated by a Turing-complete system. 

Typically, when an algorithm is associated with processing information, data are read from an input source, written to an output device, and/or stored for further processing. Stored data are regarded as part of the internal state of the entity performing the algorithm. In practice, the state is stored in one or more data structures.

For some such computational process, the algorithm must be rigorously defined: specified in the way it applies in all possible circumstances that could arise. That is, any conditional steps must be systematically dealt with, case-by-case; the criteria for each case must be clear (and computable).

Because an algorithm is a precise list of precise steps, the order of computation is always critical to the functioning of the algorithm. Instructions are usually assumed to be listed explicitly, and are described as starting "from the top" and going "down to the bottom", an idea that is described more formally by flow of control.





EXAMPLES - LEFT - Flow chart of an algorithm (Euclid's algorithm) for calculating the greatest common divisor (g.c.d.) of two numbers a and b in locations named A and B. The algorithm proceeds by successive subtractions in two loops: IF the test B ≥ A yields "yes" (or true) (more accurately the number b in location B is greater than or equal to the number a in location A) THEN, the algorithm specifies B ← B − A (meaning the number b − a replaces the old b). Similarly, IF A > B, THEN A ← A − B. The process terminates when (the contents of) B is 0, yielding the g.c.d. in A. (Algorithm derived from Scott 2009:13; symbols and drawing style from Tausworthe 1977). RIGHT - "Inelegant" is a translation of Knuth's version of the algorithm with a subtraction-based remainder-loop replacing his use of division (or a "modulus" instruction). Derived from Knuth 1973:2–4. Depending on the two numbers "Inelegant" may compute the g.c.d. in fewer steps than "Elegant".




Algorithms can be expressed in many kinds of notation, including natural languages, pseudocode, flowcharts, drakon-charts, programming languages or control tables (processed by interpreters). Natural language expressions of algorithms tend to be verbose and ambiguous, and are rarely used for complex or technical algorithms. Pseudocode, flowcharts, drakon-charts and control tables are structured ways to express algorithms that avoid many of the ambiguities common in natural language statements. Programming languages are primarily intended for expressing algorithms in a form that can be executed by a computer, but are often used as a way to define or document algorithms.

Representations of algorithms can be classed into three accepted levels of Turing machine description:

1 High-level description

"...prose to describe an algorithm, ignoring the implementation details. At this level we do not need to mention how the machine manages its tape or head."

2 Implementation description

"...prose used to define the way the Turing machine uses its head and the way that it stores data on its tape. At this level we do not give details of states or transition function."

3 Formal description

Most detailed, "lowest level", gives the Turing machine's "state table". 


In computer systems, an algorithm is basically an instance of logic written in software by software developers to be effective for the intended "target" computer(s) to produce output from given input (perhaps null). An optimal algorithm, even running in old hardware, would produce faster results than a non optimal (higher time complexity) algorithm for the same purpose, running in more efficient hardware; that is why the algorithms, like computer hardware, are considered technology.





There are hundreds of toy robots that have some kind of collision avoidance, usually involving infra red sensors or sonic pulses. These days even robot vacuum cleaners use miniature lidar to build a picture of their environment. 







IR sensors can be used to detect animals, including humans but the hobby robot offerings provide limited range; sonic sensors are even worse. The Laser sight above has a range of 40 metres - that's more like it.





Making this robot the fastest legged all terrain vehicle is possible. It will involve some nifty software to make the ant aware of the surfaces it is running on - and potentially make the necessary adjustments in real time to be able to cope. A model helicopter gyroscope could provide reference.





Having detected people nearby, what might you program the ant to say to them?





This is useful in robotics for many reasons. You will always know where the robot is - and the robot will also know where it is.




COMMUNICATION - Computers need to talk to one another and to the machinery they are controlling.





If the robot is to be remotely controlled by an operator, having cameras stream back live pictures will make driving the robot a whole lot easier. Any vision system might incorporate laser sighting to be able to gauge the distance from objects and people.


Researchers at The University of Western Australia have discovered how ants see in colour, a breakthrough that one day could help scientists creating autonomous robots.

In a paper published in May of 2015 in Proceedings of the Royal Society B, researchers Dr Yuri Ogawa and Dr Jan Hemmi from UWA’s School of Animal Biology show for the first time that the Australian bull ants (like humans) have three types of photoreceptors that are sensitive to different colours (UV, Blue and Green) and therefore the potential for trichromatic colour vision.

Photoreceptors are the cells in the eye that are sensitive to light. This means that their colour vision is likely to be as good as that of humans and old world primates and significantly better than that of other mammals such as dogs, cats or wallabies.

Most mammals have only two types of photoreceptors they can use for colour vision, leading to poorer colour perception. However, in contrast to humans, the bull ants can also see UV light, which means they can see different colours than we do.

In addition, one of the two species investigated is completely nocturnal, so they only forage at night after dusk. That means they use their three different photoreceptors types at night, during light levels where humans are completely colour blind.

Dr Hemmi believes the driving force behind the sophistication of their colour vision is their need to navigate to and from their nest.

“In contrast to many other ant species, bull ants forage individually, do not lay pheromone trails like other ant species and use only vision to navigate,’ he said.

“The poor resolution of these ants means they see the world through an eye with only 2-3000 pixels and that must make it very difficult to accurately identify landmarks. Having accurate colour vision could therefore help with landmark identification. It is quite possible that navigation has played a major role in the early evolution of colour vision.”

The wider context of the research is to find out how animals see their world. With ants, the most interesting question is how miniaturisation affects their sensory systems and the researchers would like to know what strategies ants use to overcome miniaturisation effects such as small eyes and very limited processing power (small brains). The interest in miniaturisation comes from both biology and robotics.







The robot might record what it is seeing during a mission - for example, as part of a training exercise, when feedback and point scoring might be needed.





We are looking at the possibility of incorporating a sting of sorts. Nothing too onerous. A paintball gun might suffice and is great fun for wargaming.





This will require a program that controls just about all the other functions, plus a mission. What that mission might be is up to you. It might be sentry duty when energy endurance might be an issue.





If working in pairs or as a team with other gamesters, positional and other data sharing might help your team vanquish the opposition.





We are looking for robot engineers and/or students to help us make our Christmas project come to life. If you might be interested in giving the team a hand, please get in touch right away. Ask for Terry: 07484727027 or email: ace@speedace.info






THE FULL MONTY - Useless to most robotics engineers and rather overkill anyway, these full size performance motherboards are far too big for most robots to carry, let alone supply the energy they need to run them.



Intel Atom 100mm x 100mm microcontroller computer board




RASPBERRY Pi A+ - Dimensions: 2.1-inch x 2.2-inch x 0.4-inches (6.5cm x 5.6cm x 1.2cm) at its thickest point. Memory: 256MB RAM. Expansion: MicroSD slot, USB port, 40 pins. Weight: 8 ounces (23g). Price: £15.50 (UK) and $20 (US). Comparison with old Model A: Model A+ is 20 per cent cheaper, 24 per cent shorter and 42 per cent thinner. ‘It is cheap and flexible. It can be used as a desktop PC or for a robot. It is a bit like digital Lego.’

Raspberry Pi recently revamped its more powerful Model B board to a B+ with extra features, for the same $35 (£24) price tag. Google gave the Foundation $1 million (£630,000) in 2013 to put 15,000 Raspberry Pis in UK schools in a bid to help children learn to code. 





1. Create manageable chunks of functional code: By creating segments of code specific to each product, you gradually build up a library. Develop a file system on your computer to easily look up the necessary code.


2. Document everything within the code using comments: Documenting everything is necessary in almost all jobs, especially robotics. As you become more and more advanced, you may add comments to general sections of code, though as you start, you should add a comment to (almost) every line.


3. Save different versions of the code – do not always overwrite the same file: if you find one day that your 200+ lines of code do not compile, you won’t be stuck going through it line by line; instead you can revert to a previously saved (and functional) version and add / modify it as needed. Code does not take up much space o a hard drive, so you should not feel pressured to only save a few copies.


4. Raise the robot off the table or floor when debugging (so its wheels/legs/tracks don’t accidentally launch it off the edge), and have the power switch close by in case the robot tries to destroy itself. An example of this is if you try to send a servo motor to a 400us signal when it only accepts a 500 (corresponding to 0 degrees) to 2500us (corresponding to 180 degrees) signal. The servo would try to move to a location which it cannot physically go to (-9 degrees) and ultimately burn out.


5. If code does something that does not seem to be working correctly after a few seconds, turn off the power – it’s highly unlikely the problem will “fix itself” and in the meantime, you may be destroying part of the mechanics.


6. Subroutines may be a bit difficult to understand at first, but they greatly simplify your code. If a segment of code is repeated many times within the code, it is a good candidate to be replaced with a subroutine.



Raspberry PI micro computer board   


AUTOMATION - Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. Arduino can sense the environment by receiving input from a variety of sensors and can affect its surroundings by controlling lights, motors, and other actuators. Arduino projects can be stand-alone or they can communicate with software running on a computer (e.g. Flash, Processing, MaxMSP). Arduino uses a microcontroller; Raspberry Pi uses an applications processor. 


There are some things a Raspberry Pi is better for (you can hook a Raspi up to a TV, for example), and loads of things an Arduino is more suited to. The Pi is a fine little computer board, though not nearly as good as the Arduino when it comes to I/O capabilities. The Raspberry Pi has only 8 GPIO’s, so it would be really useful to have additional Inputs and outputs by combining the Raspberry Pi and Arduino.


The beautifully-engineered Gertboard is a plug-in add-on that neatly overcomes this deficiency by giving the Pi access to an ATMega328, but it's a very complex and expensive solution. An alternative would be to interface an Arduino
running at 3.3 volts to the Pi, though this is easier said than done.





GERTBOARD - The GertDuino is a Raspberry-Pi add-on which offers the same functionality as an Arduino-Uno but with some extra features; connects to Raspberry Pi, and has dual Atmel MCU capability onboard. GertDuino offers onboard Atmega 328 shield hosting which will execute Atmega 328 code written and compiled on the Raspberry Pi. The onboard Atmega 48 provides RTC, IrDA front-end, and additional computational capability. It begs the question: Why didn't Arduino and Raspberry sort this out from the beginning?





ARDUPILOT DRONE SOFT / HARDWARE - ArduPilot is an open source UAV platform created by the DIY Drones community. It is based on the Arduino open-source electronics prototyping platform. 


FULL AUTONOMY - 3D Robotics have developed the APM Universal Autopilot to provide fully autonomous control to a multitude of vehicles. The APM is a full UAV (Unmanned Autonomous Vehicle) autopilot, supporting piloted and un-piloted operation of vehicles, including hundreds of GPS waypoints, camera control and auto launch and docking.




BEAGLE - Other micro computer systems that may also be suitable for robotic gaming are the: Beagleboard, Mbed, Picaxe and Raspbery pi. It won't be long before such systems are integrated, much like the Tom Tom revolutionized travel planning, and available off the shelf. You might like to use the processor from an old mobile phone, when most of the features you'll need for a great robot, are already built in.




PROGRAMMABLE - Making a robot react to the environment means using sensors that can detect light, sound and heat. Touch (pressure) would also be good with an animatronic such as this.





Freedawn UK scientia 2015 May 22 ants color vision may help march towards robot technology










A prehistoric giant ant hatches from a frozen egg to create havoc   Ant-Man the Marvel movie 2015 with Paul Rudd


LEFT - Movie idea, lurking beneath the Antarctic ice is a discovery that scientists will die for. This story is now the subject of a low budget trailer to be produced mostly in the UK. The promoters are looking for backers. The UK will contribute 20% toward production costs. Roughly 60% of a low budget film may be pre-sold as distribution rights, leaving 20% finance to source. The deal is that investors recover 120% on their project stake within 12 months of shooting, with an income stream thereafter from networks and merchandising. Producers and directors please take note that there is a significant audience for well made movies of this genre. Look at what happened when they remade Godzilla. RIGHT - 2015 movie from the Marvel graphic novels.

















This website is Copyright © 2017 Bluebird Marine Systems Limited.   The names Bluebird™, Bluefish™, Miss Ocean™, SeaNet™, SeaVax™ are trademarks. All other trademarks are hereby acknowledged. The design of the Robot Ant on this page is design copyright © December 15 2015, all rights reserved - Jameson Hunter Ltd.