Actually it may not be really frozen per se, but really just that the putty buffer is being overwhelmed with data. I have that problem with Ser Mon as well when I try to send data continuously in a loop like you are doing when you dump the joystick data.
The only app that really seems to work without issue with keeping up with the data spew is TyCommander, Koromix/tytools: Collection of tools to manage Teensy boards (github.com), if you download the release file it has the .exe’s so you don’t have to compile. When you have a Teensy hooked up and you open TyCommander it will look like this:
If you want to watch the joystick data for a while would recommend you use that - otherwise Putty or the SerialMonitor works fine.
EDIT: Or just don’t do a ‘J’ to dump the PS4 data. You will get messages when you hit the buttons on the PS4 in the SerMon or Putty with worrying about the actual joystick data.
As long as you have the PS4 working you can try everything on the list. Oh if you have a problem with bluetooth you will probably have to uncomment this line in hex_cfg.h
//#define BLUETOOTH
I’m asking cause it was not working, probably because i was not doing the right things.
Should be working without PC connected i guess, only PS4 connected with the Teensy (usbhost).
Ok confused now on why its not working. Assuming you are connected with the PS4 the one thing I keep forgetting to do is to hit the PS button to turn power on the hex. One other thing if that is not it - hook the controller up wired to the hex and then try again.
Yea I know I am responding again but I hooked up BT again just to try and lay it out.
I did verify that you will have to uncomment USE_BLUETOOTH define in the Hex_cfg.h file.
After it prints all the servo info you should see that a default gait is selected along with the Address of the BT dongle which says it ready for pairing
USB Joystick Init: Arduino Phoenix Monitor
D - Toggle debug on or off
J - Show Joystick data
V - Voltage
M - Toggle Motors on or off
T - Test Servos
P - Servo Positions
A - Toggle LSS speed control
L - Toggle LSS Servo Debug output
F <FPS> - Set FPS for Interpolation mode
B <FPC> - Set Filter Position Count for Interpolation mode
S - Track Servos
O[m] - Enter Servo offset mode (m - manual mode)
C - clear Servo Offsets
*** Device Bluet a5c:21e8 - connected ***
manufacturer: Broadcom Corp
product: BCM20702A0
Serial: 5CF3707752FD
BDADDR: fd:52:77:70:f3:5c
After you connect you will see your connection information:
I’m using it Wired for now as i don’t have the dongle.
Using the TyCommander now and i get the same problem, when i was testing “J” and i moved each analog axis then clicked “X” and it frooze.
I then tried the PS button and could hear a “click” on the robot.
It rebooted (serial terminal did just like you power up) and i clicked again then it’s stuck at “Power On…”
On the first problem with hitting ‘J’ then ‘X’ on the controller. Yep that is what should happen. You turned the dump on with the ‘J’ and then turned it off by hitting the ‘X’ button. If you hit the J key or the X button again you will turn the dump on again.
I then tried the PS button and could hear a “click” on the robot.
It rebooted (serial terminal did just like you power up) and i clicked again then it’s stuck at “Power On…”
Assuming when you say stuck it means it not accepting any other controller button presses or keyboard commands?
Also not sure why it rebooted, never had that happen with this sketch, Could be a couple of things, maybe you have a short someplace or maybe battery is low. That one has me stumped? If you have the latest Teensyduino installed (1.54) you could try adding the crash report at the beginning of the sketch after the serial.begin in setup():
if ( Serial && CrashReport ) { // Make sure Serial is alive and there is a CrashReport stored.
Serial.print(CrashReport); // Once called any crash data is cleared
// In this case USB Serial is used - but any Stream capable output will work : SD Card or other UART Serial
}
it may show something. Have an idea - you are using a Teensy 4.1 - sorry have to ask.
When I have been doing that it works as shown in the previous post. I get the power on, then I can hit other keys - never had it reboot on me?
Been reading through this, and not sure what is going on…
As it is device Manager, can I assume Windows 10? Windows 7 and 8.x has more buggy USB Serial support…
One interesting thing with Teensy 4.x versus 3.x and most other Arduinos, is that the Serial will go at a much higher speed. If I have the right names, it goes at High speed (480mbs) versus Full Speed (12mbs) and earlier Teensy running at full speed could overwhelm some Serial communication programs and as you can imagine then going up to 480 can really put a strain on them… Paul had to do a lot of work to the get the Serial Monitor to work reasonably with it and that was by bypassing a lot of the code…
With the newer code, you should still be able to run with it even configured for BLUETOOTH. The code looks to see if the Bluetooth dongle object is connected or not. If not it assumes you must be wired.
Are you running with Battery or with Wall Wart? I have done most everything myself using WallWart.
LOL - I’m not even at the Bluetooth thing. Currently using the PS4 in a Wired way but i need to do some test before and keep being side-tracked on other things.
@kurte@xan@zenta@madmax@cyberpalin Another firmware update will be released in the comiong days, with some nice features. It will be under experimental since it has not been full tested. Will keep you posted.