New Basic Arduino Serial Communication

This is an updated example of basic serial communication between Arduinos, the old example can be found here.

Sender code:

[Arduino]

// SENDER
int b1 = 7;
int b2 = 8;

void setup()
{
Serial.begin(9600);
pinMode(b1, INPUT);
pinMode(b2, INPUT);
digitalWrite(b1, HIGH);
digitalWrite(b2, HIGH);
}

void loop()
{
byte val1 = (byte)digitalRead(b1);
byte val2 = (byte)digitalRead(b2);
Serial.write(‘a’); //SYNC char
Serial.write(val1);
Serial.write(‘b’); //SYNC char
Serial.write(val2);
delay(50);
}

 

[/Arduino]

Receiver Code:

// RECIEVER
byte led1;
byte led2;

void setup() {
Serial.begin(9600);
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
delay(1000);
}

void loop() {
if(Serial.available() > 0)
{
char inChar = Serial.read();
while(Serial.available()<=0);

if (inChar == ‘a’)
{
led1 = Serial.read();
}

if (inChar == ‘b’)
{
led2 = Serial.read();
}
}

digitalWrite(9, led1);
digitalWrite(8, led2);
delay(10);
}

Sega Rally Championship @ Codebits VI

Codebits as you might know is the most geekest event in Portugal and surroundings!

Its audience range goes from programmers and entrepeneurs to hackers and designers! This year 800 people came to participate in 3 days full of talks, challenges, games, demos and junk food!!

About our participation @ Codebits VI, at Artica we are extremely addicted to race games, Trackmania is only one of our favourites!! We still are addicted to race games but we usually don’t play them, instead, we prefer to create our own games.. :D we thought it would be way cool to drive a remote control car using a steering wheel and pedals, and if the car had a wireless cam, the gamer could look at the screen and really see what the car was seeing in real time, just like an arcade game!

This was our proposal to Codebits! To have an arcade game where it would be possible to drive two cars and participate in a real race, without any simulations or complex algorythms, neither 3D graphics.. we want something real! Celso Martinho was very excited with our idea, and by coincidence (or not) they were planning to have a retro gaming area at codebits!! Luis Sobral also known as TheArcadeMan, was the one behind the retro gaming area, Luis refurbishes old arcade machines and transforms them into brand new machines just like magic!

Besides having his own Arcades there, he was working on 10 old arcade machines, making them work with the so acclaimed Raspberry PI!!

Luis had just bought two old SegaRally Consoles, and there was the possibility to transform them to be the control station for our RC cars! On a first (of many) tours to Luis’s “mancave” we start disassembling the old consoles, removing the old electronics boards, wondering the best way to connect all the gear!

Sega Rally Championship
apologize for the crappy quality photo :p

There is a strange beauty in this sturdy mechanical systems, they are so well engineered and one can feel they were pushed into the limits through the years, and are still able to be pushed a lot more!

IMG_3247

This was the throttle pedal gear, on the right you can see a hand-made replacement, it was a cool hack to do.. and a miracle that it worked flawlessly all the event!

Sega Rally Championship

At this stage we couldn’t imagine that one of the biggest challenges was about to come!! Yes, the CRT’s… to send Video signal to this old CRT is not impossible by any means.. but it prooved to be way to much complicated for us..

Sega Rally Championship

after many attempts and despair.. we finally decided to “kill the rabbit”!! We found two Mitsai CRT’s willing to have a new glorious life!!! :D

Sega Rally Championship

And they fitted perfectly in the old frame!

Sega Rally Championship

The steering, pedals, gears and buttons were connected to an Arduino, and data was sent via xbee to the car.

Sega Rally Championship

The car had a receiver Arduino mapping the data to the wheels, throttle and to the video switch! The gamer could choose wich camera to use, the front camera proved to be extremely difficult to use and only hardcore drivers used it!! The upper camera needed a support, and it had its iterations due to be easily broken when the car crashes or capsize! The final iteration was a one PVC piece bended with heat, it proved to be sturdy and survived to the hole event!

Sega Rally Championship

Sweet!

IMG_3734_

Finally at Codebits VI !! :D Artica had the honor to be at the Hardware Den with TheArcadeMen, Altlab, Ultimaker, InMotion, Mitch Altman and RaspberryPI Foundation.

The Sega Rally Championship Arcade was fully working all the time, we only need to stop a couple of times for final tweaks..

Sega Rally Championship

..and to recharge batteries!

Sega Rally Championship

To drive this things was extremely cool!! We are looking forward to repeat the experience!!

Sega Rally Championship

As a final note, we want to give a big thanks to all SAPO and PT Team for making this event a reality, Mauricio Martins and Adriano Couto from AltLab for helping us with the CRT’s, Francisco Dias gave a major help with his hacking skills, João Ribeiro for being a true Artica member, Filipe Valpereiro for all the hardcore geeky support, he was the guy who told us how to remove the steering wheel lag caused by the xbee buffer.. and finally thank you Celso for believing in us!!!

Driving Farrusco @ CoworkLX @ LX Factory ‘open day’

Since the first SWARS experience, I knew this could go A LOT further, but having Farrusco on a remote terrace where you could only have access by climbing an outside ladder.. I must confess, I never thought of such a thing, until… my friend Fernando Mendes (Cowork_LX) came to me with this crazy idea!

Driving Farrusco

I loved the challenge, and wanted since the first moment to create a cool and easy to use physical interface and it came out a nice piece IMHO.

Driving Farrusco

Then Farrusco with the wireless cam already built in for the first “Driving Farrusco” experience, I used two packs of batteries to enhance the play time (one battery pack is missing in the photo). This small wireless camera needs a lot of juice, and a little 9v batteries doesn’t feed it for to long, besides that it gives a very weak transmission with lots of interference, but with this 9.6v racing pack, it worked out really good!

Driving Farrusco

And finally the video:

Some bits around the controller:

At the beginning I wanted to have four joysticks, one for each motor, one for pan and the other for tilt the camera.

Driving Farrusco

Driving Farrusco

Driving Farrusco

Driving Farrusco\

Driving Farrusco

It ended a bit complicated to operate and a learning curve was needed to get used to it, because this was going to manipulated by many people it needed to be simple and fast to learn.

Driving Farrusco

[ FOTO MISSING showing the end result with two joysticks, a motoruino only with the necessary components and the xbee mount ]

Driving Farrusco

Driving Farrusco

SWARS – See What a Robot Sees

This project is a collection of experiences related to seeing and percieving the world from the point of view of robotic creatures. Robots will send sensor data to the computer and will generate visual and audio landscapes in real time.

The development started during the Audiencia Zero residency in O Espaço do Tempo in Montemor-o-Novo, and will continue until the final exhibition wich will be in July.

This is a colaborative project where many friends are bringing together their skills, until now we have collaborated with:
– Pedro Ângelo with Serial Communication;
Rui Madeira with computer vision technics and advanced maths;
Sérgio Ferreira is a media and interaction guru, always providing precious help and advice;
– Daniel Gomes is working on a MAXMSP interactive sound;
Nuno Morgadinho is developing an online application to remotely control robots.
– André Almeida is a computational guru and a great technology and interaction advisor.

More to come ;)

Sub-projects list:

ICU – I See You

This is the first iteration of this project, and just a quick test for something greater.. hope to have time for it in the future.

Components list:
Motoruino (Arduino compatible board) up and running;
– Wireless camera and video converter sponsored by O Espaço do Tempo;
– Basic pan/tilt system built with PVC;
– GUI written in Processing enabling robot remote control, gives vision feedback and servos orientation.

SOURCE CODE FOR ARDUINO AND PROCESSING

bigbro upgrade

This time I added the Solarbotics L298 Compact Driver Kit, the car is now much more powerfull and it is very cool to drive.

In the photo you can see a proto shield where I connected the Xbee, the motor and servo and the LEDS, than the L298N board and a 6v voltage regulator.

I added a small video with some “stunts”  :)

(I´m using the G-Remote to drive this beast!)  :D

Click here to see more cool stuff:

Continue reading bigbro upgrade

Ratazana drifting

I´ve been quite busy with the motor of this robot and I already started to have some of the results I wanted, but I still couldn´t find a stable setup, after a couple of drifts it starts to lose power as you can see by the end of the movie.

Besides this, I like the way it moves, and I can have some control when it´s drifting, it is now my anti-stress toy!!! :)

I have also made some major updates to the arduino circuit board. As you can see in the photo below, I finally have figured out how to upload code to a custom arduino board, (this post describes everything related to this), added capacitors to the L293D, added pins for the ladyada xbee adapter and also added pins for the sonar sensor.
To upload code, I have to add a switch button, to change the rx / tx wires from the xbee to the ftdi cable :)

Continue reading Ratazana drifting

G’Remote – Arduino based remote controller

27-August-2009 UPDATE:
My friend Gerhard from Germany asked me to build a walkthrough regarding the G-Remote, with part list, schematics and code. And here it is.  Enjoy  :D

___________________________________________________________________________

This is my first attempt to make a custom remote controller, and also my first customized Arduino.
After seeing this post made by OddBot I wanted to try to make one myself.

I figured out that if I purchased one remote controller it would be cheaper than buying two of these and paying shipment to Portugal.

So, ripping the guts from a game remote controller I get two joysticks, a couple of buttons, two nice motors and one small lcd.

Each joystick have one button inside, that is cool  :-)

Now I have more control over my bots, specially the ones with two motors.. will post videos later.

no comments on this one :-)