Show Posts
Pages: 1 ... 10 11 [12]
166  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Using the Bluetooth module on the ArduinoBT on: January 07, 2008, 04:36:43 pm
That seems like a decent project.  What are you going to use for a temp sensor?

I was looking at using a Dallas Semi temp sensor that was aimed at battery packs. It periodically sensed the temperature and maintained a histogram type table. It had one of their 1-wire interfaces so was easy to use. I'll see if I can find a part number for it.


I have a some DS18S20. Once you have 1-wire working they very easy to use.

I searched for the code that I used. I am not 100% sure if it works, I haven't checked it. Sometimes I modify working code because the goal is just a moving target. At some point I lose interest and the code is not usable anymore. I do use svn, but sometimes I forget to commit the working versions with a decent log message.  smiley

So, change your escape character to "43", that is "+". Make a copy of the BT-init program. From experience I can tell you that it is always handy to keep an original BT-init program around, in case you mess things up. Ok, escape sequence is like this:
Serial.println("SET CONTROL ESCAPE 43  08 1");

Then upload the following program. You can type in a WT11 command, this will be executed and the output is stored in the EEPROM. Afterwards this is read back and sent to your serial port. Oh, and install the textstring library.

#include <TextString.h>  
#include <EEPROM.h>

int ledPin = 13;                // LED connected to digital pin 13
int resetPin = 7;                  // BT module uses pin 7 for reset
char inByte = 0;                // incoming serial byte
TextString incomingString = TextString(50);
int  infoSize = 0 ;
long lastTime = 0;
boolean ledon = true;
boolean commandDone = false;
void setup()                    // run once, when the sketch starts
  pinMode(ledPin, OUTPUT);      // sets the digital pin as output
  pinMode(resetPin, OUTPUT);  
  Serial.begin(115200);        // start serial at 115200 kbs

void loop()
  if (millis()-lastTime > 300)
    ledon = !ledon;
    lastTime = millis();
  if (ledon) digitalWrite(ledPin, HIGH);
  else digitalWrite(ledPin, LOW);
  if(Serial.available() > 1 )
    else if (commandDone)
      digitalWrite(ledPin, LOW); // set led LOW
      Serial.print("Get string:  ");  
      for(int i=0;i<infoSize;i++) //eeprom print lus
      Serial.print("Cleared string  size: ");
      commandDone = false;
void getString()
  //int stringSize = 3;
  int stringSize = Serial.available();
  char comStr[stringSize];
  for (int i=0;i<stringSize;i++)
    comStr[i] = getbyte();
  comStr[stringSize] = 0;
  Serial.print("stringSize: ");
  Serial.print("   ");
void doCommand(char *command)
  //Serial.print("final test: ");
  int j=0;
  digitalWrite(ledPin, HIGH); // set led HIGH
  digitalWrite(ledPin, LOW);
  digitalWrite(ledPin, HIGH);
  for (int i=0; i <= 10; i++){
    while (Serial.available() > 0 && j <512) {    
      inByte = getbyte();  // get incoming byte    
      EEPROM.write(j, inByte);
    digitalWrite(ledPin, LOW);
  infoSize = j;  
  digitalWrite(ledPin, HIGH);
  digitalWrite(ledPin, LOW); // set led low
  commandDone = true;

char getbyte()
  while (Serial.available() == 0) { //look for available data
    // do nothing, wait for incoming data
  return; //return data if aviable

The program works slowly. You have to wait for the reset times involved with switching between modes. These values are a bit on the safe side. When arduino is waiting for a command led13 flashes. If it is going in command mode the led flashes very slow. Be patient!
167  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Using the Bluetooth module on the ArduinoBT on: January 07, 2008, 11:00:53 am
The first project in line is a thermostat for my house. I want the usual stuff, programmable temperature and timing. But I also want to log the measured temperature and watertemperature of the heater. Maybe, if I have enough data I can optimize the system for efficiency and comfort. I am also thinking about using my BT phone as a proximity switch. So, when I leave home, the heater will switch off and when I enter the house it will switch on. Oh, and the thermostat is going to be wireless of course.
168  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Using the Bluetooth module on the ArduinoBT on: January 07, 2008, 09:22:35 am
It is has been a while since I did something with arduinoBT.  So, answers may not be accurate. If you have some patience, I plan to pick it up again in 1 or 2 weeks or so.

according to the iWrap manual, this disables the escape sequence  and sets the wt11 to command mode when the PIO0 goes low. I can't see a PIO0 on the schematic and no wiring to any of the GPIO pins.
You have to pick up the GPIO pins next to the WT11. There are through holes, you have solder some wires in them.
1) is it possible to use a different SET CONTROL ESCAPE command in my sketch to enable the +++ esacpe sequence?  I'm concerned that doing so will make the communication to the PC stop and I'd then have an unusable Arduino;
No, changing the escape sequence will not render the arduino useless.
2) is using a hardwired link to one of the wt-11 PIO pins preferable?
Well, that depends on what you want to do with it. But if I am not mistaken the firmware on the WT11 is too old for this to work. You have flash it with a more recent version. If you have the escape sequence working you can query the WT11 to see what version it is. I ordered my BT board immediately when it was available, maybe the firmware on the more recent boards is uptodate.
I would advise to read the bluegiga documentation a few times, the firmware and user guide. Play around with the code  from the first thread you mentioned.

Do you have a specific project in mind?
169  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: ArduinoBT -> Brick? on: January 08, 2008, 04:54:28 pm
What changes do you want to make? Maybe you can use the SET CONTROL BIND? Or you could use the normal initialisation in the setup() loop. After a reset the module will always be brought back to a working state. In your loop() you can change the configuration. But be carefull with a SET CONTROL ECHO for instance.
170  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Parallel Programmer OSX? on: November 02, 2007, 03:51:03 pm
Do macs with a parallel port still exist? I use this programmer made from an old arduino.
171  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Bought two Diecimila, Only one is working on: October 01, 2007, 02:48:53 pm
I haven't used arduino on the windows platform, so this is just a wild guess. Did you select the right serial port in the arduino IDE?
172  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: procyon avrlib on: April 01, 2007, 01:38:47 pm
Is it that easy? I am going to try it.
173  Forum 2005-2010 (read only) / Frequently-Asked Questions / procyon avrlib on: April 01, 2007, 03:08:05 am
Is it possible to use the procyon avrlib? It is mentioned here:
174  Forum 2005-2010 (read only) / Frequently-Asked Questions / search not working correctly? on: March 31, 2007, 01:37:38 pm
I tried searching for "theremin" but found nothing. However, I was certain there was at least one topic about theremins. Google is able to find it:
and another one:

Is this caused by the forum troubles some time ago?
175  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: data storage options on: December 29, 2006, 04:33:14 pm
Well, using the FTDI chip for an USB<>RS232 interface was a great idea. But still no respons from the dosonchip module.  >smiley-sad Connecting the RX and TX did work though, so the trick is okay.

So, back to the original question. Does anyone know easy to use modules to interface between arduino and SD/CF card or USB stick? The vinculum VDIP1 seems okay. But I haven't found examples yet how to use it.

176  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: data storage options on: December 29, 2006, 03:13:15 pm
Taking the AVR out of it's socket, brilliant! Why didn't I think of that.

177  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: data storage options on: December 29, 2006, 01:57:18 pm
You could try the arduino's hardware UART (e.g. pin 0 and pin 1) - switch to external power (to disable the FTDI chip) and you can hook the dosonchip TTL level 232 to the arduino's TTL level 232.

What do you mean? Can I decouple the AVR from the FTDI chip and then use the FTDI to interface the dosonchip module to the USB port?
178  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: data storage options on: December 29, 2006, 01:12:23 pm
Have you tried using rs232 instead of SPI for the dosonchip?  This thing is on my wishlist, and I'm curious to see how well it works.  I think there's another vendor with a similar device, but I can't remember details (sorry).

I still have pc's with a RS232 interface. But no max232 or something like that to get the dosonchip voltages to rs232 levels.
I tried to get it going with a software serial port on the arduino but it didn't work.

One way to use SD/CF/etc is to simply use the SPI interface and use it as a chunk of flash memory.  Of course, you won't have a filesystem left so you can't just plug it in to a cardreader and grab a data file (although a linux user should be able to use dd to pull the entire contents off easily).

A trick I've heard about (but haven't tried) is to create a dummy file with junk in it, fighure out where that file starts on flash, then make sure you skip that many bytes (and don't write past the length of the file) when writing to the flash device.  I don't particularly like the sound of this, but it does have the potential of being the cheapest in terms of interface hardware and software development.

This sounds familiar. But I guess it will not be easy to get it working.

Then again, you can always implement FAT in arduino and share your hard work with the rest of us.  smiley

I would love to do that. But it is maybe a little bit too much work for me.  No, to be honest: I don't think I am capable of doing such a job.

179  Forum 2005-2010 (read only) / Frequently-Asked Questions / data storage options on: December 29, 2006, 11:38:29 am
Is there anyone here using the arduino and storing data on a SD/CF card or USB stick or something like that? I have a dosonchip module that is not very cooperative. Unfortunately I read this thread after ordering it. I tried to get it working with a softwareserial interface and at the moment I try to get it working with SPI but i am not really succesful. Documentation of this thing is minimal which makes it quite hard to get it working. So, I am looking for alternatives. I want something removable like a memorycard or USB stick. This thing: seems nice. But it is a new product and googling for it mostly gives the press release of his new product.

Does anyone know other alternatives?
180  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Using more than 13 ledpins ? on: March 04, 2007, 03:45:11 pm
Use something like the 74HC595, read this: Or the max7219, use the search here on the forum to find some info.
Pages: 1 ... 10 11 [12]