jpiat / arduino

112 stars 70 forks source link

pin connection in transmitter #9

Open Aishwarya-NR opened 8 years ago

Aishwarya-NR commented 8 years ago

Hi jpiat, had a quick question The instructions in a demo say that the led must be connected to pin 2 but i think you've used pin 13 in the code which one of them is right?

jpiat commented 8 years ago

The code uses pin 2, but you can run on pin 13 by uncommenting the appropriate section saying : " These defines are for a LED connected on D13" and commenting the section :

define OUT_LED() DDRD |= ((1 << 2))

define SET_LED() PORTD |= ((1 << 2))

define CLR_LED() PORTD &= ~((1 << 2))

Aishwarya-NR commented 8 years ago

Thank you so much! I've connected the circuit using blue clear led and the transmitter glows as soon as the code is loaded. However, the receiver does not show the serial data. It just says "Start of receiver program" The led's are placed like 2 cm apart. I've programmed the arduino pro mino for 5V is that ok? or should it be programmed for 3.3V..

jpiat commented 8 years ago

The voltage of your arduino pro mini depends on the version you have, not my program. Can you try to put the two arduino further appart (15cm) and try to align the LED ?

2016-04-19 12:29 GMT+02:00 ASHNR notifications@github.com:

Thank you so much! I've connected the circuit using blue clear led and the transmitter glows as soon as the code is loaded. However, the receiver does not show the serial data. It just says "Start of receiver program" The led's are placed like 2 cm apart. I've programmed the arduino pro mino for 5V is that ok? or should it be programmed for 3.3V..

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/jpiat/arduino/issues/9#issuecomment-211847733

Aishwarya-NR commented 8 years ago

No, I'm actually talking about programming the pro-mini with an FTDI. Right now i'm receiving junk values at the receiver.

Aishwarya-NR commented 8 years ago

can I use a photo transistor instead of an led?

Aishwarya-NR commented 8 years ago

Sorry to be bothering you! but does the emitter work on negative logic? because it switches on even before any message is transmitted in the serial port (after uncommenting #define transmit serial)

jpiat commented 8 years ago

Even if there is nothing to transmit, the emitter will be on. This project mimic a ceiling light being use for broadcasting data, you would not want your lights to turn off if there is nothing to transmit. The light appears as always on for the user while it may or may not transmit data. Le 21 avr. 2016 4:52 PM, "ASHNR" notifications@github.com a écrit :

Sorry to be bothering you! but does the emitter work on negative logic? because it switches on even before any message is transmitted in the serial port (after uncommenting #define transmit serial)

— You are receiving this because you commented.

Reply to this email directly or view it on GitHub https://github.com/jpiat/arduino/issues/9#issuecomment-212957039

Aishwarya-NR commented 8 years ago

Thanks for that! should A0 or A3 be used at the receiver? u've mentioned both in the writeup....

jpiat commented 8 years ago

Its ADC3 :

define SENSOR_PIN 3

2016-04-21 16:57 GMT+02:00 ASHNR notifications@github.com:

Thanks for that! should A0 or A3 be used at the receiver? u've mentioned both in the writeup....

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/jpiat/arduino/issues/9#issuecomment-212958895

Aishwarya-NR commented 8 years ago

Hi jpiat, I've tried out all the possible kind of led's and distances mentioned but i don't receive the any output :( At times I get some junk values at the receiver but at a very slow rate. Dissapointed :( any suggestions? when I uncommented the #DEFINE DEBUG i get junk numbers and values at the receiver. Any help would be appreciated.

jpiat commented 8 years ago

I am on vacation right now and I don't have access to the code. Can you try to look for a define in the receiver code to use internal reference for the ADC and comment it. Le 23 avr. 2016 12:30 PM, "ASHNR" notifications@github.com a écrit :

Hi jpiat, I've tried out all the possible kind of led's and distances mentioned but i don't receive the any output :( At times I get some junk values at the receiver but at a very slow rate. Dissapointed :( any suggestions? when I uncommented the #DEFINE DEBUG i get junk numbers and values at the receiver. Any help would be appreciated.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/jpiat/arduino/issues/9#issuecomment-213714032

Aishwarya-NR commented 8 years ago

Oh...ok! Sorry to disturb! I've tried that too. Doesn't work...

imayyami commented 7 years ago

Could i see hardware sirkuit being worked for lifi because i am working on the same project but troubled in hardware circuit?