Show Posts
Pages: [1] 2 3 ... 5
1  Using Arduino / Sensors / Re: new thermocouple interface: MAX31855 on: August 11, 2011, 08:15:04 pm
Andy,  Thanks for the library.  Worked like a charm.  I has one in the works, but it was buggy and had issues with the spi timing, yours works great.  I send you a pull request on github with a example I added to the lib.
2  Forum 2005-2010 (read only) / Syntax & Programs / Re: Problems writing library on: January 18, 2009, 04:56:19 pm
Thanks, not sure what is going on, but added it to the .h of my library.
3  Forum 2005-2010 (read only) / Syntax & Programs / Problems writing library on: January 18, 2009, 01:35:58 pm
This is my first library, but having a few problems...

I cannot seem to get my example to compile.  The code is going to be posted here http://code.google.com/p/max6675-arduino-library/  and playground http://www.arduino.cc/playground/Main/MAX6675Library


 I am getting the following error:

Code:
In file included from /Applications/arduino-0012/hardware/cores/arduino/WProgram.h:4,

/Applications/arduino-0012/hardware/tools/avr/bin/../lib/gcc/avr/4.3.0/../../../../avr/include/stdlib.h:80: error: expected unqualified-id before 'int'

/Applications/arduino-0012/hardware/tools/avr/bin/../lib/gcc/avr/4.3.0/../../../../avr/include/stdlib.h:80: error: expected `)' before 'int'

/Applications/arduino-0012/hardware/tools/avr/bin/../lib/gcc/avr/4.3.0/../../../../avr/include/stdlib.h:80: error: expected `)' before 'int'

/Applications/arduino-0012/hardware/tools/avr/bin/../lib/gcc/avr/4.3.0/../../../../avr/include/stdlib.h:111: error: expected unqualified-id before 'int'

/Applications/arduino-0012/hardware/tools/avr/bin/../lib/gcc/avr/4.3.0/../../../../avr/include/stdlib.h:111: error: expected `)' before 'int'

/Applications/arduino-0012/hardware/tools/avr/bin/../lib/gcc/avr/4.3.0/../../../../avr/include/stdlib.h:111: error: expected `)' before 'int'

/Applications/arduino-0012/hardware/tools/avr/bin/../lib/gcc/avr/4.3.0/../../../../avr/include/stdlib.h:144: error: expected identifier before '(' token

/Applications/arduino-0012/hardware/tools/avr/bin/../lib/gcc/avr/4.3.0/../../../../avr/include/stdlib.h:144: error: expected `)' before '(' token

/Applications/arduino-0012/hardware/tools/avr/bin/../lib/gcc/avr/4.3.0/../../../../avr/include/stdlib.h:144: error: expected ',' or '...' before '(' token

/Applications/arduino-0012/hardware/tools/avr/bin/../lib/gcc/avr/4.3.0/../../../../avr/include/stdlib.h:144: error: expected initializer before ')' token

/Applications/arduino-0012/hardware/tools/avr/bin/../lib/gcc/avr/4.3.0/../../../../avr/include/stdlib.h:176: error: '__compar_fn_t' has not been declared

In file included from /Applications/arduino-0012/hardware/cores/arduino/WProgram.h:6,


Any ideas?
4  Forum 2005-2010 (read only) / Syntax & Programs / Re: Background running program on: December 31, 2008, 04:21:17 pm
Yes I know about those. I am not using that because 1) I want to learn how these things are built anyway and 2) because I might e making a few controllers for some friends ( there going to end up controlling a fan)
5  Forum 2005-2010 (read only) / Syntax & Programs / Re: Background running program on: December 31, 2008, 07:26:48 am
I will play with it some more tonight.  I might need to have a seperate micro to just do what I want.  The timing is critical because I am using it to dim a light http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1230333861.

The problem I was running into is that I cannot have any delays in m main program or the interrupt will not fire the triac properly.
6  Forum 2005-2010 (read only) / Syntax & Programs / Background running program on: December 30, 2008, 09:59:49 pm
I was wondering if it is possible to run a function in parallel with the main loop. What I am trying to do is run an interrupt with a delay to turn on and off a output but at the same time I want to keep the main program running. I am not to worried about the main program but making sure the interupt function works ( runs at 120hz).

Thanks for the help!
7  Forum 2005-2010 (read only) / Syntax & Programs / Re: String Comparison on: December 03, 2008, 09:02:40 am
Thanks, I can usually pick this stuff up fairly quick.

I see what you mean about the declaration...  I will most likely use updatestatus() in some other sub functions and call it directly.

I forgot you can just use " ", in strcat.  Its things like that that will help me keep program size down.

Thanks for your help.
8  Forum 2005-2010 (read only) / Syntax & Programs / Re: String Comparison on: December 02, 2008, 11:22:42 pm
halley, thanks for the function advice.  I have never used C before (used to PHP) but the knowing I can use the standard string functions made a huge difference.  Plus I was also able to add code to center the text (the LCD is 20 wide)...

Code:
 // Main Program
  char status[20];  // create buffer: status
  char currentstatus[20];  // create buffer: currentstatus

        /* Update the Status on the LCD */
        char* status = "Hello World.";
        updatestatus(status);

Code:
/*
  updatestatus(char* status)
  
  This function checks to see if the status passed is the currently
  registered status.  If it is not it sets it to the currently
  registered status, evaluates the length, computes the number of spaces
  to add to the front of the status to center it, and finally prints
  the formatted status to the top line of the LCD.
*/

void updatestatus(char* status) {
  // Check and see if the currently display status is the active status
  if(0 != strcmp(currentstatus, status)) {
    
    strcpy(currentstatus,status);  // copy status to currentstatus to show it has been read.

    int statuslen = strlen(status);  // get the length of the status string
    int spaces = ((20 - statuslen) / 2);  // calculate the number of spaces to place in front to center the text on the LCD
    
    char statusf[20];  // create a buffer for formatted status: statusf
    char* space = " ";  // create a space
    for(int i=0; i<spaces; i++) {  // for each space that needs to be generated
      strcat(statusf,space);  // add space to the formatted status using strcat()
    }
    strcat(statusf,status);  // add the status message to the formatted status with leading spaces

    // Update the LCD top line
    lcd.print("?a");  // set the cursor to home
    lcd.print("?l");  // clear the line
    lcd.print(statusf);  // print the formatted status
  }
}

Thanks alot for your help.  I am still very new to this, but you are all very helpful.  This starts to get easy very quickly.  I think is my lack of C knowledge holding me back.
9  Forum 2005-2010 (read only) / Syntax & Programs / String Comparison on: December 02, 2008, 09:21:42 pm
So I am trying to create a function to update the status text on my LCD, and store the current value it has written so it only updates on a change of the status, but for some reason "currentstatus" is always blank...  here is the code.

Code:
char status[40];
char currentstatus[40];

        /* Update the Status on the LCD */
        char* status = "Hello...";
          
          Serial.println(status);
          Serial.println(currentstatus);
        
          if(currentstatus != status) {
            updatestatus(status);
            char* currentstatus = status;
          }

Any ideas on where I am going wrong??
10  Forum 2005-2010 (read only) / Interfacing / AC Light Dimming on: December 26, 2008, 06:16:58 pm
Sorry wrong board...
11  Forum 2005-2010 (read only) / Development / Re: MAX6675 Interface Boards on: September 25, 2009, 09:48:16 pm
FYI the link on my site changed.  http://ryanjmclaughlin.com/arduino/thermocouple-interface-board/
12  Forum 2005-2010 (read only) / Development / Re: MAX6675 Interface Boards on: July 21, 2009, 03:14:44 pm
Temperature measurement...

Using thermocouples is a very standard way of measuring temperatures.  They also measure a much wider range of temps than most silicon based sensors.  This chip can measure 0 to 1024 deg C with a K-Type Thermocouple attached.

Common uses could be oven control, temp sensing, fluid temperature, etc.  I have one of the quad boards with 4 thermocouples hooked up to my grill to see my grill temp and I use a few probes to check meat temperature as well.
13  Forum 2005-2010 (read only) / Development / Re: MAX6675 Interface Boards on: July 20, 2009, 08:48:08 pm
Thanks.  I have really fallen in love with these, and they usually need little to no calibration either.
14  Forum 2005-2010 (read only) / Development / MAX6675 Interface Boards on: July 19, 2009, 08:19:08 pm
Hey all, just wanted to let you know that I put together some MAX6675 Interface boards.  The have the MAX6675 chip broken out, and a Thermocouple connector on the board for a simple interface.  Anyone who has tried to interface a thermocouple directly before, know it can be a pain in the ass.

More info is here http://ryanjmclaughlin.com/blog/arduino/thermocouple-interface-board/ and they are for purchase.  There are single and quad versions, although the quad version needs a better PCB layout, but this one still works.


15  Forum 2005-2010 (read only) / Interfacing / Re: AC Light Dimming on: July 20, 2009, 08:46:08 pm
Glad to see there is so much progress on this topic!  This is getting far more detailed than I ever expected. Awesome!

Sorry I have not been around too much.  My "real" job has been keeping me away from fun projects like this.  However, I have been having some more time lately to get back into things.

I should be posting in the next few days some more info on the final version of the "Darwin Shield"   smiley-grin  4 AC I/O for the Arduino.  I am trying to work out the best way of enclosing the whole thing and connectors for each output.  Let me know if you have any input.
Pages: [1] 2 3 ... 5