2

I am trying to achieve data transmission with the use of the screen(light).

Currently, I have a TextView in which covers 90% of the screen. When the transmission is started, I switch the color of the TextView with textview.setBackgroundColor(COLOR.WHITE) if it is a 1 and similarly if it is a 0 to be sent next.

My question is: Is this really the most effective way to go or is there any other methods I cannot come to think of?

kung
  • 121
  • 1
  • You also need to consider the fact when there are multiple zeros or multiple ones one after another. Is a black input really a `0` or just the end of transmission? – rollstuhlfahrer Jan 26 '18 at 13:38
  • This is solved with a self-clocking signal, for example, Manchester encoding or PWM. – kung Jan 26 '18 at 14:30

1 Answers1

1

If you want to do something like this, you might take into consideration to display some sort of pattern (like a QR-code) on your display that encodes several bits at once. Doing it with only 1 bit per cycle will be extremely slow.

Also, keep in mind that your display refresh rate is not the only limiting parameter. Your camera has a limited sampling rate as well, and you do not want to miss frames. This would result in information loss.

PKlumpp
  • 4,913
  • 8
  • 36
  • 64
  • Thanks for the input, however, the data rates does not have to be very high, the receiver is another type of device which utilizes a phototransistor for detection. – kung Jan 26 '18 at 14:32
  • Alright, this means that you are not able to make use of some kind of pattern. Unfortunately, I do not know anything about the frame rate of Android devices. What I can tell you though, it will vary, and this might be a problem for your application – PKlumpp Jan 26 '18 at 14:52