Show Posts
Pages: 1 ... 34 35 [36] 37 38 ... 68
526  Using Arduino / Programming Questions / Re: What does this mean? on: January 13, 2013, 11:09:32 am
on is probably a boolean (either true or false) or an int either 1 or 0, so it is equivalent to:
Code:
digitalWrite(13, on);
527  Using Arduino / Programming Questions / Re: Is it possible to convert a int into a string? on: January 10, 2013, 10:04:40 pm
If the number is between 0 and 9 then you can do
Code:
char c = number + '0';

If number is bigger then no there is not an easier solution than itoa, but there is another solution that is sprintf
Code:
char string[12];
sprintf( string, "%d", number );
print( string );
528  Using Arduino / Programming Questions / Re: Serial.print not printing... on: January 09, 2013, 10:41:33 pm
You could also use sprintf:
Code:
char str[13];
sprintf( str, "%04d%04d%04d", loadcell, ampbatt, mainbatt );
Serial.print( str );
529  Using Arduino / Programming Questions / Re: Algorithm to rotate data on: January 09, 2013, 10:30:23 am
Something like this should work:
Code:
for (uint8_t i = 0; i < 4; i++)
  for (uint8_t j = 0; j < 4; j++)
    array_rotated[i][j] = array[3-j][i];

Or, for a single dimension array:
Code:
for (uint8_t i = 0; i < 4; i++)
  for (uint8_t j = 0; j < 4; j++)
    array_rotated[(i*4)+j] = array[((3-j)*4)+i];
530  Using Arduino / Programming Questions / Re: Trigonometric Functions in Arduino on: January 09, 2013, 08:19:37 am
Do you mean the functions acos, atan etc?
531  Using Arduino / Displays / Re: LCD TOUCH HELP on: January 08, 2013, 06:54:46 pm
More I/O pins, more memory. To use all the features of that LCD shield (touchscreen and SD card reader) you need an Arduino Mega smiley


If you buy a Arduino Uno, then you need this shield to connect the display:

http://dx.com/p/arduino-lcd-tft01-arduino-shield-v1-2-board-module-blue-140955?rt=1&p=2&m=2&r=3&k=1&t=1&s=145725&u=140955

But then you won't be able to use all the features of the LCD.

I recommend the Arduiono Mega so no problems smiley-cool
532  Using Arduino / Programming Questions / Re: Shift Register Library on: January 08, 2013, 05:39:04 pm
If you use 74HC595 shift registers, you could try this one

http://code.bildr.org/project/Shift%20Register%208-Bit%20-%2074HC595/Arduino
533  Using Arduino / Displays / Re: LCD TOUCH HELP on: January 08, 2013, 05:27:13 pm
NP, can I suggest buying this LCD, because it's the same thing but cost less:

http://www.sainsmart.com/sainsmart-3-2-tft-lcd-display-sainsmart-tft-lcd-adjustable-shield-for-arduino-2560-r3-1280-a082-plug.html

Or, if you didn't buy the arduino already, buy this pack:

http://www.sainsmart.com/sainsmart-mega2560-board-3-5-tft-lcd-module-display-shield-kit-for-atmel-atmega-avr-16au-atmega8u2.html

I bought the same pack on ebay for 35€ (~45$) smiley
534  Using Arduino / Programming Questions / Re: Text Array on: January 08, 2013, 05:15:31 pm
Is there a string longer or shorter than 3 characters in his code? No so why are you discussing things unrelated to the question...
535  Using Arduino / Displays / Re: LCD TOUCH HELP on: January 08, 2013, 02:24:46 pm
Yes, but it is recommended to connect it with the help of this adapter shield:

http://dx.com/p/tft01-3-2-lcd-shield-v1-2-for-arduino-mega-2560-144471?rt=1&p=2&m=2&r=3&k=1&t=1&s=145725&u=144471
536  Using Arduino / Programming Questions / Re: Text Array on: January 08, 2013, 08:09:18 am
Or,
Code:
char sNames[7][4] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sun"};
537  International / Français / Re: booster la vitesse d'affichage d'un ITDB02 5"? on: January 03, 2013, 11:01:33 am
Je pense que c'est la librairie UTFT qui est lente, elle est conçue pour fonctionner avec pleins d'écrans et donc utilise une méthode universelle pour remplir l'écran: pixel par pixel.

Je ne sais pas quel contrôleur ton écran utilise, mais si tu regarde son datasheet tu y verra probablement une méthode nettement plus rapide pour effacer (ou remplir) l'écran. Maintenant pour convertir ce qui est dit dans le datasheet, en code C... smiley-grin
538  Using Arduino / Programming Questions / Re: Save a string came from Serial on: January 03, 2013, 06:48:51 am
Regarde ce post: http://arduino.cc/forum/index.php/topic,134402.msg1010837.html#msg1010837
539  Community / Exhibition / Gallery / Re: High speed vector graphics engine. 3.2" TFT Lcd screen. on: January 02, 2013, 01:08:32 pm
pYro I don't really care about an oscillator (or whatever it is), I'm more interested about testing your fast library and see the differences (in the code) between it and UTFT. I'm stuck converting what I can read from the SSD1289 datasheet to a C++ code (timing, etc)...Your lib will teach me a lot, I think smiley
540  Using Arduino / Programming Questions / Re: Add to an integer on: January 01, 2013, 06:20:26 pm
You have few choices:
Code:
i = i + 1;
i += 1;
i ++; //post increment
++ i; //pre increment
Pages: 1 ... 34 35 [36] 37 38 ... 68