Show Posts
Pages: 1 ... 2148 2149 [2150] 2151 2152 ... 3289
32236  Using Arduino / Programming Questions / Re: [HELP] Unable to get display FLOAT variable correctly at TCP serial communicatio on: December 21, 2011, 05:25:34 am
The Serial.write() function sends binary data. Why are you sending binary data to a TCP connection?

You really should be using Serial.print().

If i use Serial.println  and with USB communication,
the result is displayed correctly (around 23.XX to 24.XX  Celsius).
Well, whack yourself with a clue-by-4, then.

I am suspecting this is because the Serial.write is taking the result of temperate as the ascii code.
and thus display the corresponding character with the ascii code.
Not even close.

I have tried to cast the tempC to byte ... but still failed..
The tempC variable is a 4-byte data type. Casting that to a 1 byte data type means that you haven't a clue what casting does.
32237  Using Arduino / Programming Questions / Re: Sending SMS using a Old sony phone on: December 21, 2011, 05:19:14 am
When posting code, please do it properly. Select the # icon BEFORE pasting your code.

What is this supposed to be?
    if (l >= smiley-cool
32238  Using Arduino / Programming Questions / Re: Adding files to library on: December 21, 2011, 05:10:28 am
I have gone through your posts and  has done all of it as I understood it. But I am not able to import it to the library folder.
When you use Sketch + Import library, there is a list of (header files in) libraries that you can include. Write down one of the names.

Then, close the IDE.

Then, use your operating system's file explorer capability to locate the name of the library that you wrote down. Study how the include file is positioned relative to the libraries directory/folder.

Replicate that relative positioning for the keypad.h file.

Restart the IDE. You will now be able to import the keypad library.

Without knowing what OS you are using, and what version of the IDE, and where YOU put the keypad.h file, that is all the help you are going to get.
32239  Using Arduino / Programming Questions / Re: VFD Drive Program (Please criticise) on: December 21, 2011, 05:04:23 am
can be changed
But shouldn't be. The original meaning is MUCH clearer. What would happen in your code is the Arduino team decided that HIGH should be 0 and LOW 1?

Before you say that that will never happen, take a look at all the things changed between 22 and 1.0.
32240  Using Arduino / Programming Questions / Re: void value not ignored as it ought to be on: December 21, 2011, 05:01:20 am
what has changed in Arduino 1.0?
You've already been told. The toUpperCase() function no longer returns a copy of the String converted to upper case. It now converts the String object it is called for to upper case.

If you want to work on a copy of the String, YOU must copy it.
32241  Using Arduino / Programming Questions / Re: Problem using Time.h library on: December 21, 2011, 04:58:24 am
I downloaded it and put it inside / to includes/Time.
On what OS? What is "path to includes"? What version of the IDE?

But... I'm not able to include it
Then, it isn't in the right place.
32242  Using Arduino / Networking, Protocols, and Devices / Re: SD Card on Arduino Nano on: December 20, 2011, 07:25:12 pm
Where on the NewSoftSerial.h file did you plug in the XBee? Don't be silly. You can't connect hardware to software.

If you don't want to describe what SD card you are using, and how it is connected, that's fine. Good luck.
32243  Using Arduino / Networking, Protocols, and Devices / Re: SD Card on Arduino Nano on: December 20, 2011, 07:17:25 pm
It is attached to the serial library
You can't attach hardware to software.

You should post some code, a link the SD card reader/writer you are using, and a schematic showing how it is connected.

Ive got it working, but its very slow.  I guess thats because its FAT32?
Or any of a number of other factors. Without seeing any code, or having any idea what you are talking to, or how, we can't offer any more help.
32244  Using Arduino / Programming Questions / Re: Arduino as signal processor on: December 20, 2011, 06:27:24 pm
the idea is that it only provides an analog voltage number
That you discard...

if(pulse == 10);
So, if pulse IS 10, do nothing, and if it isn't 10, do nothing. OK, I guess.
32245  Using Arduino / Programming Questions / Re: Error = Void does not name a type?? on: December 20, 2011, 06:19:34 pm
There is documentation for the various data types that the Arduino uses here:
Notice that there is a link for int, but not one for Int. Case matters.

Did you fingers get stuck on the ctrl and v keys? What's with all the loop() functions?
32246  Using Arduino / Programming Questions / Re: pwm relays on: December 20, 2011, 06:13:30 pm
There is absolutely nothing on that page that indicates that you can PWM those relays. So forget that.

what I was trying to do with this code is read the relays value.
Why? You know (or you should know) what you last wrote the the relay pins.

You can't read the value of two pins with one digitalRead().
32247  Using Arduino / Programming Questions / Re: Reading serial data and echoing it on: December 20, 2011, 06:08:53 pm
After you display a value, record the time:
showedNumber = millis();
Be sure to declare the global variable:
unsigned long showedNumber = 0;

Then, on each pass through loop, see if it is time to clear the screen.
if(millis() - showedNumber > showTime)
   // clear the screen
Again, be sure to declare and initialize the global showTime variable:
unsigned long showTime = 900000UL; // 15 minutes (use whatever value you like here)
32248  Using Arduino / Programming Questions / Re: Sending multiple variables from processing to arduino on: December 20, 2011, 06:02:23 pm
I have 2 variables in processing, a and b.
Of what type?

Sending one variable is quite easy, but how is it done with more then one?
Just like one.

How am i able to say, hey this is the value of variable a and this for variable b.(like marking them)
Are you sending in binary or ASCII? If ASCII, "A=xxx, B=yyy" would work. If binary, there is no need to label them. The bytes are sent in the order you specify.
32249  Using Arduino / Programming Questions / Re: Error = Void does not name a type?? on: December 20, 2011, 05:59:20 pm
Can you provide a link to the documentation for the Int data type? No such thing exists. int, yes. Int, no.


pinMode(A_SIDE, OUTPUT);

pinMode(B_SIDE, OUTPUT);

//setting the reference voltage to the default setting

All executable code, like this, belongs inside a function. This is not inside a function.

Put this back in your pocket. You're sure to need it in the right place, later.

You have so many things capitalized that should not be. Int, Void, For, etc. all start with lower case letters.
32250  Using Arduino / Programming Questions / Re: pwm relays on: December 20, 2011, 05:54:58 pm
  pinMode(relay1, INPUT);
pinMode(relay2, INPUT);
Are you planning on changing the mode of these pins? If not, these statements belong in setup(), not loop.

val = digitalRead (relay1 & relay2);
Please explain what you think this is doing. It isn't, but in order to fix it, we need to know what you think it is going to do, so we can supply the code to actually do that.

digitalWrite (relay1, 225);
digitalWrite (relay2, -225);
You can't use a negative value for the PWM duty cycle.

You can't PWM relays, anyway. You need to provide a link to the board you are using, and explain why you think you can cycle a relay at PWM speeds.
Pages: 1 ... 2148 2149 [2150] 2151 2152 ... 3289