Xbee + BlinkM

Hi,

is there any example for:

Arduino+Xbee+Blinkm to be controlled over Xbee + PC,
like BlinkMCommunicator.

Like this one: BlinkM Xbee adapter | The adapter at pixel #0 controlling a … | Flickr

Regards,
Sam

Well, after using the Xbee adapter with Arduino, and from the Pc side my Xbee explorer I can control the BlinkM with approx zero configuration, only the Baud to 19200 of the 2 Xbee as the configuration of the BlinkMCommunicator, I set the connection, and it's working perfect :), any idea how I can flash Arduino through Xbee?

Regards,
Sam

Hi,

I'm testing this combination of Xbee+BlinkM+Arduino, with the BlinkMTester sketch, I was trying to add Read voltage command of the battery on my Arduino side and to receive this info once I send "v" command, can someone correct me and how I can read the real voltage of my battery.

I added the following Code:

#define vpin 3
int v =0;

then under:

const char helpstr[] PROGMEM = 
:
:
:
:
"'v' get battery Voltage\n"

and

 else if( cmd =='v') { 
      v = analogRead(vpin)*5/1023;
      Serial.print("V=");
      Serial.print(v);
      Serial.println();
   }

could some help me please, now I make a connection for testing from the 5 v output to pin 3, and when I send the v command, I'm receiving 5 or 4 volt. but I think that I will use 2 resistor in serial on my 9 volt battery.... my target is to read the voltage battery, and to add later on a condition if the battery voltage drop, the Arduino send me warning so I will shut it down, any idea please...

Regards,
Sam

If you measure the 5V terminal on your Arduino, it's going to read 5V until the the Arduino stops working from lack of power.

Normally, the battery voltage would be available on the Vin terminal on your Arduino. Since it's 9V, you can't measure it directly on an Analog input. What you could do is divide it down to 5V and then when it drops below, you will be able to sense it.

9V----/\/\/\/-----/\/\/\/\------GND
         1K          1K
                |
                |
                |
            Analog In

Something similar to this.

Thanks EmillyJane, that what i was thinking to do, but how i can read exactly the voltage of my 9v battery; what do i need to change in my code.

since this one if it's true it's reading the 5 volt
(v = analogRead(vpin)*5/1023;)....
So any hint to use a small code as voltmeter to get more details, or do you advice me to use the Xbee input to send this data to my pc.

Regards,
Sam

You can use the same program you already have. If your battery voltage is 9V, you would read about 4.5V since the resistors scale by about 50%.

One warning: I don't know what the voltage of a fresh 9V battery is. I imagine it is more than 9V so you need to take that into account when you design your resistive divider so you don't overload the Arduino ADC. The one I've shown is good for about 10V. Just to be safe, I'd probably use a slightly larger resistor at the 9V end.