Let's Make Robots!

Xbees and rf modules

Hello guys. 

I was thinking about buying a few xbees for my lasertag project but since they're a bit costly i wanted to ask you if it fits my project before buying them.

I'll tell you what i want to to: basically lasertag is a game where there are lots of players that "shoot" at each other with IR pulses. What i wanted to add to it is some sort of "hit feedback", something, be it sound or LED, that tells me whether or not i have succesfully hit my target.

ADC and strange readings

Hello guys,

I ran this sketch that would simply read an ADC port and print it out to my pc. It went just fine and results were pretty consistent, something like: 300 300 300 300 300 299 300 300 299 300 300 and so on....

But when I use Serial.print(analogRead(whatever_pin)); in a larger sketch, results are very different, something like: 300 290 305 288  310 315 306 296 and so on. This "larger" sketch has 3 interrupt service routines, and the hardware setup has 3 different chips and a loudspeaker.

lets you transmit IR at a range of up to 200m
It is actually very simple you know...it' all based on two primary things: - LED won't be on at all times, so maybe we can get a little over that max current … Read more

5V and 3V together


I'm building a board that needs both 3v and 5v as it has some components working on 3v and others on 5v. Now what is the best to do in this case? I am not sure, i've analyzed some of the options but i really do not know the advantages/disadvantages of each:

- have a 5V regulator and a 3V regulator with the input connected to the 5v reg's output (could be done, the 3v reg is low dropout)

- have a 5V reg and some diodes to output 3V (or a voltage divider with resistors)

- have a 5v reg and a 3v reg with both inputs connected to the v+ on the battery 

Allows you to send IR / remote codes in "background"
Hello guys. After hours spent on the internet trying to understand how stuff works i came up with this piece of code. It simply sends out SONY remote codes, but the … Read more

Technical info on speakers

Hello guys. I've made a simple audio board by following the instructions provided by the "Arduino Waveshield" homepage. Only changed one part (the audio amp) but it works flawlessly.

Now, i'm using a 1W audio amplifier, and i have an 8ohm 0.5W speaker. I'm not too satisfied with the volume, as i'd like it louder than it currently is. Options are:

PWM and registers


some time ago i had opened a forum post about PWM on arduino. RobotFreak gave me a piece of code that made my remote work:

#define pwmPin 11

void setup()  {
  // toggle on compare, clk/1
  TCCR2A = _BV(WGM21) | _BV(COM2A0);
  TCCR2B = _BV(CS20);
  // 36kHz carrier/timer
  pinMode(pwmPin, OUTPUT);

SPI problem

Hello guys. I'm trying to make an spi connection between the arduino and an IC. Actually it's not an arduino, it's an atmega328 on a breadboard, but i'm programming it with the arduino IDE through ICSP. I've got a problem, this sketch doesn't work:

void setup(){

byte clr; SPCR=B01010011;



digitalWrite(10, LOW);  //10 is basically the SLAVE SELECT pin   

spi_transfer(B00000100); //powerup delay(10);

digitalWrite(10, HIGH);  

digitalWrite(10, LOW);

spi_transfer(B00000000);  //setrec

DIY not gate


i tried building a not gate (1 input only), not one i saw on the internet but i tried to make one myself. The problem is i didn't succeed. Now, i know there are loads of examples of how to make one on the net, but i opened this post because i'd like to know why mine doesn't work, so i can improve, hopefully :), my electronics skills.

Here it is: