Show Posts
Pages: [1]
1  Community / Exhibition / Gallery / Re: Using android mobile to control arduino on: October 14, 2013, 03:15:37 am
Hi!!..thanks for this application...whenever I connect my android phone to bluetooth device to arduino uno it shows a runtime error :
Need bluetooth _admin permission :neither user 10116 nor current proces has android.permission.BLUETOOTH_ADMIN...please help..
I am using HC-06 bluetooth module. It gets paired normally but not using this application....
Please help!!
2  Using Arduino / Networking, Protocols, and Devices / Re: Xbee example code on: April 04, 2013, 09:05:58 am
basically what i want to know is that what changes do I have to make in the code to send a frame from one zigbee to another and how do I configure it on XCTU? Thanks in advance
3  Using Arduino / Networking, Protocols, and Devices / Re: Xbee example code on: April 04, 2013, 08:39:44 am
I have used X-CTU software for configuring zigbees using a zigbee explorer board(USB)... tried to send a one byte data serially and received it on other UNO board... but this example programme does not work....I changed the destination address, PAN ID and Network ID using XCTU... is this programme in API mode??.....
4  Using Arduino / Networking, Protocols, and Devices / Re: Xbee example code on: April 04, 2013, 08:30:14 am
I am not getting any output... the LED intensity does not change.... The shields that I am using are from rhydolabz....http://www.rhydolabz.com/index.php?main_page=product_info&cPath=152_151&products_id=1124....
5  Using Arduino / Networking, Protocols, and Devices / Xbee example code on: April 04, 2013, 06:06:35 am
Hey friends!,
I am new to zigbee... tried to run the sample code but it is not working... Please help...
code for transmitter
/**
 * Copyright (c) 2009 Andrew Rapp. All rights reserved.
 *
 * This file is part of XBee-Arduino.
 *
 * XBee-Arduino is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * XBee-Arduino is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with XBee-Arduino.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <XBee.h>

/*
This example is for Series 2 XBee
 Sends a ZB TX request with the value of analogRead(pin5) and checks the status response for success
*/

// create the XBee object
XBee xbee = XBee();

uint8_t payload[] = { 0, 0 };

// SH + SL Address of receiving XBee
XBeeAddress64 addr64 = XBeeAddress64(0x0013a200, 0x403e0f30);
ZBTxRequest zbTx = ZBTxRequest(addr64, payload, sizeof(payload));
ZBTxStatusResponse txStatus = ZBTxStatusResponse();

int pin5 = 0;

int statusLed = 13;
int errorLed = 13;

void flashLed(int pin, int times, int wait) {

  for (int i = 0; i < times; i++) {
    digitalWrite(pin, HIGH);
    delay(wait);
    digitalWrite(pin, LOW);

    if (i + 1 < times) {
      delay(wait);
    }
  }
}

void setup() {
  pinMode(statusLed, OUTPUT);
  pinMode(errorLed, OUTPUT);

  Serial.begin(9600);
  xbee.setSerial(Serial);
}

void loop() {   
  // break down 10-bit reading into two bytes and place in payload
  pin5 = analogRead(5);
  payload[0] = pin5 >> 8 & 0xff;
  payload[1] = pin5 & 0xff;

  xbee.send(zbTx);

  // flash TX indicator
  flashLed(statusLed, 1, 100);

  // after sending a tx request, we expect a status response
  // wait up to half second for the status response
  if (xbee.readPacket(500)) {
    // got a response!

    // should be a znet tx status               
    if (xbee.getResponse().getApiId() == ZB_TX_STATUS_RESPONSE) {
      xbee.getResponse().getZBTxStatusResponse(txStatus);

      // get the delivery status, the fifth byte
      if (txStatus.getDeliveryStatus() == SUCCESS) {
        // success.  time to celebrate
        flashLed(statusLed, 5, 50);
      } else {
        // the remote XBee did not receive our packet. is it powered on?
        flashLed(errorLed, 3, 500);
      }
    }
  } else if (xbee.getResponse().isError()) {
    //nss.print("Error reading packet.  Error code: "); 
    //nss.println(xbee.getResponse().getErrorCode());
  } else {
    // local XBee did not provide a timely TX Status Response -- should not happen
    flashLed(errorLed, 2, 50);
  }

  delay(1000);
}


code for receiver
/**
 * Copyright (c) 2009 Andrew Rapp. All rights reserved.
 *
 * This file is part of XBee-Arduino.
 *
 * XBee-Arduino is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * XBee-Arduino is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with XBee-Arduino.  If not, see <http://www.gnu.org/licenses/>.
 */
 
#include <XBee.h>

/*
This example is for Series 2 XBee
Receives a ZB RX packet and sets a PWM value based on packet data.
Error led is flashed if an unexpected packet is received
*/

XBee xbee = XBee();
XBeeResponse response = XBeeResponse();
// create reusable response objects for responses we expect to handle
ZBRxResponse rx = ZBRxResponse();
ModemStatusResponse msr = ModemStatusResponse();

int statusLed = 13;
int errorLed = 13;
int dataLed = 13;

void flashLed(int pin, int times, int wait) {
   
    for (int i = 0; i < times; i++) {
      digitalWrite(pin, HIGH);
      delay(wait);
      digitalWrite(pin, LOW);
     
      if (i + 1 < times) {
        delay(wait);
      }
    }
}

void setup() {
  pinMode(statusLed, OUTPUT);
  pinMode(errorLed, OUTPUT);
  pinMode(dataLed,  OUTPUT);
 
  // start serial
  Serial.begin(9600);
  xbee.begin(Serial);
 
  flashLed(statusLed, 3, 50);
}

// continuously reads packets, looking for ZB Receive or Modem Status
void loop() {
   
    xbee.readPacket();
   
    if (xbee.getResponse().isAvailable()) {
      // got something
     
      if (xbee.getResponse().getApiId() == ZB_RX_RESPONSE) {
        // got a zb rx packet
       
        // now fill our zb rx class
        xbee.getResponse().getZBRxResponse(rx);
           
        if (rx.getOption() == ZB_PACKET_ACKNOWLEDGED) {
            // the sender got an ACK
            flashLed(statusLed, 10, 10);
        } else {
            // we got it (obviously) but sender didn't get an ACK
            flashLed(errorLed, 2, 20);
        }
        // set dataLed PWM to value of the first byte in the data
        analogWrite(dataLed, rx.getData(0));
      } else if (xbee.getResponse().getApiId() == MODEM_STATUS_RESPONSE) {
        xbee.getResponse().getModemStatusResponse(msr);
        // the local XBee sends this response on certain events, like association/dissociation
       
        if (msr.getStatus() == ASSOCIATED) {
          // yay this is great.  flash led
          flashLed(statusLed, 10, 10);
        } else if (msr.getStatus() == DISASSOCIATED) {
          // this is awful.. flash led to show our discontent
          flashLed(errorLed, 10, 10);
        } else {
          // another status
          flashLed(statusLed, 5, 10);
        }
      } else {
         // not something we were expecting
        flashLed(errorLed, 1, 25);   
      }
    } else if (xbee.getResponse().isError()) {
      //nss.print("Error reading packet.  Error code: "); 
      //nss.println(xbee.getResponse().getErrorCode());
    }
}


I am using series 2 zigbee and zigbee shield with arduino UNO.
6  Using Arduino / Sensors / Re: Differential pressure sensor on: March 07, 2013, 08:41:16 am
Thanks a lot!!....smiley-grin
7  Using Arduino / Motors, Mechanics, and Power / EasyVR+ adafruit motor shield on: March 04, 2013, 08:31:20 am
Hey guyz!,
I am using EasyVR and adafruit motor shield for my voice controlled wheelchair. Whenever i connect both the shields to UNO and a PC I get an error message EasyVR not detected. Please help!..
http://www.adafruit.com/products/81
https://www.sparkfun.com/products/10963
8  Using Arduino / Sensors / Re: Differential pressure sensor on: February 13, 2013, 10:54:58 am
Thanx!!...smiley-grin
9  Using Arduino / Sensors / Re: Differential pressure sensor on: February 13, 2013, 10:47:42 am
can you please suggest any opamp... as in the model no. or something?!
10  Using Arduino / Sensors / Re: Differential pressure sensor on: February 13, 2013, 10:25:53 am
thanks!...how do i do it?...i am new to arduino!!
11  Using Arduino / Sensors / Differential pressure sensor on: February 13, 2013, 10:21:18 am
Hey guyz!,
I am using a differential pressure sensor(SX100DN) from honeywell...http://www.digchip.com/datasheets/parts/datasheet/1749/SX100DN.php.... its output voltage is 100-150mV...i wanted to connect it to the analog input of duemelinove.... Is it necessary to use an amplifier or is there any alternate method?....
12  Using Arduino / Installation & Troubleshooting / arduino UNO driver not working properly on: February 04, 2013, 04:49:11 am
Hey guys!,
I have followed all the steps given in the website for installing arduino driver. it shows that they are currently installing the driver and then in the end it shows "Windows found driver software for your device but encountered an error while attempting to install it".
Please help!!!
13  Using Arduino / Networking, Protocols, and Devices / Re: interfacing arduino UNO with Ethernet shield and xbee shield on: January 26, 2013, 02:34:13 pm
Thanks...
14  Using Arduino / Networking, Protocols, and Devices / interfacing arduino UNO with Ethernet shield and xbee shield on: January 25, 2013, 05:32:36 am
Hey guys!!,
I am new to arduino...wanted to connect xbee shield and ethernet shield with arduino UNO board....is it possible?
Pages: [1]