Show Posts
Pages: [1]
1  Using Arduino / Networking, Protocols, and Devices / Re: Arduino + Xbee + Sensor Communicate to Xbee + PC Problem on: October 21, 2012, 10:42:46 am
Thanks PaulS

Your Suggestion is very good

i deleted the Software Serial parts of the two Arduino A & B
Code:
void setup() 
{
  Serial.begin(57600); 
  Serial.println("Test");
}

void loop() // run over and over
{

  if (Serial.available()>0)
  {
Serial.println(Serial.read());
delay(500);
  }
}
but on the ArduinoA + Xbee (Receive the temp)
it was still receive the data" 50...55...13...10...50...55...13...10..."
the correct data should be the temperature "27...27...28..." from the Arduino B +Xbee+ Sensor

because i can receive the right temperature
when i connect the Xbee +PC, and use the X-CTU to get the data

Please find the attachment
2  Using Arduino / Networking, Protocols, and Devices / Re: Arduino + Xbee + Sensor Communicate to Xbee + PC Problem on: October 21, 2012, 08:44:59 am
Quote
Why are you trying to do software serial on the hardware serial pins?
I search the methods of xbee communication in internet,and then i try this
ibrary(softwareserial) can transmit data to PC,but i dont know this is wrong.

Quote
Which instance is really in control of those pins?
I would like too control a led
light,lcd monitor and a relay .
Because
I change my xbee BD from 9600 to 57600, so i change here too
3  Using Arduino / Networking, Protocols, and Devices / Re: Arduino + Xbee + Sensor Communicate to Xbee + PC Problem on: October 21, 2012, 07:02:30 am
Now I rewrite the program of Sensor Side and remove the Xbee Shield,
just connect the following wire
Xbee   <---->  Arduino
Vin                 3.3V
Dout               RX0
Din                 TX0
GND               GND

with following Code
Code:
    #include <OneWire.h>
    #include <DallasTemperature.h>
    #include <SoftwareSerial.h>

    SoftwareSerial mySerial(0, 1);

    #define ONE_WIRE_BUS 2
   
    OneWire oneWire(ONE_WIRE_BUS);
     
    DallasTemperature sensors(&oneWire);
     
    void setup(void)
    {
      Serial.begin(57600);
      sensors.begin();
    }
     
    void loop(void)
    {
      sensors.requestTemperatures();
      int tempA = sensors.getTempCByIndex(0);
      Serial.print(tempA);
      Serial.println();
      delay (2000);
    }


Also i reconfigure the Xbee
Coordinate                      End Device
CH = 11                         CH = 11
ID =AAAA                        ID = AAAA
DH = 13A200                   DH=13A200
DL=4081B858                  DL = 4081B859
MY=0                            MY=0
SH=13A200                      SH= 13A200
SL=4081B859                   SL= 4081B858
CE=1                              CE=0
BD=6(57600)                   BD=6(57600)

Now, i can receive the temp from Sensor Side and show in X-CTU
(Please find the attachment)
==============================================================

i would like to improve my project,
i have 2 Arduino , 2 Xbee
if the sensor part arudino remain unchange,
the PC side change to  a Arduino + Xbee
with the following code
Code:
#include <SoftwareSerial.h>

SoftwareSerial mySerial(0, 1); // RX, TX

void setup() 
{
 // Open serial communications and wait for port to open:
  Serial.begin(57600); 
  Serial.println("Test");
  mySerial.begin(57600);
}

void loop() // run over and over
{
  mySerial.listen();
  if (mySerial.available()>0)
  {
Serial.println(mySerial.available());
delay(500);
  }
}
I cant receive the temp at serial monitor
and just deplay the "Test"
and 5,5,5,5,10,10,10,,15,15.....63
((Please find the attachment)
how can i receive the temp
because i would like to use the temp to trigger the fan if the temperature too high

4  Using Arduino / Networking, Protocols, and Devices / Re: Arduino + Xbee + Sensor Communicate to Xbee + PC Problem on: October 16, 2012, 03:50:19 am
Quote
So, quit using X-CTU for something it is not intended for. It is a tool to configure the XBees. Use it just for that.

 Which software can be used for monitoring the serial monitor seem like arduino software ?
Also i would like to export the result to excel,etc..

 
Quote
I failed to parse this sentence to obtain any meaning.

You can open two instances of the Serial Monitor - one for each Arduino. The data being sent/received by the XBees will appear in the other serial monitor.

Sorry for my poor english smiley-neutral
I mean i have no idea for the xbee shield, in my project, i just want to receive the temperature data from sensor,so i wrote the sensor program in arduino,but i don't know the program and detail of trasmit the data to other xbee by xbee shield.

As using the library of NewSoftSeria for simple wire the 3.3v tx rx and gnd.
But xbee shield doesn't required,so i can't transfer the data to my laptop...

Does any example for transfer data by API mode?
Is it suitable for me for usb explorer and xbee shield?
5  Using Arduino / Networking, Protocols, and Devices / Re: Arduino + Xbee + Sensor Communicate to Xbee + PC Problem on: October 14, 2012, 12:47:54 pm
First Thanks PaulS!!
I think xbee problem is solved

Now i think my program is the problem

While i add the following code at the end of original program
Code:
void setup()
{
  Serial.begin(9600);
}

void loop()
{
  while (Serial.available() > 0)
  {
    char serialByte = Serial.read();
    Serial.print(serialByte);
  }
}

the arduino's serial monitor is show the "Temp" which i wanted
but the XCTU side is still nothing,
but i input something in serial monitor,
the XCTU side can show that i input from serial monitor

Also i simplified the program
Code:

    #include <OneWire.h>
    #include <DallasTemperature.h>
    #define ONE_WIRE_BUS 2
    OneWire oneWire(ONE_WIRE_BUS);
    DallasTemperature sensors(&oneWire);
     
    void setup(void)
    {
      // start serial port
      Serial.begin(9600);
      sensors.begin();
    }
     
    void loop(void)
    {
      sensors.requestTemperatures();
      int temp = sensors.getTempCByIndex(0);
      serial.print(temp);
      delay(1000);
 
      while (Serial.available() > 0)
       {
          char serialByte = Serial.read();
          Serial.print(serialByte);
       }
}

but how to let the Arduino Xbee's side get the data from the program which connected by Xbee Shield?

Any help will be appreciated.
6  Using Arduino / Networking, Protocols, and Devices / Re: Arduino + Xbee + Sensor Communicate to Xbee + PC Problem on: October 14, 2012, 05:14:03 am
My MY setting is 0

MY on one must be DL on the other.

please tell me which xbee should be setting the MY on one must be DL on the other?(Arduino side/Laptop side)?

i don't know my problem is due to Wrong Xbee setting or program??

7  Using Arduino / Networking, Protocols, and Devices / Re: Arduino + Xbee + Sensor Communicate to Xbee + PC Problem on: October 12, 2012, 09:56:16 pm
Please help smiley-fat
8  Using Arduino / Networking, Protocols, and Devices / Re: Arduino + Xbee + Sensor Communicate to Xbee + PC Problem on: October 11, 2012, 06:58:47 pm
one connected to Arduino by xbee shield
second one connected to laptop by FT232RL usb broad
9  Using Arduino / Networking, Protocols, and Devices / Arduino + Xbee + Sensor Communicate to Xbee + PC Problem on: October 11, 2012, 01:19:14 pm
Hello,

I'm new to Arduino, and try to send a temperature sensor data to my laptop by Xbee 802.15.4 (Series 1) modules, but there are too many problems.

For the arduino serial monitor, the sensor program worked itself, but when I open the X-CTU terminal on my laptop, it doesn’t show any data for me.
=============================================
My setup is as follows:

Transmitter:
Arduino UNO with Xbee Shield (iteadstudio Version 1.1)
Tiny RTC DS1307 Shield with DS18B20 Temp Sensor
Arduino Powered using Laptop's USB port
Xbee S1

Laptop:
Xbee connected to FT232RL Tiny Breakout – Foca (iteadstudio Version 2.2)
=============================================
My Xbee Configurations:
ArduinoXBEE
(XB24, 802.15.4, 10E8)
ID = 1111
DH = 13A200
DL = 4081B858
SL = 4081B859
BD = 9600

LaptopXBEE
(XB24, 802.15.4, 10E8)
ID = 1111
DH = 13A200
DL = 4081B859
SL = 4081B858
BD = 9600

===========================================
My Program copied by internet

•  #include <OneWire.h>
•  #include <DallasTemperature.h>
•  
•  // Data wire is plugged into port 2 on the Arduino
•  #define ONE_WIRE_BUS 2
•  
•  // Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
•  OneWire oneWire(ONE_WIRE_BUS);
•  
•  // Pass our oneWire reference to Dallas Temperature.
•  DallasTemperature sensors(&oneWire);
•  
•  void setup(void)
•  {
•    // start serial port
•    Serial.begin(9600);
•    Serial.println("Dallas Temperature IC Control Library Demo");
•  
•    // Start up the library
•    sensors.begin();
•  }
•  
•  void loop(void)
•  {
•    // call sensors.requestTemperatures() to issue a global temperature
•    // request to all devices on the bus
•    •    sensors.requestTemperatures(); // Send the command to get temperatures
•  
•    Serial.print("Temperature is: ");
•    Serial.println(sensors.getTempCByIndex(0));  
•  }

========================================
Arduino Serial Monitor Result:
Temperature is 29.45
Temperature is 29.65


====================================
I would like to show this data on laptop side and I would like to delay the print serial time (5000). First of all, Is my Xbee configuration correct and how to set the BD of Xbee?
Or
Is my design not suitable for Xbee communication?

I think I need to re-configure the Xbee and Programe, but I lost my mind.

Any help will be appreciated.
Thanks

Please find the attachment for your information of the shield which bought from internet
Pages: [1]