Show Posts
Pages: [1] 2 3
1  Using Arduino / Networking, Protocols, and Devices / Re: UNO + Sparkfun's Xbee Shield Always Reset if Receiving Data From X-CTU Terminal on: September 15, 2013, 08:35:29 am
this code works like a charm:

Code:
#include <SoftwareSerial.h>

SoftwareSerial mySerial(2, 3);

void setup()
{
    Serial.begin(9600);
    Serial.println("XBee Example!");

    // set the data rate for the SoftwareSerial port
    mySerial.begin(9600);

}

void loop() // run over and over
{
    if (mySerial.available())
        Serial.write(mySerial.read());
    if (Serial.available())
        mySerial.write(Serial.read());
}

i got it from here:
garagelab.com/profiles/blogs/tutorial-xbee-with-arduino

Once again, thanks, PaulS, for the "SoftwareSerial" clue.

2  Using Arduino / Networking, Protocols, and Devices / Re: UNO + Sparkfun's Xbee Shield Always Reset if Receiving Data From X-CTU Terminal on: September 15, 2013, 12:58:48 am
Quote
PROBLEM:
when I write something on X-CTU Terminal Tab, and Serial Monitor on Arduino IDE cannot read what i write in X-CTU, and after a while the arduino board reset itself. when I write '1' in X-CTU terminal, the Arduino Board reset automatically.

Have you done any testing just using the serial monitor to communicate with the arduino? Note that a communication application connected to an arduino that opens a com port, sends data, then closes may cause the arduino to reset.

Yes, using serial monitor, the arduino works just fine. 
3  Using Arduino / Networking, Protocols, and Devices / Re: UNO + Sparkfun's Xbee Shield Always Reset if Receiving Data From X-CTU Terminal on: September 15, 2013, 12:54:58 am
Quote
But, you need to. You need to tell each one it's name (MY) and who to talk to (DL). Obviously, DH on one is MY on the other.

Oh, alright then. I will do some digging and report the result here.
But, according to youtube xbee tutorial (mentioned on my 1st post), i dont need to change xbee setting, and that works just fine.  smiley-confuse smiley-confuse
thanks, PaulS.

Quote
There is only one kind of SoftwareSerial.
in this link: http://arduino.cc/en/Reference/SoftwareSerial, isnt it?
4  Using Arduino / Networking, Protocols, and Devices / Re: UNO + Sparkfun's Xbee Shield Always Reset if Receiving Data From X-CTU Terminal on: September 14, 2013, 12:38:22 pm
Thanks, PaulS for the fast response.

Quote
It would be a lot simpler to debug the issue if you put the switch in the other position, and used SoftwareSerial to talk to the XBee and Serial to talk to the PC. Using one port to talk to two devices IS going to frustrate you no end.

i have no idea how to debug this thing, and if i put the switch in DLINE position then i got nothing in my Arduino Serial Monitor.

what kind of SoftwareSerial should i use?it it a software/sketch or?


Quote
Of course, it would also help if you mentioned something about how the XBees are configured. Digi claims that they need no configuration, but that is a load of horsecrap.

i dont changed anything in modem config. and those 2 Xbees have the same PAN ID: 3332

5  Using Arduino / Networking, Protocols, and Devices / UNO + Sparkfun's Xbee Shield Always Reset if Receiving Data From X-CTU Terminal on: September 14, 2013, 03:31:24 am
Hello World.
I'm new to xbee stuff and i have a problem to communicating xbee using this modules:
- 1 x Arduino Uno R3
- 1 x Sparkfun's Xbee Shield: https://www.sparkfun.com/products/10854
- 1 x DFRobot Xbee USB Adapter V2: http://www.dfrobot.com/index.php?route=product/product&product_id=588
- 2 x Xbee 60mW Wire Antenna S1

Arduino IDE: 1.0.5

this is the block diagram that i used:

and i am following this tutorial http://youtu.be/WTnC1bHoaDM

code:
Code:
int myData = 0;
int const ledpin = 13;

void setup(){
 Serial.begin(9600);
 pinMode(ledpin, OUTPUT);
}

void loop(){
  if (Serial.available() > 0){
    myData = Serial.read();
    
    if (myData == '1'){
      digitalWrite(ledpin, HIGH);
      Serial.write(myData);
    }
    
    if (myData == '2'){
      digitalWrite(ledpin, LOW);
      Serial.write(myData);
    }
    
    else {
      Serial.write(myData);
    }
    delay (10);
  }
}

PROBLEM:
when I write something on X-CTU Terminal Tab, and Serial Monitor on Arduino IDE cannot read what i write in X-CTU, and after a while the arduino board reset itself. when I write '1' in X-CTU terminal, the Arduino Board reset automatically.

note: Xbee Shield SPDT Switch position = UART.

But,
when i disconnected the arduino with the PC, and connected it to external power, the LED on pin 13 went ON/OFF if I write 1/2 on X-CTU terminal.

Sorry for my english.

Any help appreciated. Thanks.
6  Development / Other Software Development / Re: [MOD] Arduino Enhanced Release 1.0.4 for Windows (installer, drivers, etc) +SRC on: March 23, 2013, 03:00:30 am
smiley-eek  smiley-eek Hello World  smiley-eek  smiley-eek
Hello Eried,
I have a problem implementing how to fix a arduino blurry icon in win 7 taskbar
i downloaded your tutorial from here: http://servicios.ried.cl/arduino/temp/windows7_arduino-1.0.1_fix.rar
and when i try the 4th step, and run arduino it say:
Code:
"Could not read default settings.
You'll need to reinstal Arduino."
i also tried to replace the "awt.dll" in the "java/bin" folder
but nothing is solved so far.

P.S:
I am using Arduino 1.0.3
sorry if my English is bad
smiley-eek  smiley-eek Hello World  smiley-eek  smiley-eek

You don't need that fix. Is bundled in this version. (also the fix is for 1.0.1, not 1.0.4)

Okay, thanks Eried..
7  Development / Other Software Development / Re: [MOD] Arduino Enhanced Release 1.0.4 for Windows (installer, drivers, etc) +SRC on: March 22, 2013, 04:28:43 am
smiley-eek  smiley-eek Hello World  smiley-eek  smiley-eek
Hello Eried,
I have a problem implementing how to fix a arduino blurry icon in win 7 taskbar
i downloaded your tutorial from here: http://servicios.ried.cl/arduino/temp/windows7_arduino-1.0.1_fix.rar
and when i try the 4th step, and run arduino it say:
Code:
"Could not read default settings.
You'll need to reinstal Arduino."
i also tried to replace the "awt.dll" in the "java/bin" folder
but nothing is solved so far.

P.S:
I am using Arduino 1.0.3
sorry if my English is bad
smiley-eek  smiley-eek Hello World  smiley-eek  smiley-eek
8  Using Arduino / Programming Questions / Re: Time and TimeAlarms Libraries – Ask here for help or suggestions on: August 20, 2011, 02:05:40 pm
How to check alarm time on timeAlarm library?
it is possible to know the "alarm ID" is enable  or disable?
I got this code from the old forum
Code:
void checkAlarm(){

  showAlarmTime(ID1);
  showAlarmTime(ID2);
  showAlarmTime(ID3);
  showAlarmTime(ID4);
  showAlarmTime(ID5);
  showAlarmTime(ID6);

  Serial.println("----------------------------------------------------");
}//checkAlarm

void showAlarmTime(AlarmID_t id){
  time_t alarmTime = Alarm.read(id);
  if(alarmTime != 0)
  {
    if( alarmTime <= SECS_PER_DAY) 
      Serial.print(" repeat alarm with ID ");
    else 
      Serial.print(" once only alarm with ID  ");
    Serial.print(id, DEC);   
    Serial.print(" set for ");
    digitalClockDisplay1(alarmTime);
  }
}//showAlarmTime

but, i guess those code doesn't show the alarm is disabled or enabled.
thanks for any suggestions.
regards,
nug.
9  Using Arduino / Programming Questions / Re: Time and TimeAlarms Libraries – Ask here for help or suggestions on: August 07, 2011, 01:59:16 am
you need to add void before loop(){}

allready patched in posting above.

the code just works..thanks, rob..
ltoa and atol will be my new friends..LOL..
10  Using Arduino / Programming Questions / Re: Time and TimeAlarms Libraries – Ask here for help or suggestions on: August 06, 2011, 03:07:18 pm

do you mean some thing like this?

Code:
#include "stdlib.h"

void setup()
{
  Serial.begin(115200);
  char buffer[11];
  unsigned long unixtime=1234567890L;  // L for long
  ltoa(unixtime, buffer, 10);
  Serial.println(buffer);
}

loop(){}
(code not tested)

see - http://www.nongnu.org/avr-libc/user-manual/group__avr__stdlib.html - search for ltoa

FOOL me, i tried it, but i didn't print the buffer..
Thanks, a lot..i'll try tomorrow. now, 3.05am..here..need a sleep..aha!
11  Using Arduino / Programming Questions / Re: Time and TimeAlarms Libraries – Ask here for help or suggestions on: August 06, 2011, 02:04:47 pm
thanks Rob, Mem..

Quote
Many C compilers have a function named ctime that produces a date string but I don't think its available with the arduino tools. I have always used multiple print statements to display the data, is there a reason you can't do that for your application?
My Goal is sending unixtime via Wireless, then I have data in char array (char[11])
so when i try to send data unixtime which it is unsigned long, the compiler give error message:
Code:
incompatible types in assignment of 'time_t' to 'char [11]'

Rob, I use Mem's library (Time, TimeAlarm, DS1307RTC)..Any suggestion how to do it for DS1307RTC library?thanks anyway for the help.

thanks a lot.
12  Using Arduino / Programming Questions / Re: Time and TimeAlarms Libraries – Ask here for help or suggestions on: August 06, 2011, 06:56:44 am
Hi [again], Mem.

how to convert now() function (=>unixtime) to character array (char[11])?Is it possible to do?
13  Using Arduino / Programming Questions / Re: sending a data array over nrf24l01 with mirf ??? how? on: August 06, 2011, 03:02:27 am
responding unit:
Code:
#include <SPI.h>
#include <Mirf.h>
#include <nRF24L01.h>
#include <MirfHardwareSpiDriver.h>
boolean b = 0;
byte thisChar[16];
int i;

int data[16];
int data [16] should be char data[16], right?
14  Using Arduino / Networking, Protocols, and Devices / Re: RF24 Library: Driver for nRF24L01(+) 2.4GHz Wireless Transceiver on: August 05, 2011, 12:08:30 pm
I use RF24's sketch example : pingpair_test.pde

Don't use the sketches in the test directory.  Use the examples in 'examples'.  Start with examples/pingpair.

thanks a lot..the code works..
15  Using Arduino / Networking, Protocols, and Devices / Re: RF24 Library: Driver for nRF24L01(+) 2.4GHz Wireless Transceiver on: August 04, 2011, 04:12:48 am
Hi All,
I am noob on this programming,
I wanna test my nRF24L01+ that I bought from sparkfun : here.
I use this tutorial : here, to connect the radio and arduino.
I use RF24's sketch example : pingpair_test.pde

Problem :
the sender unit output is "+OK FAIL" when I send "K" from serial monitor..what this is mean?
does the receiver unit is not working?or something I missed

this is the serial monitor details:

Quote
Sorry for my english
Pages: [1] 2 3