nextion text box presented on arduino monitor.

Hi guys
based on the text displayed on the serial monitor obtained from nextion text box. How can i make my arduino aware that what is the first letter or any other letter in the string and make my arduino make a function which will send that letter/letters through visible light communication.

hamza009:
Hi guys
based on the text displayed on the serial monitor obtained from nextion text box. How can i make my arduino aware that what is the first letter or any other letter in the string and make my arduino make a function which will send that letter/letters through visible light communication.

Please elaborate on your sending letters through visible light communications! Are you thinking of using lasers to write letters on buildings or clouds?

Paul

i am using Nextion touch screen and i have made a keypad on it. I am successful in displaying the text typed on nextion on my serial monitor. Next thing is encoding the text so it can be transmitted it by led but i have no idea how i am gonna encode the whole 9 digits obtained from nextion and transmit it.

Morse Code? What is receiving the message? You may be able to modulate the light.

just like morse code but i need to encode the data coming from the nextion display and then drive the led acoording the zeros and ones in the bits

hamza009:
just like morse code but i need to encode the data coming from the nextion display and then drive the led acoording the zeros and ones in the bits

Sounds like a plan. How do you encode a zero on a LED? I guess a one is on, I a zero off? How will you know then they start ?

Paul

What is receiving the data? Is it for wireless comms or for human amusement?

the data is for transmission via visible light.

hamza009:
the data is for transmission via visible light.

And this is the way I am going to do it:

I still don't understand. Are you transmitting the data via visible light to something that will receive it for some use, or are you just interested in flashing the LED so you can watch it flash? Either way is fine, but the answer makes a huge difference to what you will end up doing.

yes receiver will receiver the data on receiving end e.g photodiode

Still have no idea how you intend to accomplish this, so let me give you a hint to make this SO much easier.

Attach a LED and resistor to a serial TX pin and set your program up to transmit serial data. Then all the critical stuff has been done for you. The RX end can then receive visible light instead of electrical signals from wires.

Paul

Exactly what I’d suggest. Except that the OP is reading from the serial port so he’ll have to use SoftwareSerial.