Loading...
  Show Posts
Pages: 1 2 [3] 4 5 ... 28
31  Forum 2005-2010 (read only) / Syntax & Programs / Re: Error with mathematical calculation on: November 12, 2006, 11:06:50 am
You are correct about that, I changed that after posting.

The Arduino environment does support this type of code:
Code:
float var = 0;

But, it consumes a lot of extra memory... I am running already into the limits of the memory of the Atmega8.

Would it be really hard to use the Atmega168 on the Arduino board (not the mini)?

32  Forum 2005-2010 (read only) / Syntax & Programs / Error with mathematical calculation on: November 11, 2006, 07:42:54 am
I have to do this calculation which I do with the following source:


Code:
int analogPin = 0;   // Pressure sensor connected to analog pin 0
long val = 0;   // variable to store the read value

void setup()
{
   Serial.begin(9600);      // opens serial port, sets data rate to 9600 bps
}

void loop()
{

    val = analogRead(analogPin);   // read the input pin (getting value of around 840-860)
    
    val = ( 1 - ( val/ 1013.25 ) ^ 0.19) ) / 22.558;
    
    Serial.print("Value: ");
    Serial.println(val);
    
    delay(1000);

}


This line gives an error:
Code:
val = ( 1 - ( val/ 1013.25 ) ^ 0.19) ) / 22.558;

The error is:
Quote
In function 'void loop()':
error: invalid operands of types 'double' and 'double' to binary 'operator^

I hope someone can help to solve this. I am totally new to the Arduino.

Thank you in advance!
33  Forum 2005-2010 (read only) / Interfacing / Re: Setting up MS Visual Studio to compile/upload? on: April 02, 2010, 07:30:42 am
I would love to have a play with it. Will email you when I get home.
34  Forum 2005-2010 (read only) / Interfacing / Re: arduino + iTunes...It is possible?? on: June 13, 2007, 02:18:38 pm
Don't give up so quickly, there are many guru's that will be glad to help!
35  Forum 2005-2010 (read only) / Interfacing / Re: Interfacing with max187 on: December 07, 2006, 07:47:45 am
Thanks Daniel,

That is a start... I have taken your note in the thread about SPI problems!

Quote
- use one (digital) pin to select the chip,  
This seems to be the easy part

Quote
- use another to sense when the A/D sampling is finished,
Any hints on how to do that? Edit: I mean, how to 'sense when the A/D sampling is finished'.

Quote
- use a third pin to supply a clock signal to "shift out" the sampling result data, and  
I need also a hint for this.

I hope I won't regret starting with this.... lol
36  Forum 2005-2010 (read only) / Interfacing / Interfacing with max187 on: December 07, 2006, 05:16:15 am
I am working on a project that uses a pressure sensor. So far, I have used the pressure sensor (Motorola/Freescale mpx4115ap) connected to an analog port on the Arduino NG. This worked ok, but since the 10-bit adc, I decided to start using an MAX187 12-bit adc to get better resolution. For an electronics Noob, this is quite an adventure.

I need some help to get started. I take it that I need to use a digital input and can use digitalread() to gather data. So far, I read that digitalread() just returns HIGH or LOW. When I used the pressure sensor with on an analog port, I just got a number that I could work with. Now it seems that I have to take some HIGH and LOW values to come to a number.

I don't see how to do this. Anyone who can help?

Thanks in advance!

Jan-Dirk
37  Forum 2005-2010 (read only) / Interfacing / Re: arduino and a cellphone on: November 17, 2006, 11:52:55 am
I think you are not supposed to ask the same question in every section of the forums... Also, it is easier to read the answers you might get in just 1 place.
38  Forum 2005-2010 (read only) / Development / Re: AVRProjectIDE - Editor for AVR/Arduino Projects on: October 24, 2009, 03:19:24 pm
Very nice you are working on this!

I am experiencing some problems though with code that compiles ok in the Arduino IDE, but not with yours. For example, I am using NewSoftSerial and SoftwareServo in my PDE. For both libraries I have an include. For example, I get messages: 'NewSoftSerial' does not name a type, 'Servo1' was not declared in this scope. Maybe it is a setting I am not aware of, but like I said, I don't get these messages in the Arduino IDE.

I also have a couple of suggestions:
- For example, Ctrl-G, to Go To a line (like in VS editor)
- Automatic save of (changed) files for backup every 5 minutes or so (I mention this because I let my computer on last night, for some reason the computer shut down and I lost my changes)

Looking forward to new version!
39  Forum 2005-2010 (read only) / Development / Re: Dallas Temperature Control Library released ;) on: January 05, 2010, 07:56:08 am
I want to convert the sensor address to a string, but I have hard time getting it to work.

This is what I tried:
Code:
void DeviceAddressString(DeviceAddress deviceAddress)
{
  char *deviceAddressString="";
  char *tempAddr;
  strcpy(deviceAddressString, "");
  for (uint8_t i = 0; i < 8; i++)
  {
    itoa(*deviceAddress[i], tempAddr, 10);
    strcat(deviceAddressString, tempAddr);
  }
}

A call to this function should fill deviceAddressString with the value of the device address.

Code:
DeviceAddressString(insideThermometer);

Help/suggestions are appreciated.
40  Forum 2005-2010 (read only) / Development / Re: RF Modules/VirtualWireLibrary/DallasOneWireLibrary on: December 15, 2009, 05:52:00 am
Tytower,

In your code I found somewhere this line:
Code:
#define ONE_WIRE_BUS 7

Does the 7 refer to digital pin 7? I have seen similar code where was used 53. What pin would that refer to?

Thank you!
41  Forum 2005-2010 (read only) / Development / Re: RF Modules/VirtualWireLibrary/DallasOneWireLibrary on: November 23, 2009, 04:20:53 am
Thanks again for your reply. A range of 2km is very nice. With LOS it will be even better probably.

Last week I have ordered 1 tx and 1 rx from Sparkfun. These are pretty similar to what you have, but lower range probably.

For the DR3100 I linked to earlier, I have an amplifier that I will try with the transceiver.

Somewhere in this thread I read that you were also using a DR3100. Sorry for the confusion!
42  Forum 2005-2010 (read only) / Development / Re: RF Modules/VirtualWireLibrary/DallasOneWireLibrary on: November 23, 2009, 03:10:20 am
Yeah, like often, I forgot the link: http://rfm.com/products/data/dr3100-1.pdf

I bought a couple of transceivers from eBay seller rfplus. He is not listing it currently, but I think he still has them, so an email might do.

Your transmitter is looks different from what I have. Price is good, but I think mine are cheaper.
43  Forum 2005-2010 (read only) / Development / Re: RF Modules/VirtualWireLibrary/DallasOneWireLibrary on: November 23, 2009, 02:56:13 am
Thanks for your reply!

I have a DR3100 but probably a different version. I don't think mine can be supplied with 12V. This is the one I have and it can handle only 4V max.
44  Forum 2005-2010 (read only) / Development / Re: RF Modules/VirtualWireLibrary/DallasOneWireLibrary on: November 22, 2009, 11:25:15 am
tytower,

I read that you are using the DR3100 (RF Monolithics, right?). Can you elaborate on wiring this rf module with the Arduino? Do you know what range you get with your setup between 2 devices?

45  Forum 2005-2010 (read only) / Development / Re: ArduinoVIDE on: October 24, 2009, 05:49:36 am
find a different host, there are too many popups where you host your file now.
Pages: 1 2 [3] 4 5 ... 28