Hi,
Is there a way to have a terminal window running on my Windows PC and have the spark core output information to it WITHOUT being connected via a USB cable? Something like Serial.print(""); but without a USB connection. Perhaps transmitting through wifi and having the terminal window listening to whatever the core is transmitting.
@osprey, you could use a TCPServer and TCPClient to create a telnet type of service on the Core/Photon. The TCPServer would open telnet port 23 and you can use Putty to connect to it. You could then use client.print() command to print message to the telnet client (Putty) over wifi.
This is actually a great “tool” to implement! It does take up a socket but I believe a least couple are available to the user so that should be fine even when another server/client is open. Let me think on it this weekend and try to get some code out.
In addition to @peekay123 excellent advice on a telnet-style solution, I would add that Spark.publish() works pretty well for this if you
watch out for the rate limit and only publish once per second on average
Make your debug info less wordy–single character + a number
You can buffer up short messages into a longer one to reduce the publish interval. Right now the length limits are changing and will soon be up to 255 chars per publish.
I also have a serial backpack on an LCD display that I like for debugging messages, particularly if you don’t need the TX/RX pins for your app.
Thanks @peekay123 ! If you plan to do a tutorial, keep in mind that I an absolute beginner and I am not sure I understood everything you said. I never used putty.
@bko, super great ideas! It may be a great idea to create a “simple debugging tools” topic and outline the different ways to debug without going into JTAG tomfoolery