Show Posts
Pages: 1 2 [3] 4
31  Using Arduino / Project Guidance / Re: How to Create logic on: May 06, 2013, 06:51:27 am
Could plz tell me how to fix the floating outputs

This is the circuit we used with 4 O/P and I/P(repeated the same circuit 4 times)

http://www.seeedstudio.com/wiki/images/thumb/5/55/Arduino_Sidekick_Pushbutton_LED.jpg/400px-Arduino_Sidekick_Pushbutton_LED.jpg
32  Using Arduino / Project Guidance / Re: How to Create logic on: May 06, 2013, 06:45:11 am
Also this part of our code is not working

Code:
if (L2State ==HIGH && P1State==HIGH)
 {
   digitalWrite(S1, LOW); 
    digitalWrite(S3, LOW);
   
 }

  }
33  Using Arduino / Project Guidance / Re: How to Create logic on: May 06, 2013, 06:36:48 am
when we press L2 and P1 all the LED glow i.e all O/P are high at same time where as they should have been low.
34  Using Arduino / Project Guidance / Re: How to Create logic on: May 06, 2013, 06:31:18 am
still This part is not working.

Quote
if i want off all LED at the same time when P1 and L2 both are HIGH(on).
35  Using Arduino / Project Guidance / Re: How to Create logic on: May 06, 2013, 06:26:49 am
Hi to all,

Just i tried to complete some part, but i am stuck at some place , let me know if anyone can solve this problem.

In this program if i want off all LED at the same time when P1 and L2 both are HIGH(on).
 
I've tried to use boolean AND operator,if, do while, while
 
Still it's not working ..Let me know if there is any logical error

my code is,

Code:
const int P1 = 2;     // the number of the pushbutton pin
const int P2 = 3;     // the number of the pushbutton pin
const int L1 = 4;     // the number of the pushbutton pin
const int L2 = 5;     // the number of the pushbutton pin

 int S1 =  8;      // the number of the LED pin
 int S2 =  9;      // the number of the LED pin
 int S3 =  10;      // the number of the LED pin
 int S4 =  11;      // the number of the LED pin


// variables will change:
int P1State = 0;         // variable for reading the pushbutton status
int P2State = 0;         // variable for reading the pushbutton status
int L1State = 0;         // variable for reading the pushbutton status
int L2State = 0;         // variable for reading the pushbutton status


void setup() {
  // initialize the LED pin as an output:
  pinMode(S1, OUTPUT);
  pinMode(S2, OUTPUT);
  pinMode(S3, OUTPUT);
  pinMode(S4, OUTPUT); 
 
  // initialize the pushbutton pin as an input:
  pinMode(P1, INPUT);
  pinMode(P2, INPUT); 
  pinMode(L1, INPUT);
  pinMode(L2, INPUT);
}

void loop(){


  // FOR  P1 ACTIVE
  P1State = digitalRead(P1);
  P2State = digitalRead(P2);
  L1State = digitalRead(L1);
  L2State = digitalRead(L2);
 

if (P1State == HIGH)
{
    // turn LED on:   
    digitalWrite(S1, HIGH); 
    digitalWrite(S3, HIGH);
     digitalWrite(S2, LOW); 
    digitalWrite(S4, LOW);
   
}
if (L2State == HIGH)
 {
   digitalWrite(S1, LOW); 
    digitalWrite(S3, LOW);
    digitalWrite(S2, HIGH); 
    digitalWrite(S4, HIGH);
 }
   
 
    if (L1State ==HIGH)
 {
   digitalWrite(S1, LOW); 
    digitalWrite(S3, LOW);
    digitalWrite(S2, LOW);   
    digitalWrite(S4, LOW);
 }
     if (L2State ==HIGH && P1State==HIGH)
 {
   digitalWrite(S1, LOW); 
    digitalWrite(S3, LOW);
   
 }

  }

36  Using Arduino / Microcontrollers / Re: HOW TO BURN BOOTLOADER on: May 06, 2013, 03:30:29 am
Thanks westfw,

I am beginner for arduino...

please tell me two thing,

from where i can get compile/upload log (with "verbose" on)?

and what is optiboot???? can i have some steps for this ??????
37  Using Arduino / Microcontrollers / Re: HOW TO BURN BOOTLOADER on: May 06, 2013, 12:42:53 am
thanks for reply,

As u know Arduino is OPEN SOURCE, i have purchase board from local market n make , and the have printed their name on this board,

many examples are working on my board(with original mega328 which come with my board) without any problem,

i tried firmata, blink led , push button, etc....

Quote
are you sure that the on-board LED is connected to the same pin?

ya its perfectly working with my original mega328 n default blink led program without any change....

k today ll upload video with both mega8 and 32...

i hop this will help to understand....

38  Using Arduino / Project Guidance / Re: How to Create logic on: May 05, 2013, 10:07:29 pm
hi PeterH,

currently we are working on hydraulic system which we want to control by arduino.

here P1 is piston and L2 is limit switch , which is at the bottom limit of the piston strock.

when p1 coming at down side it will Activate L2(push L2)

Means

CASE 1
When P1 on (Piston going down side, Piston supply connected to P1)
        S1 and S3 on for 10 sec (Same time S1 and S3 pin should be high)
but if

L2 on
     Close S1 and S3
and Open S2 and S4 for 10 second
(means when piston push L2 limit switch after reaching/triggering L2, S1 and S3 should be Low and S2 and S4  High for 10 sec)
39  Using Arduino / Microcontrollers / Re: HOW TO BURN BOOTLOADER on: May 05, 2013, 09:40:04 am
Hi johnwasser,

Please check video n tell me anything following wrongly?????

everything showing ok than what is problem???

have u seen bootloader instruction which i have mentioned on my previous reply????

or anything is missing in instruction which i followed(http://www.instructables.com/id/Bootload-an-ATmega328/)

See this video for more clarity...
http://youtu.be/7Rx3g9XTo9A
40  Using Arduino / Project Guidance / Re: How to Create logic on: May 05, 2013, 08:42:09 am
SO finally m with my logic... let me know if any one can help me to achieve req output....

i have 4 input

Consider input as push button and OUTPUT as LED

INPUT= P1          OUTPUT= S1
INPUT= p2          OUTPUT= S2
INPUT= L1          OUTPUT= S3
INPUT= L2          OUTPUT= S4

now see my logic req.

CASE 1
When P1 on
        S1 and S3 on for 10 sec
but if

L2 on
     Close S1 and S3
and Open S2 and S4 for 10 swcond

IF
L1 on
Close S1,S2,S3,S4

CASE 2

when P2 on
S3 on for 10 sec

but

if L2 on

close S3
Open S4 for 1o sec

If L1 on
Close Close S1,S2,S3,S4

Consider OPEN as On and CLOSE as Off

please let me know if any one can solve this logic
41  Using Arduino / Microcontrollers / Re: HOW TO BURN BOOTLOADER on: May 01, 2013, 09:02:41 pm
Hi,

Thanks johnwasser for reply,

Right i have selected "Arduino NG or older w/ ATmega8" after loading bootloader in atmega8,

m got Bootloader burning successful message = ok
         Program loading/uploading successful message = ok
         Led showing correct status while loading program.(Blinking Tx, Rx Leds are correctly )

but why my led program is not working after loading program??????? i am testing blink led program on my board,  is there any special setting or any setup while we are using Atmega8 on arduino328 board...

(i am testing my mega8 chip on mega328 board)
42  Using Arduino / Microcontrollers / HOW TO BURN BOOTLOADER on: May 01, 2013, 05:34:38 am
Hi,

Can i have step by Step instruction to burn bootloader in atmega8.

i Have Arduino328, and i want to load bootloader in atmega8, after loading bootlader in atmega8 i want to run program on standalone board, m using

atmega8 to reduce my project cost, i have completed all steps as per below lin

http://www.instructables.com/id/Bootload-an-ATmega328/

and i got successful loading message, but i don't know why my atmega8 is not working, i removed my atmega328 chip from my board and i

connect my atmega8 chip on board, m able to load blink program on my arduino but after loading program my LED blinking not work.

let me know solution

chetan
43  Using Arduino / Sensors / Re: Increase delay time(Reading a Potentiometer) on: April 25, 2013, 07:15:17 am
Thanks billroy

its working now.....

thank you soooo much...

44  Using Arduino / Sensors / Re: Increase delay time(Reading a Potentiometer) on: April 25, 2013, 06:55:10 am
I am using this code.

Code:
/* Analog Read to LED
 * ------------------
 *
 * turns on and off a light emitting diode(LED) connected to digital 
 * pin 13. The amount of time the LED will be on and off depends on
 * the value obtained by analogRead(). In the easiest case we connect
 * a potentiometer to analog pin 2.
 *
 * Created 1 December 2005
 * copyleft 2005 DojoDave <http://www.0j0.org>
 * http://arduino.berlios.de
 *
 */

int potPin = 2;    // select the input pin for the potentiometer
int ledPin = 13;   // select the pin for the LED
int val = 0;       // variable to store the value coming from the sensor

void setup() {
  pinMode(ledPin, OUTPUT);  // declare the ledPin as an OUTPUT
}

void loop() {
  val = analogRead(potPin);    // read the value from the sensor
  digitalWrite(ledPin, HIGH);  // turn the ledPin on
  delay(val);                  // stop the program for some time
  digitalWrite(ledPin, LOW);   // turn the ledPin off
  delay(val);                  // stop the program for some time
}

or is there any way to make timer project by arduino.
and i want to controll timer by Potentiometer and want to control delay between 1 sec to 10 sec
45  Using Arduino / Sensors / Re: Suggest an ultrasonic sensor on: April 25, 2013, 04:29:27 am
u can find from this website...

http://ifuturetech.org/?product_cat=ultrasonic_transducer
Pages: 1 2 [3] 4