Show Posts
Pages: 1 ... 1887 1888 [1889] 1890 1891 ... 3270
28321  Using Arduino / Networking, Protocols, and Devices / Re: Issue with Programmable XBee Pro S2B and Wireless Shield on: March 22, 2012, 11:26:17 am
Quote
If you are familiar with the Wireless Shield from Arduino
If it is like the one from Sparkfun, I have one. Do you have a link to yours?

Quote
This is the tutorial on arduino.cc for these radios.
A link, please. I'll try this out with radios I KNOW talk to each other.
28322  Using Arduino / Project Guidance / Re: Send Music Over Bluetooth to Stereo on: March 22, 2012, 10:52:55 am
Quote
I would like to make a device that would stream music via bluetooth from a computer to whatever jack the device is plugged into.
What will the Arduino be doing? Not participating in the streaming of the music.
28323  Using Arduino / Programming Questions / Re: Explanation about Pointers on: March 22, 2012, 10:24:52 am
Quote
What is the main advantage of using pointers?
You can pass a pointer to a function that needs to modify the pointed to data, rather than making the data global. There are some functions that return pointers. You must learn to deal with those functions, so that means that you must understand pointers. After a while, you'll understand that this question is rather meaningless.

Quote
I mean when does I should consider using a point or a normal variable?
The context will define when one or the other is appropriate. No sense try to use one then the other is the correct type to use.

Quote
Pointers points to memory locations using *, knowing this what can I do in terms of operations inside functions?
A pointer is declared using the *. That has nothing to do with the fact that a pointer simply points to some memory location. In a function that receives a pointer, you dereference the pointer to get/set the pointed to data.

Quote
From what I read pointers are a little hard to understand and I'm also share this opinion
So are many things you are not familiar with. After a while, you'll wonder why you ever had trouble understanding/using/appreciating pointers.
28324  Using Arduino / Networking, Protocols, and Devices / Re: Issue with Programmable XBee Pro S2B and Wireless Shield on: March 22, 2012, 10:07:24 am
Quote
Opening the Serial Monitor thru the IDE allows me to "chat" with each radio.
When you use the Serial Monitor to talk to the Arduino, the XBee on it is not involved at all.

Quote
The radios will communicate just fine.
You haven't proven that.

Quote
I unplug the radios and switch the toggle from USB to Micro on the shield and replug them. Nothing happens. No led flashing.
Looks to me like you do not have the XBees configured correctly. What did you set/change to what?
28325  Using Arduino / Networking, Protocols, and Devices / Re: Newbee Xbee connection on: March 22, 2012, 09:48:34 am
Quote
I was planing on something like this for the Arduino power
Buy stock in the battery manufacturer, first.

Quote
Also I think the 2AA battery step up wouldn't be additional hardware if I get this
additional hardware... OK.

Quote
I assume the 4AA pack that I would need is this one
That will work.

Quote
Does everything else look good?
Yes.

Quote
Any advice on how easy/difficult this will be to set up?
Getting the hardware connected is easy. Configuring the XBees is easy. Getting them to read and send the accelerometer data will be the hardest part. Writing the code to receive the data from the remote XBee, and make sense of it will be the most challenging part of the project.
28326  Using Arduino / Storage / Re: SD Causing Reset on Diecimila on: March 22, 2012, 09:41:48 am
Why are there extern "C" statements in your code?

Quote
Is it seriously that simple? Like plug and play?
It is.
28327  Using Arduino / Programming Questions / Re: Getting output highs when I should be getting lows on: March 22, 2012, 09:38:39 am
Code:
float voltage = readVoltage(PHOS_IN_A1);
So, where is this function?

Code:
for(int i=0; i <10; i++)   //Takes 10 readings
aRead += analogRead(PHOS_IN_A1);  //Reads phos in pin
aRead = aRead/10;        //Takes the average of 10 readings
voltage = (aRead * 5.0)/1024.0;   //Converts to digital
voltage = voltage*1000;           //Converts to millivolts
Why is this still here? It belongs in the function.
28328  Community / Products and Services / Re: Arduino GPS Shield on: March 22, 2012, 09:10:40 am
Quote
i've trying to modified the coding from arduino tutorial
I'm pretty sure that there is more than one Arduino tutorial on the internet. Can you be just a teensy bit more specific?

Quote
im using Charactor LCD Module (20 x 4 lines, LED Backlight)
Which you can write to, so you know that it is connected correctly and is functioning.

Quote
and GPS shield v1.0(MYD1094 model) with active antenna
I've clicked all over your post. Nothing happens. The internet must be down. I'll try again later.

Quote
i need the examples coding to display the gps data on the lcd
Code:
lcd.print(gpsData);

Quote
and how to communicate the GPS shield to my arduino
As soon as the internet comes back up, or you post a link...
28329  Using Arduino / Programming Questions / Re: IR signals to MIDI output via USB on: March 22, 2012, 08:54:08 am
Quote
what that is doing is checking to see if the results.value of the IR receiver matches up to powerValue OR powerValueB
No, it isn't. It is comparing results.value to powerValue, and getting true or false. It then performs an OR of that true/false value and powerValueB. It is equivalent to:
Code:
bool isPowerA = (results.value == powerValue);
if(isPowerA || powerValueB)
{
}
which you can clearly see is not the same thing. There are no shortcuts like you are trying to invent. You need
Code:
if(results.value == powerValue || results.value == powerValueB)
Quote

Quote
that part of my code is working exactly as intended
I doubt that.

actually, I would rather NOT have a for loop there if i don't need it... I'm not trying to send the same note data over and over again until the for loop is over... I want the MIDI data to be sent once, but have it so that the LED light lights up when it sends this note...

the only thing is, when you light up the LED to the MIDI note being sent, the LED lights up so quickly that you can't even see it... so I put in the for look so that there are a few miliseconds before the light goes out...
So, leave the lights on for some time. Then toggle them:
Code:
          // Send on note
          noteSend(0x09, 0xB0, 0x08, 0x7F);
          digitalWrite(3, LOW);
          digitalWrite(5, HIGH);
          digitalWrite(6, HIGH);
          delay(50);
          digitalWrite(3, HIGH);
          digitalWrite(5, LOW);
          digitalWrite(6, LOW);
You can diddle with the delay value to make it whatever you want.
28330  Using Arduino / Programming Questions / Re: Getting output highs when I should be getting lows on: March 22, 2012, 08:43:11 am
If you take AWOL's advice to move the pin reading/average calculation code into a function, you would call it like so:
Code:
void loop()
{
   float voltage = readVoltage(PHOS_IN_A1);
   if( voltage <= 2000 )  //If voltage less than 2V
   {
     digitalWrite(DEP_TIME, HIGH); //Gives 5V output to dep timer
   }
   else if( voltage > 2000 )   //If voltage more than 2V
   {
     digitalWrite(DEP_TIME,  LOW) ;   //Gives no output if no gasses are flowing
   }

   voltage = readVoltage(BOR_IN_A2);
   if( voltage <= 2000 )  //If voltage less than 2V
   {
     digitalWrite(DEP_TIME, HIGH); //Gives 5V output to dep timer
   }
   else if( voltage > 2000 )   //If voltage more than 2V
   {
     digitalWrite(DEP_TIME,  LOW) ;   //Gives no output if no gasses are flowing
   }

   voltage = readVoltage(ARS_IN_A3);
   if( voltage <= 2000 )  //If voltage less than 2V
   {
     digitalWrite(DEP_TIME, HIGH); //Gives 5V output to dep timer
   }
   else if( voltage > 2000 )   //If voltage more than 2V
   {
     digitalWrite(DEP_TIME,  LOW) ;   //Gives no output if no gasses are flowing
   }
}
which clearly would be a problem, as the timer would be turned on if a gas was flowing, and off if the last gas was not flowing. So, you fix that by adding a flag:
Code:
void loop()
{
   bool gasIsFlowing = false;
   float voltage = readVoltage(PHOS_IN_A1);
   if( voltage <= 2000 )  //If voltage less than 2V
      gasIsFlowing = true;

   voltage = readVoltage(BOR_IN_A2);
   if( voltage <= 2000 )  //If voltage less than 2V
      gasIsFlowing = true;

   voltage = readVoltage(ARS_IN_A3);
   if( voltage <= 2000 )  //If voltage less than 2V
      gasIsFlowing = true;

   // If gas is flowing, turn on the timer
   if(gasIsFlowing)
   {
     digitalWrite(DEP_TIME, HIGH); //Gives 5V output to dep timer
   }
   else
   {
     digitalWrite(DEP_TIME,  LOW) ;   //Gives no output if no gasses are flowing
   }
}
28331  Using Arduino / Storage / Re: SD Causing Reset on Diecimila on: March 22, 2012, 08:32:22 am
Quote
Dang. I'm using a Diecimila which has a 168 chip.
Which you could replace with a 328 chip.
28332  Using Arduino / Networking, Protocols, and Devices / Re: Trouble with Parallex GPS and Arduino Mega2560 on: March 22, 2012, 08:21:41 am
Quote
So I switched pins so my code reads:
SoftwareSerial GPS = SoftwareSerial (2,3)
You've got 4 hardware serial ports. Please explain why you are using software serial ports at all!
28333  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Uno + Wireless proto shield + Wifly module on: March 22, 2012, 08:08:32 am
Quote
I know am going off topic but my problem depends on knowing the form in which the data is received from the wifly. Anything more than this will definitely be related to the LCD. So knowing the data that is coming in is highly important.
I think it's time to start a new thread with a specific question, and some code. Only you know where the data is coming from. That should define the "form in which the data is received from the wifly". The WiFi shield is not modifying the data.
28334  Using Arduino / Storage / Re: SD Causing Reset on Diecimila on: March 22, 2012, 07:50:21 am
Do you have a 168 or a 328 chip. The 168 doesn't have enough memory. The SD library needs 512 bytes of memory just for the buffer that holds the data to be written to the file. No, you can't change that. It's defined by the write block size of the SD cards.
28335  Using Arduino / Programming Questions / Re: easyVR with Ethernet on: March 22, 2012, 07:31:40 am
I clicked on that "link". Nothing happened. The site must be down. I'll try again later.
Pages: 1 ... 1887 1888 [1889] 1890 1891 ... 3270