I dont know if this is right
Like this, but receive just 1 byte:
Do I need the label1 to be hidden or not?
Keep it visible until everything works
When would you want that clump of blocks on the right to run?
Free floating blocks don't run.
Hi, its for the warning system when the sensor picks up the distance.
So you should look through the blocks in that Clock Timer and find the exact spot where it would be appropriate to have those blocks run, then drag them into that spot.
This will require reading the Clock Timer blocks and thinking as you examine each block and how it fits into any other blocks.
What happens when you test it?
cant really test it right now because i dont have the esp onhand
I can tell you that every time you do a receiveText, you lose a byte from the buffer.
But what if the byte you just read before that was the last byte in the buffer?
Hi, the bytes here are the output of the code right? if so, it will be "1" and "O", or am I wrong?
Think of the AI2 Bluetooth client as a vending machine with only one product.
It's got a limited capacity.
Each time you buy a byte from it it pushes the byte in front and it falls out the hopper for you to catch. Then there is one less byte in the machine, until new stock arrives to fill the machine from Bluetooth.
The new stock is filled from the back, to keep data freshness consistent.
Did that help?
P.S. I forgot to mention a nasty feature of the machine. It grabs you and doesn't let you leave until it has satisfied your request.
This is called "blocking".
So don't ask for data unless you see it behind the glass.
I was thinking that when there is an output, which is the O and 1, after it gets read, It just releases it and get a new read, kind of like that.
It's like a three legged stool:
- Thinking
- reading the docs
- testing live
You need all three.
oki i get it now but I cant visualize it in blocks
I should have mentioned to look behind the glass of the Blue tooth vending machine you test the Bytes available non zero