Connecting Puck.js to wired Serial #3416
Replies: 16 comments
-
Posted at 2020-07-30 by @MaBecker what about GND, is it connected too? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-30 by user115873 GND is connected to GND... I'm using this [https://www.amazon.com/gp/product/B07XF2SLQ1](this USB-TTL). TTL's pins are: DTR, RX, TX, VSS, CTS, GND Puck -> FT232R connections are: (edit: changed pin TS to CTS -- misread it) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-30 by @MaBecker Here you find the howto Serial is only checked during power up. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-30 by @gfwilliams What baud rate are you connecting with? You'll need 9600 baud (the default). The best way to test is when connected with Bluetooth you can run the commands:
So you can see if any data is being received and can try pushing data. As @MaBecker says you'll need to apply power to the puck while it is connected to the FT232R (which is plugged into USB). Enabling the Serial port uses quite a bit of battery power so Puck.js only does it when it's sure there is a connection. Or you can also try enabling it manually with:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-30 by user115873 Yeah, this made me wonder.. Firstly, I am doing this all without a battery in. So then I plug it all in to the USB-TTL (as described above), and then plug the USB-TTL in to the computer. When that didn't work, I tried pulling the connection for 3V and plugging it back in. That didn't work. I tried similar with GND, and that didn't work either. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-30 by user115873 I'm using the defaults when I pick the device in Serial2, I think it's something like 9600,8,N,1 ? I can check tonight to be sure, but I know I was using at least 9600 baud, 8 bits, and no parity. I'll have to try the first script set you gave me later tonight as well, but I did try Serial1.println("blah") and got nothing. Shouldn't
be
? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-30 by @MaBecker Well, try this
Hint: remove the battery :) so you can connect 3V3 to boot Hope this helps and you get the serial working. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-31 by @gfwilliams
http://www.espruino.com/Puck.js#pinout shows D29 is RX and D28 is TX - so I think But with UARTs you have to connect RX to TX and vice-versa, which may be the source of confusion. Also some USB-TTL dongles are named based on what you should connect the pins to vs what the pin actually is - so you can never be sure. For short periods of time it's not going to do any damage having them swapped over, so if it's not working it's worth trying both ways. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-31 by user115873 Well, I got a little closer messing with it last night... First off -- this has all been with the battery removed. I was like "Oh? I can test this without spending battery at all? Yes please." :D Now... what I got working was: I could receive data in the puck FROM the terminal. I could not, however, get output from the puck to show up on the terminal. At all. I assumed maybe I had a bad soldering job or something, but when I flipped the TX/RX pin connections and in the .setup() call... I could receive terminal input! So... both of the connections seem solid. Then I noticed on the FT232R, it's got TX and RX lights that fire up when data transmits over the respective channel. Nothing I did could get the lights to blink when sending output to the console. Serial1.print(), Serial1.println()... none of it seemed to trigger actual outgoing data. I believe I tested swaping the TX/RX pins as well. Tonight I'll grab a different FT232R and do some more testing. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-31 by user115873 That's a good point about the "context" of TX/RX -- it's all relative. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-31 by @MaBecker Hmm, connecting via serial terminal is not so easy, because you need special setting. Better use the WebIDE |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-31 by user115873 Well, if I weren't planning on trying to do some bluetooth stuff, that would be viable, however I have an aversion to "debugging via rumor", so getting bluetooth connectivity working without active terminal looks pretty dark... :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-31 by user115873 Swapping out for another FT232R did the trick! YAY! Thanks everyone. At least on the FT232R's I have, D28 goes to RX, and D29 goes to TX. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-08-01 by @MaBecker Great, have fun and don’t miss to share what you are working on. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-08-01 by user115873 Sure thing! @DanTheMan827 and I are actually working towards the same (or at least substantially similar) goals. The root of my project is this thing I'm calling the AmiiBuddy, which I have a short demo of here. I have all of the basics working with a rewritable magic NTag215 card, but the idea of being able to have the device communicate the nfc info over a longer distance seems too great to not at least explore. :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-08-03 by @gfwilliams
Interesting - I've had some dodgy 'clone' boards in the past, but nothing that plain didn't work. If it helps - in future if you ever stop trusting it, disconnect everything from it and connect RX and TX together. Then when you type in the terminal it should echo back to you - if it doesn't the FT232 is likely broken :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2020-07-29 by user115873
Hey there!
So I have a Puck.js v2, and I followed https://www.espruino.com/Puck.js#serial-console to hook it up to an FT232R -- Pin 28 to RX, Pin 29 to TX, set VCC to 3.3V, ran to 3v, and ground to ground.
The puck fires up, but refuses to talk via Serial1.
If I go in to the IDE via BT, Serial1.available() reports 0.
Serial1.setConsole(true) just makes it not respond via BT any more, and doesn't get the wired serial side working.
Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions