Show Posts
Pages: 1 ... 9 10 [11] 12 13 ... 23
151  Using Arduino / Microcontrollers / Re: Analog Input on: January 29, 2013, 12:06:04 am
Just sometimes I may not be using the board for too long time. So I have forgotten what is the sketch that I had uploaded previously.

Thanks
152  Using Arduino / Microcontrollers / Re: Burning Code in a DIY Arduino on: January 29, 2013, 12:04:12 am
True, but then you have to make sure you don't have anything connected to Tx/Rx for best results.

Quote
So, is that means it is better not to connect any input/output device at the MOSI, MISO and SCK pins ?

It depends on the device a bit. SPI devices are designed for this sort of thing, you just don't activate them through their slave select pin.
So do this means that I cant connect anything to this 2 pins ? Or it is not adisable to connect anything here?
153  Using Arduino / Microcontrollers / Re: Analog Input on: January 28, 2013, 11:59:22 pm
Thanks alot. Appreciate it!

Is it ok to add :
Code:
pinMode(D14, INPUT);
digitalWrite (D14, LOW);

everytime when I am using analog pins ?
This is because sometimes I am not sure about the previous use of the analog pin. Or any ways I can check it ?

What do you mean analogRead working not correctly ? It's reading is inaccurate ?


154  Using Arduino / Microcontrollers / Re: Burning Code in a DIY Arduino on: January 28, 2013, 10:59:34 pm
Thanks alot ! Great websites you have there !
155  Using Arduino / Microcontrollers / Re: Burning Code in a DIY Arduino on: January 28, 2013, 10:53:47 pm
I still dont get for the explanation on SPI pins
156  Using Arduino / Microcontrollers / Re: Burning Code in a DIY Arduino on: January 28, 2013, 10:02:38 pm
So, is that means it is better not to connect any input/output device at the MOSI, MISO and SCK pins ? Are you programming using USBasp/usbtiny right ? If you are using ftdi programmer, then it will only involve Tx and Rx

Thanks
157  Using Arduino / Microcontrollers / Re: Analog Input on: January 28, 2013, 09:59:42 pm
Okay. So it means if I used it to be digital I/O, then later on I want to use it as analog input, then I have to add
Code:
pinMode(D14, INPUT);
digitalWrite (D14, LOW);
??

Correct ?
158  Using Arduino / Microcontrollers / Re: Burning Code in a DIY Arduino on: January 28, 2013, 12:56:01 pm
Hey thanks for your replies.
Yes I know MOSI and MISO goes berserk when programming so I set them up as inputs with buttons to be safe.

Can I use the USBtinyISP with Arduino IDE?

Thanks for the tutorial too smiley-grin
X
What is the function of the button and what do you mean Mosi miso goes berserk?
Thanks
159  Using Arduino / Microcontrollers / Re: Analog Input on: January 28, 2013, 12:50:47 pm
So, it means that I have to add the code in the void setup every time if I am dealing with analog pins ?

Why do it need to read twice ?

Thanks
160  Using Arduino / Microcontrollers / Analog Input on: January 28, 2013, 12:22:26 pm
http://arduino.cc/en/Tutorial/AnalogInputPins

For this tutorial,
Can anyone explain to me about this ?
Details and Caveats

The analogRead command will not work correctly if a pin has been previously set to an output, so if this is the case, set it back to an input before using analogRead. Similarly if the pin has been set to HIGH as an output, the pullup resistor will be set, when switched back to an input.

The Atmega datasheet also cautions against switching analog pins in close temporal proximity to making A/D readings (analogRead) on other analog pins. This can cause electrical noise and introduce jitter in the analog system. It may be desirable, after manipulating analog pins (in digital mode), to add a short delay before using analogRead() to read other analog pins.

I do not understand it.

Thanks
161  Using Arduino / Programming Questions / Re: VirtualWire on: January 26, 2013, 11:21:50 am
Illustrate the difference between boolean variable and non-boolean variable smiley-grin
162  Using Arduino / Programming Questions / Re: VirtualWire on: January 26, 2013, 11:11:31 am
Can you give me some simple example to illustrate that ?

Thanks
163  Using Arduino / Programming Questions / Re: VirtualWire on: January 26, 2013, 10:59:22 am
Ok. I think is like this

Code:
If (x>y)
--> this is example of boolean variable which will return either true or false.

Code:
If (variable==HIGH)
--> This is non boolean variable..

Am I correct ?

Thanks
164  Using Arduino / Programming Questions / Re: Serial communication between two arduino on: January 26, 2013, 10:54:55 am
Cool ! I get it !

However, just wonder, for the below coding :
Code:
if (buttonPushCounter % 4 == 0) {
    digitalWrite(ledPin, HIGH);
    Serial.println("The LED is ON");
  } else {
   digitalWrite(ledPin, LOW);
  }

the %4 is just example is it ? to show us that the chip knows when to light up the led ? which is the press which is multiple of 4
165  Using Arduino / Programming Questions / Re: VirtualWire on: January 26, 2013, 10:26:27 am
what's the difference between boolean variable and non-boolean ? AND OR ?
Pages: 1 ... 9 10 [11] 12 13 ... 23