Hi All, I want to make my first arduino project. This is the description about the project:
-Using two IR sensor to detect the dripping water in two different pipe.
-count number of dripping water in 30 seconds and shows them in different label in Microsoft Visual Studio.
-Using Serial communication to send and receive data from arduino to Computer.
This is my code for only one IR sensor and its works:
int sensorread = A0;
int counter = 0;
int state;
int milisecond = 0;
int second = 0;
int laststate = HIGH;
void setup()
{
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(sensorread, INPUT);
}
void loop()
{
// put your main code here, to run repeatedly:
state = digitalRead(sensorread);
Can I used 115200 of baudrate for arduino uno?
When I doubled it to sense two sensors, unfortunately it doesn't work..kindly help me.. is there any code extra that I should add?
michaelindra:
Can I used 115200 of baudrate for arduino uno?
When I doubled it to sense two sensors, unfortunately it doesn't work..kindly help me.. is there any code extra that I should add?