Show Posts
Pages: [1] 2
1  Forum 2005-2010 (read only) / Development / Re: Arduino for AT90USB1287 / AT90USBKey with Eclipse on: January 30, 2009, 05:00:22 pm
David,

I would recommend it to be put into a git repository, you can use http://github.com for example.

Best, Peter.
2  Forum 2005-2010 (read only) / Interfacing / Re: Arduino pro mini + bluesmirf + digital compass on: January 19, 2009, 12:33:20 pm
David,
Your code does not do what you expect: setup() will be executed before loop(), so you send "Goodnight moon!" and "Hello, world?" before you echo one received character on the other serial line.

What you should do is run
Code:
#include <AFSoftSerial.h>

AFSoftSerial mySerial =  AFSoftSerial(3, 2);

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

void loop()                     // run over and over again
{
  if (mySerial.available()) {
      Serial.print((char)mySerial.read());
  }
  if (Serial.available()) {
      mySerial.print((char)Serial.read());
  }
}
and when your Arduino is running listen to the incoming data on the BT and send something to the USB.

I'm not familiar with how to do it on Mac, but maybe you can figure it out based on what I do on GNU/Linux: I have /dev/ttyUSB0 as the serial line to the Arduino and /dev/rfcomm0 as a serial device to the BlueSMiRF (see [1]). Now I open two terminals, one will listen to the BT module with tail -f /dev/rfcomm0, and in the other I send something to the Arduino, like echo "foo" > /dev/ttyUSB0.

I hope this helps.
3  Forum 2005-2010 (read only) / Interfacing / Re: Arduino pro mini + bluesmirf + digital compass on: January 17, 2009, 06:42:27 pm
Hi,

What you can do with AFSoftSerial, is to connect your BlueSMiRF and your compass to the Arduino, and receive data via bluetooth on your pc. I think that you can connect up to 2 serial devices, using AFSoftSerial: one to pin 0 and 1 (this is hw), and one to any other two digital pins.
My point is that you will not be able to use the USB to receive data. If that is fine with you, then just go ahead!
4  Forum 2005-2010 (read only) / Interfacing / Re: Question about arduino and Tx,Rx pins on: March 27, 2009, 12:08:08 am
hanoush, http://www.arduino.cc/en/Serial/Begin

Best, Peter.
5  Forum 2005-2010 (read only) / Interfacing / Re: Bluetooth Detection Questions on: March 17, 2009, 02:08:37 pm
Jaredsb,

I haven't done this kind of querying, but I'm quite sure it is easy, at least if your BT module supports the +BTINQ AT command. The response to this command is the BT device address and class of devices in radio range (I now refer to the BlueSMiRF's data sheet pp. 31). I hope this helps.

Best, Peter.
6  Forum 2005-2010 (read only) / Interfacing / Re: Arduino + BlueSmirf = Wireless Speakers on: March 17, 2009, 01:49:22 pm
Sly,

I have also used this BT module, you can find some info at my blog. I can not really give advise with the DAC, but this module is quite easy to use, it is just like the regular serial port of the Arduino.

Keep us posted with new questions!

Best, Peter.
7  Forum 2005-2010 (read only) / Interfacing / Re: Bluesmirf problems on: January 26, 2009, 11:14:49 pm
Could you please give us the AT commands you used?
8  Forum 2005-2010 (read only) / Interfacing / Re: reading multiple bluetooth data streams at the sam on: January 28, 2009, 03:58:08 pm
Hello Beans,

You can connect two serial devices (like the BlueSMiRF) to your Arduino at the same time: one using hardware serial and the other using a software serial library (like [1] or [2]).

Good luck, Peter.
9  Forum 2005-2010 (read only) / Interfacing / Re: sht15 problem running code from sensirion on: January 27, 2009, 08:35:02 pm
Hi,

That code is for the Intel 80C51 processor family, meaning you won't be able to run it (without any modifications) on your Arduino.

Best, Peter
10  Forum 2005-2010 (read only) / Interfacing / Re: /dev/ttyUSB0 permission and phpSerial on: January 23, 2009, 04:47:10 pm
Hi,

Look at the output of ls -l /dev/ttyUSB0, and add the user running your web server to the group who owns this device.

For example on my machine:
  $ ls -l /dev/ttyUSB0
  crw-rw---- 1 root dialout 188, 0 2009-01-23 16:29 /dev/ttyUSB0

owner group: dialout. So now I look at:
  $ ps aux | grep apache
  www-data   803  0.0  0.2 204220  4244 ?        S    Jan21   0:00 /usr/sbin/apache2 -k start

the user www-data runs my Apache:
  $ adduser www-data dialout

Regards, Peter.
11  Forum 2005-2010 (read only) / Interfacing / Re: Help with Blue Smirf PLEASE!!!!!! on: January 19, 2009, 12:41:29 pm
robofreak20,
Are you sure, that your module is in Auto-connect mode? Please see pp. 5 of User Guide For: Roving Networks™ Bluetooth® Serial Module Command Set.

Best, Peter.
12  Forum 2005-2010 (read only) / Interfacing / Re: strange BlueSMiRF response on: January 17, 2009, 02:15:18 pm
@redredred
Thanks for this info. I have a question: did you try to reconfigure the module with AT commands? I tried to change the name of the device with
Code:
+++
AT+BTLNM="Device"
AT+BTLFLS
AT+BTSRV=1
and now I can not connect to the module smiley /I use hcitool scan on my GNU/Linux box/
13  Forum 2005-2010 (read only) / Interfacing / Re: strange BlueSMiRF response on: January 16, 2009, 07:58:48 pm
Quote
and for my future reference you can hook up the bluesmirf to the arduino's tx/rx as long as the USB port's not plugged in - right?
Yes, the USB port does not interfere when it is not connected.

Also a note, that you have to connect the BT's TX to the Arduino's RX, which now also makes sense.
14  Forum 2005-2010 (read only) / Interfacing / Re: strange BlueSMiRF response on: January 16, 2009, 07:24:17 pm
Quote
I think the bluesmirf might be set to 9600 baud
You are absolutely right bill2009. I've just tried with 9600 baud rate and it is working.
Quote
the documentation(or lack thereof) is just silly.
I second that. As I said earlier the doc which can be downloaded from the product's site states that the default value is 115200 (see pp. 64 of BGB203 BT 2.0 Serial Port Profile Module User's Guide). I guess SparkFun people changed it to 9600.

Anyway thanks for all of your help, I hope now I can do what I wanted.

Best, Peter
15  Forum 2005-2010 (read only) / Interfacing / Re: strange BlueSMiRF response on: January 16, 2009, 12:00:00 pm
Quote
Yep, it has got USB, but when I use the BT module, I power it from a wall wart adapter, so this should cause the problem, I guess.
I'm sorry, what I mean here is when I use the BT module, then the USB is not connected.
Pages: [1] 2