Show Posts
Pages: 1 ... 27 28 [29] 30
421  Using Arduino / General Electronics / Re: 10K pot without stop on: May 13, 2011, 03:00:24 am
The multi-turn ones would have the same problem.  I have just found some 5K servo pots on the cheap so bought one to try out.  Thanks
422  Using Arduino / General Electronics / Re: 10K pot without stop on: May 13, 2011, 01:49:52 am
I just want a smooth rotation that has the accuracy to detect small movements like you can with a decent pot.  Using a pot also means less effort on programming.
423  Using Arduino / General Electronics / Re: Confused by how opamp is supposed to work on: May 13, 2011, 01:45:18 am
Is there an alternative that doesn't require the split voltages?  The MAX680 isn't a cheap chip especially if you don't need to be particularly clean with the output eg detecting a noise using a mic etc eg using a couple of transistors to build a simple amp.
424  Using Arduino / General Electronics / Re: 10K pot without stop on: May 13, 2011, 01:36:55 am
I want to use a 2 line LCD with the top line as the label and the bottom as the data.  By turning a pot from full one way to full the other way you can select which data/label combination is on the screen.  Then by turning the other device you can increase or decrease the value of the data.  I have built it already on breadboard and written the software but obviously with the stops!  If you change one piece of data then change to another there might not be enough sweep left.  The other way would be to just change the value of the new variable to whatever the position of the pot is and let the user turn it back.  This would work using two pots but it isn't ideal.
425  Using Arduino / General Electronics / Re: 10K pot without stop on: May 13, 2011, 01:22:41 am
No it is just so easy to hook them up to the arduino and pots are cheap!  I need two devices that match, either two encoders, two pots or one of each plus two buttons.  This will be the basis of a menu driven UI for my latest device.
426  Using Arduino / General Electronics / 10K pot without stop on: May 13, 2011, 12:32:16 am
Anyone know if it is possible to buy a 10K pot that just keeps turning ie goes from 10K to zero as you keep turning it round and round?
427  Using Arduino / Programming Questions / Re: I just want to display a string using GLCD! on: May 11, 2011, 04:55:19 am
Thanks PaulS,

I will learn C as I have learnt several dialects of BASIC, PASCAL and about 5 types of assembler (plus a starting knowledge of JAVA).  It was on my to do list for quite a while.  I am picking it up as we speak and have written a menu system for GLCD complete with input routine etc.  This is just one thing that I am having trouble with and cannot work out! 

I have a theoretical knowledge of the structures having used assembler and written such structures myself but was having problems with syntax etc....
428  Using Arduino / Programming Questions / Re: Changing one char of a char array on: May 11, 2011, 04:02:58 am
This is very strange but it is now working and I have no idea why it didn't last night!
429  Using Arduino / Programming Questions / Changing one char of a char array on: May 11, 2011, 03:38:48 am
I am having a problem with this little snippet of code:
Code:
 
    switch (IRvalue) {
      case rem0:
        Serial.println("0 pressed");
        value[pos] = '0';
        IRvalue = remright;
        GLCD.Puts(value);
        break;
      case rem1:
        Serial.println("1 pressed");
        Serial.print("Value : "); Serial.print(value); Serial.print("  at pos : "); Serial.println(pos, DEC);
        Serial.println(" ");
        Serial.println(" ");
        value[pos] = '1';
        Serial.print("Value : "); Serial.print(value); Serial.print("  at pos : "); Serial.println(pos, DEC);
        Serial.println(" ");
        Serial.println(" ");
        IRvalue = remright;
        GLCD.Puts(value);
        break;
      case rem2:

In the above code,  value  is a char array of length 11 and   pos   is an integer for the current location in an input routine.  The value  IRvalue  is the infra red value coming from the remote.....

Anyway,  the line   value[pos] = '1';   has the effect of making the array value[] blank !!
430  Using Arduino / Programming Questions / I just want to display a string using GLCD! on: May 11, 2011, 03:34:01 am
I have been programming for 20 years using BASIC, Pascal, assembly and recently Java but I have never needed to use C until the last week when I got an Arduino.

I have built a device using a 1280 with 4 line LCD, PS2 and IR interfaces and a few other bits and have written a program with a menu system that works but I have now spent more time on one silly little problem than on everything else and it is driving me loopy!

GLCD.Puts(variable);  does not work for strings only arrays of chars.....

I have been pointed towards using the RC2 of the latest library but cannot find where that is.
I have been trying to use toCharArray again with no luck
I have tried writing a function to do it but again with no luck....

This is a function I wrote:
Code:
void printstring(String toprint){
char outputstring[255];
int i = 0;
while (i <= toprint.length() -1) {
  if (i>255) {
    i = 255;
    break;
  }
  outputstring[i] = toprint.charAt(i);
  i++;
 }
 outputstring[i] = 0;
 GLCD.Puts(outputstring);
}

and I want to drive it with

Code:

  String test = 'xxxThis is a test'; 
  printstring(test);


I appreciate it is not very efficient etc but something that works would be better than something that is pretty!

When I run this code instead of displaying "xxxThis is a test" it displays "29556" !!  I assume that this is the address of the string rather than it's value.

I have read the documentation but I still cannot fathom what * is in relation to char arrays either.

This is going to be one of those really newbie questions but I am really banging my head against the wall and it is holding up the whole project!


431  Using Arduino / Displays / Re: Writing data from variable to GLCD. Getting errors on: May 11, 2011, 02:09:55 am
Simon,
I have updated the glcd library to support the Arduino String class in
Printf(), StringWidth(), and Puts() and have created a new RC release for the library.

So if you go grab the RC2 release, it should now work as you wanted it to.


--- bill

Bill, where do I find the RC2 release?  I am running version 22 at the moment and it doesn't work with that.
432  General Category / General Discussion / Re: Blind reprogramming on: April 30, 2011, 12:03:37 am
John,

Thanks that is really helpful.  I have located the .hex file, what is the installation of avrdude that you speak of?  Is this seperate from the Arduino installation.
433  General Category / General Discussion / Blind reprogramming on: April 29, 2011, 04:08:31 pm
Not sure which section this would go under BUT once I get a sketch working is there any way I can save the sketch as an image which I could email to someone else.  Then the other person can run a batch file to upload it OR a simple uploader program which detects the arduino and asks for a file then writes it out.
434  General Category / General Discussion / Re: Arduino's Fritzing diagrams on: April 17, 2011, 11:30:54 am
Arrr found them now, wonder why they were hidden away.

Thanks.
435  General Category / General Discussion / Re: Arduino's Fritzing diagrams on: April 17, 2011, 08:42:40 am
I have found the crystal but the only ceramic caps are the blue ones that span 2 pins not the flat ceramic discs.  The blue ones don't have the low values I want either ie 4.7pF etc.....

Which version of the software are you using?
Pages: 1 ... 27 28 [29] 30