Avatar for RobertMcReed

RobertMcReed

Member since Jun 2019 • Last active Jul 2023
  • 2 conversations
  • 8 comments

Most recent activity

  • in General
    Avatar for RobertMcReed

    Wow, 4 years down the road and this saved me! Thanks for thinking of everything @gordon! Your devices are so fun to work with.

  • in Electronics
    Avatar for RobertMcReed

    It actually has more than 4 wires. The GND is split to each of the left/right/mic, so there are six wires total, as shown here:

    I have a plethora of resistor values at my disposal, so will try varying the value between mic/GND and see if that has any effect. Thanks for the idea!

    I'll post back any results I find.

  • in Electronics
    Avatar for RobertMcReed

    Before cutting the headphones wire I was able to plug them in and select them as the mic source.

    However, after snipping the wire when plugged in they no longer appeared as a mic choice. The computer did acknowledge that headphones were plugged in (the output pane changed to show headphones rather than built-in speaker), but it doesn’t see it as a mic.

    I’m wondering if maybe the MacBook is expecting something that we’re not giving it? Perhaps I need to cut the cable before the Y and connect all of the grounds?

    This is maybe a little silly, but I also have a female terminal block trrs audio adapter and an actual oscilloscope. I could try reading the signal on the oscilloscope which should tell us if the wiring / circuit is ok.

    If it is, then I would assume that there is something magical that the MacBook is looking for to recognize the line in. It’s clearly looking for more than just a trrs cable plugged in.

  • in Electronics
    Avatar for RobertMcReed

    Hello,

    I'm trying to do Experiment 17 from Making Things Smart, which is sending data from a Pico to your computer via the headphone jack and displaying it using the Web Audio app Gordon built here.

    I've tried a variety of different methods to get things connected, but regardless of the setup I cannot get my computer to recognize the input as a valid line-in.

    I am on a 2017 15" Macbook pro running Catalina.

    I have tried connecting with this terminal block audio plug from Adafruit, as well as cutting a pair of iPhone headphones (after the split) and identifying the mic / mic-ground wire. I have tried both of these connectors with and without this splitter from Amazon.

    None of these combinations have worked. When in System Preferences > Sound > Input I never have an option to choose an external input. Also, weirdly sometimes when connecting the circuit using the terminal block connector, closing the circuit would trigger Siri to open on my computer.

    I've uploaded a picture of my circuit, where the white lead goes to the mic line on the iphone headphones (or the sleeve terminal on the adafruit connector) and the black ground goes to the mic ground on the headphones (and the second ring on the adafruit connector). Both resistors are 10k ohms, white leads to B6 and black to GND.

    The code running on the pico is as follows:

    var t=0;
    setInterval(function() { Serial1.write(t); },5)
    

    Any ideas on how I could get this going?

    Thanks!

  • Avatar for RobertMcReed

    Hi Gordon,

    Thanks for checking in. I closed the post as I was able to make the connection work.

    What I found was that I was trying to connect to http://ec2-xx-yyy-zzz-v.compute-1.amazon­aws.com from the Espruino board, and that did not work (although that is the host I used for the node ws client without an issue).

    By removing the http:// I was able to connect the Espruino to the hosted socket. I really thought I had tried that the other day to no avail, but I suppose something must have been different.

    @MaBe sent me a message letting me know that there is a 32 char limit for the internal hostname, so I'm a bit confused as my hostname is 40 characters. Nevertheless, it seems to be connecting and sending data ok, but will intermittently disconnect.

    A stranger issue that I am having is when connecting locally. When testing, I host the ws server on my local machine and connect the Espruino to the same WiFi. After finding the ip of my computer that is running the server, I use that on the Espruino to connect. However, I only seem to be able to connect 1/10 times.

    Most of the time it simply fails to connect, and then randomly without changing anything it will work. Any ideas what that might be about?

  • Avatar for RobertMcReed

    Hi there.

    I've been working on a project that uses the ws module (as shown here) to connect to a node process running a WebSocket server.

    When running the server locally and connecting the Espruino to the same WiFi, the board is able to open a socket and communicate with the host given the ip address (ie 192.168.x.yy).

    However, when running the server on an EC2 on AWS the Espruino is unable to connect to the host (ie ec2-xx-yyy-zzz-v.compute-1.amazonaws.com­). The ws.on('close', () => { ... }); event is immediately fired after opening the socket. On the server side I see no indication of a connection attempt.

    The host is running on port 80 and I have opened that port. I can connect a node ws client to the host on the EC2, but the Espruino client refuses to connect.

    Any ideas on what might be preventing the connection? I found one Stack Overflow post that seems to be describing the same issue, but does not have a resolution and is quite old at this point.

    Any help you all could provide will be much appreciated.

    Thanks!

Actions