Go Down

Topic: help for the program for water tank (Read 4 times) previous topic - next topic

mkbutan



any help?????? 


What code do you have so far?



thanks for the reply
sir right now i don't have any code
I just wanted to know how to write code for the ARDUINO 328
which have 4 pins input A,B,C,D as (0000 to 1111) on Arduino pin no 3,4,5 & 6
and the output to be displayed on the LCD as desired
"THE LIFE IS VERY SMALL TO LEARN ELECTRONICS"
                           ??????°?i??
                           AND
                           yes
                           PROGRAMMING

PaulS

Quote
sir right now i don't have any code

Here's a start:

Code: [Select]
void setup()
{
  // Put some stuff here
}

void loop()
{
   // and here
}


You have made NO attempt to do a damned thing for yourself. Why should we try to help you, when what you really mean is do your homework for you?

mkbutan

#12
Dec 19, 2012, 02:13 pm Last Edit: Dec 19, 2012, 02:17 pm by mkbutan Reason: 1
I can Switch ON and OFF the one LED on pin #12 of Arduino with an Switch on pin #3 with this code's
but don't know the idea how to solve my problem


/*
 pin 12, when pressing a pushbutton attached to pin 2.
 The circuit:
* LED attached from pin 12 to ground
* pushbutton attached to pin 3 from +5V
* pushbutton attached to pin 4 from +5V
* pushbutton attached to pin 5 from +5V
* pushbutton attached to pin 6 from +5V
*/
const int buttonPin = 3;     // the pushbutton pin A
//const int buttonPin = 4;     // the pushbutton pin B
//const int buttonPin = 5;     // the pushbutton pin C
//const int buttonPin = 6;     // the pushbutton pin D
const int ledPin =  12;      // the LED pin

int buttonState = 0;

void setup()
{
   pinMode(ledPin, OUTPUT);      
   pinMode(buttonPin, INPUT);    
}

void loop()
{
   buttonState = digitalRead(buttonPin);
   if (buttonState == HIGH)
{    
   digitalWrite(ledPin, HIGH);  
}
 else
{
   digitalWrite(ledPin, LOW);
 }
}
"THE LIFE IS VERY SMALL TO LEARN ELECTRONICS"
                           ??????°?i??
                           AND
                           yes
                           PROGRAMMING

PaulS

Quote
but don't know the idea how to solve my problem

Which is?

It's time to CLEARLY state what your problem is.

mkbutan

I just wanted to know how to write code for the ARDUINO 328
which have 4 pins input A,B,C,D as (0000 to 1111) on Arduino pin no 3,4,5 & 6
and the output to be displayed on the LCD as desired. the Arduino 328 will have
pin no. 3,4,5 & 6 from HT12D as an Binary I/P as (000-1111)
which to be displayed on the LCD of 2x16 as   
[ Empty  10% , 20% , 25% , 30% , 40% , 50% / HALF , 60% , 70% , 75% , 80% , 90% , 100% / FULL  ]
from the pin no. 7,8,9,10,11,12 &13 of the ARDUINO 328
"THE LIFE IS VERY SMALL TO LEARN ELECTRONICS"
                           ??????°?i??
                           AND
                           yes
                           PROGRAMMING

Go Up