Show Posts
Pages: [1] 2 3 ... 7
1  Using Arduino / Project Guidance / Arduino to Arduino bluetooth communication on: November 26, 2012, 10:43:21 am
Hi all!

I need your help please for the following project:

I want to transfer some functions from a radio control transmitter to outside. The goal is to have one person controlling a multirotor and other controlling the camera functions like camera angle, zoom, trigger etc. 

The idea was to put a Bluetooth with an Arduino pro inside of the transmitter controlling some hardware like digital potentiometer, and some analogues switches and simulate the transmitter functions like switches and potentiometers. Outside another Arduino reading some potentiometers and switches send the information through Bluetooth to the transmitter. A good distance should be between 10 and 20 meters.

My problem is that I do not know nothing about Bluetooth, pairing, etc. I think that we need a transmition with paring because the radio control transmitter has a 100mw power and there are also some other transmitters around that can interfere with the Bluetooth communication.

The options I thought are:

 Option 1: http://www.ebay.com/itm/1pcs-TTL-Bluetooth-Module-with-adapter-board-for-arduino-free-connecting-cable-/321030648793?pt=US_USB_Bluetooth_Adapters_Dongles&hash=item4abeeaf3d9

 Option 2: https://www.sparkfun.com/products/10393

Option 3: https://www.sparkfun.com/products/10269

Option 4: http://www.cooking-hacks.com/index.php/shop/wireless/315mhz-rf-link-kits-with-encoder-and-decoder.html

Option 5: http://www.cooking-hacks.com/index.php/shop/wireless/rfm22b-s2-smd-wireless-transceiver.html

Option 6: http://www.elechouse.com/elechouse/index.php?main_page=product_info&cPath=&products_id=324

First option: The advantage is that it comes already soldered on a pcb with power supply and TTL level adjusted, and cost. Disadvantages, I do not know how to put it working one as master and the other slave and make the pairing.

Second option: it looks like the setup is easier and there is already a sketch example. Disadvantages, to buy 2 is a bit expensive. I do not know how to pairing.

Third option: it looks like it is more difficult to set up than the 2th option, and it is also a bit expensive.

Fourth option: advantages, it is low cost, Freq. 433MHz longer transmit distance. Disadvantages, I do not know if it is possible to do paring.

Fifth: same as above.

Sixth: Advantage, there is more information on hoe to setup it, it is possible to make paring. Disadvantages  The Bluetooth module it is not installed on the PCB with voltage regulator and TTL level converter, and it is a bit more expensive.

The above were the option I thought about, for sure there are more, your advise is welcome and as well as future help in parameterization and paring.

Thanks in advance,
Manuel
2  Using Arduino / Programming Questions / Re: IRremote.h Library Help on: June 04, 2012, 06:35:30 pm
Pylon,

Thanks for your help. I am going to follow your advise.

Regards,
Manuel
3  Using Arduino / Programming Questions / IRremote.h Library Help on: June 04, 2012, 05:13:00 pm
Hello all,

Please help on this problem.

I am using the <IRremote.h> library. I call the reading code as a function, the code I use is bellow. When I send an IR command at the first call of the function I receive the correct code, but, if I call again the function without send a IR command, I get again the same code, I need to call two more times the function to get a zero value.

Below  is the code I am using, and also the code I use to test the return command code.

Thanks in advance.

Manuel

Code:
uint16_t IR_code()
 {
  key=0;
  if (irrecv.decode(&results)) // have we received an IR signal?
  {
     //Serial.println(results.value, DEC); // Imprimir na porta serial o valor do controle
    //lcd.print(results.value, DEC); // Imprimir na porta serial o valor do controle
    switch(results.value)
  {
    case 2107:key=10; break;//Menu
    case 2080:key=11; break;//Up
    case 2081:key=12; break;//Down
    case 2064:key=13; break;//right
    case 2065:key=14; break;//left
    case 2085:key=15; break;//enter
    case 2102:key=16; break;//exit       
    case 2103:key=17; break;//stop     
    case 2049:key=1; break;
    case 2050:key=2; break;     
    case 2051:key=3; break;     
    case 2052:key=4; break;     
    case 2053:key=5; break;
    case 2054:key=6; break;     
    case 2055:key=7; break;     
    case 2056:key=8; break;         
    case 2057:key=9; break;
    case 2048:key=0; break;         
 
    default: key=100;
   
    return key;
  }
  delay(2);
    irrecv.resume(); // receive the next value
  }  // Your loop can do other things while waiting for an IR command
}

Below is the code to test the return code.

Code:
void pano360()
{
   IR_code();
   key=0;
   uint8_t i=1;
   lcd.setCursor(0, 0);
   lcd.print("  Pano360 Mode  ");     
   lcd.setCursor(0, 1);
   lcd.print("Num. Positions? ");
   lcd.setCursor(0,2);
   lcd.print("                ");
   
   while(i) // Get number of position till OK/enter(15) be pressed
   {
       while (key==0)
       {
       IR_code();
       Serial.print("test0 ");
       Serial.println(key, DEC);
       Serial.println("            ");
       }
         lcd.setCursor(0,2);
         lcd.print(key,DEC);
         delay(3000);
                     
       Serial.print("test1 = ");
       Serial.println(key, DEC);
       Serial.println("            ");
       key=0;
      //i=0;
   }
}   
4  Using Arduino / Programming Questions / Re: Help on how to use the IRremote on: May 09, 2012, 12:43:59 pm
Pylon,

Thanks for your suggestions. They gave me some clues and helped.

Thanks,
Manuel
5  Using Arduino / Programming Questions / Re: Help on how to use the IRremote on: May 09, 2012, 12:40:34 pm
Pauls,

Thanks for your inputs now and for some other times that you helped me. I am going to include more function calls in the loop. What I want is to get from this function the key pressed, in the IR command, display it and use it to do other stuff, like get the number of degrees to run the motor, etc.

Thanks
Manuel
6  Using Arduino / Programming Questions / Re: Help on how to use the IRremote on: May 09, 2012, 12:16:17 pm
Pylon,

Thanks, I compiled it without errors. Now How I do call the function and get the key pressed instead of print it?

thanks
Manuel
7  Using Arduino / Programming Questions / Re: Help on how to use the IRremote on: May 09, 2012, 12:06:27 pm
  I apologise because, it may be stupid a question, but, I have very litle knowledge of C++ and I do not know where I insert the remaining code? This sketch is has a lot of code that is not familiar to me.
I only know write the very basic code.

Thanks,
Manuel
8  Using Arduino / Programming Questions / Re: Help on how to use the IRremote on: May 09, 2012, 11:51:35 am
Arrch,

Thanks for your comments, I understood them, but, I do not understand were we call the function to read the IRcode.

 
Code:
{
IR_code();
}

I tryied to make a function to read the code. Is this wrong?

thanks,
Manuel
9  Using Arduino / Programming Questions / Help on how to use the IRremote on: May 09, 2012, 11:06:37 am
Hi all!
I am trying to make a project (for my son that loves photography) to rotate a camera a certain amount of degrees and triger it, the goal is to make 360 deg. photos.

To avoid a keyboard I am trying to use a IRremote command to interface with the machine.

Now, my problem is the following:
 I am using the IRremote library and try to use " (irrecv.decode(&results))" as function, because, I need also to work with the display and stepping motor, but I get a few errors. Can I use this as a function or I must include the remaining code after close the ' if ' bracket ' } '. The code is below:

Thanks in adbance for your help.
Manuel


Code:

#include <DogLcd.h>
// initialize the library with the numbers of the interface pins
DogLcd lcd(9, 10, 11, 12);
#include <IRremote.h>
int receiver = 8; // Conectar IR Receiver na porta digital 8
IRrecv irrecv(receiver); // Criar objeto 'irrecv'
decode_results results;



void setup()
{
  lcd.begin(DOG_LCD_M163,0x28);
  lcd.clear();
  delay(100);
 // Serial.begin(9600); // for serial monitor output
  irrecv.enableIRIn(); // Start the receiver
}
void loop()
{
 for(;;)
{
 
IR_code();

}

IR_code()
  {
  if (irrecv.decode(&results)) // have we received an IR signal?
  {
    //lcd.print(results.value, DEC); // Imprimir na porta serial o valor do controle
    switch(results.value)
  {
    case 59: lcd.print(" Menu      "); break;
    case 2107: lcd.print(" Menu      "); break;
    case 32: lcd.print(" up      "); break;
    case 2080: lcd.print(" up      "); break;
    case 33: lcd.print(" down     "); break;
    case 2081: lcd.print(" down      "); break;
    case 16: lcd.print(" right     "); break;
    case 2064: lcd.print(" right      "); break;
    case 17: lcd.print(" left    "); break;
    case 2065: lcd.print("left    "); break;
    case 37: lcd.print(" OK/Enter    "); break;
    case 2085: lcd.print("OK/Enter    "); break;
    case 55: lcd.print(" Exit    "); break;
    case 2103: lcd.print(" Exit    "); break;       
    case 2049: lcd.print(" 1         "); break;
    case 1:  lcd.print(" 1         "); break;
    case 2: lcd.print(" 2    "); break;
    case 2050: lcd.print(" 2    "); break;     
    case 3: lcd.print(" 3    "); break;
    case 2051: lcd.print(" 3    "); break;     
    case 4: lcd.print(" 4    "); break;
    case 2052: lcd.print(" 4    "); break;     
    case 5: lcd.print(" 5    "); break;
    case 2053: lcd.print(" 5    "); break;
    case 6: lcd.print(" 6    "); break;
    case 2054: lcd.print(" 6    "); break;     
    case 7: lcd.print(" 7    "); break;
    case 2055: lcd.print(" 7    "); break;     
    case 8: lcd.print(" 8    "); break;
    case 2056: lcd.print(" 8    "); break;         
    case 9: lcd.print(" 9    "); break;
    case 2057: lcd.print(" 9   "); break;
    case 0: lcd.print(" zero    "); break;
    case 2048: lcd.print(" zero    "); break;         
 

    default: lcd.print(" other button   ");
  }
  delay(500);
    irrecv.resume(); // receive the next value
 }  // Your loop can do other things while waiting for an IR command
}
}

The error codes it gives are the following:
Code:
.cpp: In function 'void loop()':
:64: error: 'IR_code' was not declared in this scope
:65: error: 'IR_code' was not declared in this scope
:70: error: expected ';' before '{' token
:118 error: expected '}' at the end of input
10  International / Español / Re: vinciDuino - un Arduino Leonardo hecho por gente del foro on: February 01, 2012, 05:45:44 pm
 JMN,
Thanks for the information.
Regards,
Manuel
11  Using Arduino / Microcontrollers / Re: Arduino Leonardo on: February 01, 2012, 11:51:21 am
Chris, thanks for the information.

Do you think on release of Leonardo or in future it will be fully compatible?

Thanks,
Manuel
12  International / Español / vinciDuino - un Arduino Leonardo hecho por gente del foro on: February 01, 2012, 07:35:07 am
Hola a todos!
  Soy nuevo en electronica y se preguntó si la Vinciduino es compatible con el ambiente Arduino y si se puede utilizar la misma librea.

Excusa mi castellano, pero yo soy portugués


 Gracias,
 Manuel
13  Using Arduino / Microcontrollers / Arduino Leonardo on: February 01, 2012, 06:54:49 am
 Can you please let me know if the Arduino Leonardo is compatible with the Arduino IDE? Can we use it as a normal Arduino, sketches, libraries, etc?

Thanks in advance,
Manuel
14  Using Arduino / Programming Questions / Re: Random Reset on: January 09, 2012, 10:25:53 am
DC42,

Thanks, I did the correction you suggested and went fly last saturday and didn't get any random reset.

Thanks again,
Manuel 
15  Using Arduino / Programming Questions / Re: Random Reset on: December 31, 2011, 06:48:25 am
DC42,

Thanks for your help. I am going to change the sketch and test it.

Happy New Year
Manuel
Pages: [1] 2 3 ... 7