jpiat / arduino

112 stars 70 forks source link

Unable to get receive anything; transmitter only flashes during reset, then goes into "off" state #12

Open discodanner opened 8 years ago

discodanner commented 8 years ago

Hello,

I've been attempting to get this particular project working off and on for a few weeks now.

I built both emitter and transmitter circuits using pro minis (5V 16mHz). Both have better undergone recreation attempts using crystal (clear) LEDs of the following varieties: UV-vis (Bright blue light; primarily emits in UV) IR (Nonvisible) Visible blue (complete visible spectrum emission)

I have several questions I believe will aid me in troubleshooting.

Transmitter:

1) My transmitter performs the standard "restart" flashes for an LED. Afterwords, it goes into a constant "off" state. (Confirmed with a multi-meter and oscilloscope; voltage never exceeds "background" 10mv, 200us timescale.) I have uncommented the following line:

`#define OUT_LED() DDRB |= (1 << 5);

define SET_LED() PORTB |= (1 << 5)

define CLR_LED() PORTB &= ~(1 << 5)`

Receiver:

2) My receiver, even when exposed to a constant emission source (i.e. the same LED in a constant "on" state) does not read an increase in voltage. I'm always iffy with the direction of LEDs, but especially so in this case. (This is a seemingly silly question, I know) but is the LED supposed to have the (+) end on the ADC pin even if it's receiving. It's been awhile since my semiconductors class, but I have this silly feeling that if it's receiving, the voltage that's being interrogated (by the ADC) should is applied in the reverse polarity of a normal LED. But in your schematic you say:

' |----1Mohm-----| A0 ------|--- +led- ----|-------GND '

So I just wanted to confirm the Anode is, indeed, the side connected to A0.

Lastly, I receive this warning when compiling the receiver:

'LiFiReceiver.ino:98:59: note: in expansion of macro 'START_STOP_MASK'

         if(((*manchester_word) & START_STOP_MASK) == (START_STOP_MASK)){ // testing first position '

and this error

'LiFiEmitter.ino:169:14: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

char * msg = "Hello World" ;'

when compiling the transmitter.

I just wanted to see if you had encounter them before, and if they were meaningful.

Thanks a lot for you time (and project) it's very promising.