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:
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:

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: ");


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

The error is:
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!

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

- 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'.

- 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!

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:
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.


Help/suggestions are appreciated.
40  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.
41  Forum 2005-2010 (read only) / Development / Re: new wireless comms module on: May 21, 2009, 12:47:16 pm
Did you ever get the dr3100 to work with Arduino? If yes, would you care about how you connected it and show some of your code?
42  Forum 2005-2010 (read only) / Development / Re: Faster Mini Startup on: January 22, 2009, 03:38:56 am
Can you upload just the hex to your Arduino? Or comes the mini without the icsp header?
43  Forum 2005-2010 (read only) / Development / Re: How is the burning of bootloader done in 0010 on: November 22, 2007, 11:17:58 am

Thanks for your help Mellis!
44  Forum 2005-2010 (read only) / Development / Re: How is the burning of bootloader done in 0010 on: November 22, 2007, 04:12:55 am
It took some time, but I have finally found out that setting upload.verbose to true does work.

I copy/pasted the contents of the output window to Notepad and was able to find 2 AVRDude commands:
C:\Program Files\Arduino\Arduino-0010\hardware/tools/avr/bin/avrdude -CC:\Program Files\Arduino\Arduino-0010\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -pm168 -cstk200 -e -Ulock:w:0x3F:m -Uefuse:w:0x00:m -Uhfuse:w:0xdd:m -Ulfuse:w:0xff:m

C:\Program Files\Arduino\Arduino-0010\hardware/tools/avr/bin/avrdude -CC:\Program Files\Arduino\Arduino-0010\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -pm168 -cstk200 -Uflash:w:hardware\bootloaders\atmega168\ATmegaBOOT_168_ng.hex:i -Ulock:w:0x0F:m

Is it correct that the first command unlocks the processor (fuses?) for burning and the second command burns the bootloader and sets the fuses again?

I should be able to use the 2nd command, replace ATmegaBOOT_168_ng.hex with my own .hex file, to burn .HEX files generated by the compiler in the IDE?
45  Forum 2005-2010 (read only) / Development / Re: How is the burning of bootloader done in 0010 on: November 10, 2007, 11:43:25 am
Unfortunately, it looks like there is nothing shown when setting upload.verbose to true. I am expecting this to see in the bottom part of the IDE or in the DOS box that opens when you start run.bat

Any ideas?
Pages: 1 2 [3] 4 5 ... 28