So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By rudy
#74190 When I need to interface 3v to 5 volt logic I use NLSX4373. It is available through normal distribution, like Digikey and Mouser. TXS0102 and PCA9306 can be found on modules for hobbyists on places like Aliexpress.

The level converter you tried would probably work if you removed the resistor between the RX pin of the ESP8266 and the USB to serial chip.

Image
User avatar
By moose4621
#74236
rudy wrote:When I need to interface 3v to 5 volt logic I use NLSX4373. It is available through normal distribution, like Digikey and Mouser. TXS0102 and PCA9306 can be found on modules for hobbyists on places like Aliexpress.

The level converter you tried would probably work if you removed the resistor between the RX pin of the ESP8266 and the USB to serial chip.

Image


Great info thanks Rudy, greatly appreciated.
I have used the TXS0106 in the past and it worked well then. Thanks again.
User avatar
By moose4621
#75905 I am a bit further down the track with this project. I have a working websockets connection and am able to control the stepper motor from the client.
The ESP server receives a command from the client and broadcasts a text string to all clients in return as confirmation.

My next problem is, after receiving data from a client I need to broadcast that data back to all clients.
It sounds simple enough but I seem to be unable to come to grips with the relationship between byte, payload, array, sizeof, length, blob, etc.

What I have on the ESP server to broadcast the data: (Data does not exceed 300).
Code: Select all uint8_t payload[] = {0,0};
        payload[0] = setpointVariable;
        payload[1] = targetGroundSpeed;
                       webSocket.broadcastBIN(payload, sizeof(payload));


And what I see in the Chrome developer tools console:
Code: Select allBlob(2) {size: 2, type: ""}
size:2
type:""
__proto__:Blob
size:(...)
slice:ƒ slice()
type:(...)
constructor:ƒ Blob()
Symbol(Symbol.toStringTag):"Blob"
get size:ƒ ()
get type:ƒ ()
__proto__:Object


Despite reading all sorts of references from google, I still don't seem to know what I am doing.
If anyone can point me in the direction of a good tutorial I would appreciate it.

If anyone wants to have a go at helping me with the code, I would really really appreciate it. :D
User avatar
By engi
#79457 [quote="moose4621"]
Code: Select all uint8_t payload[] = {0,0};
        payload[0] = setpointVariable;
        payload[1] = targetGroundSpeed;
                       webSocket.broadcastBIN(payload, sizeof(payload));


And what I see in the Chrome developer tools console:
Code: Select allBlob(2) {size: 2, type: ""}
size:2
type:""
__proto__:Blob
size:(...)
slice:ƒ slice()
type:(...)
constructor:ƒ Blob()
Symbol(Symbol.toStringTag):"Blob"
get size:ƒ ()
get type:ƒ ()
__proto__:Object


Hello,
I have the same problem.
Do you have any solution ?