Hi All,
I am new to arduino and considered myself lucky as somebody gave me an 2 arduino uno for free :), i know its old but I guess this would be enough for me to learn arduino. I want to ask help from you regarding how to read a code., I am asking for help on how i would make my arduino to read a pulse. In my setup, there are two arduino one is the pulse generator and the other is a pulse decoder.
The pulse generator will give out pulses to blink the infrared LED, The IR LED will illuminate one time for approximately 2 second ON then 2 seconds OFF, then ON again for 2 Seconds and off for 2 Seconds, then ON for 1 second, off for 1 second, then ON again for 1 second then off again for 4 second and this pulses happens within 12 seconds then it repeats.
This is the code for my Pulse Generator
// Pin 12 has an LED connected on most Arduino boards.
// give it a name:
int led = 12; // set this pin as output fed to IR LED Transmitter via 220 Ohms resistor
// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(2000); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(2000); // wait for a second
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(4000); // wait for a second
}
How do i make my other arduino to read the pulse and display the received pulse via serial?
sorry as i am about to start the decoding part but im lost and dont know wher the to start... I tried readingas the millis, pulse in etc... and i cant get it please help me.
Thanks and Regards
Jay