Avatar for indianajones

indianajones

Member since Jul 2019 • Last active Aug 2019
  • 5 conversations
  • 47 comments

Most recent activity

  • in Pico / Wifi / Original Espruino
    Avatar for indianajones

    @allObjects I agree with @Robin.

    Getting a reliable 'pipe' going may be a challenge...

    Most of the time, my code will be on the receiving end of MIDI data, and most of that will be a burst of NRPN messages after initial connection, and then mostly quiet. So far, so good on that front, but it's still early - plenty of time to screw things up ;-)

  • Avatar for indianajones

    Thanks for the awesome detail @allObjects. My data is MIDI data, so technically 7 bit, although the extended MIDI data is 8-bit. I switched between Uint8 and Uint8Clamped and my data doesn't look any different, so I think I'm safe. However, my 16-bit binary data on USART? Different animal altogether. Good ole' endianness.

  • in Pico / Wifi / Original Espruino
    Avatar for indianajones

    @maze1980 and @Robin, thanks again for your suggestions and links. I had been using Uint8Array, or should I say mis-using it. After reading the links and trying more iterations, I settled on using Uint8ClampedArray, oh and using it correctly also helps. It's working very well now, thanks!

  • in Pico / Wifi / Original Espruino
    Avatar for indianajones

    I have a connection to a device that's sending binary data over a TCP connection, and of course I get the data in chunks, which must be concatenated as new data comes in. Because the data I receive is binary, I have to convert the incoming data using E.toUint8Array, which works great. But when new data comes in, I have to add the new data to the existing Uint8Array, and I'm struggling to find the right way to do this. Anyone have experience with this?

  • in Pico / Wifi / Original Espruino
    Avatar for indianajones

    Final update on this issue. I have it all working now - I can control my Allen & Heath Qu series mixer via MIDI over TCP using the Espruino Wifi. My high-level understanding was accurate, but you guys helped me figure out how to use the dgram and net libraries properly to make it work. Thanks @Gordon for steering me in the right direction, and @Robin and especially @maze1980 for helping me see the errors in my code. Many thanks.

  • Avatar for indianajones

    holy. freaking. crap. I didn't know there was an argument to the connect callback - the sample code I found didn't have an arg. And yes, putting them inside the callback and using 'socket' made it work. I am now seeing the 0xEF packets being sent. Solved all of the confusion.

    As for the UDP code, it does work, but I don't claim to have written it correctly, I'll change it to match the link you provided.

    So thanks a million for the corrections!

  • Avatar for indianajones

    @Robin, I tried your suggestion...seems like a good idea. No difference in results though.

    I missed the post about time off, I guess I'll work on other things for a couple weeks, I have plenty of other things to do on this project.

    Thanks for your ideas.

  • Avatar for indianajones

    One more item...the blue LED on the Espruino wifi starts, and continues to, flash/flicker after I get the 'connected' message. So I might actually be getting the 0xEF message, but I'm never getting the tcpClient.on('data', ...) call.

    And how do I send a message with tcpClient? tcpClient.write() and tcpClient.send() throw 'undefined' errors.

    @Gordon, thoughts?

Actions