VScode serial monitor can't detect serial port after sketch download

This isn’t strictly about Daisy but it is stopping from being able to monitor serial output and throught you might have some experience using the serial monitor here.

I’ve been struggling to get serial monitor in VS code working. After downloading a sketch to Patch SM controller it seems it doesn’t turn the serial usb port back on.

I have tried this with Arduino IDE and after it uploads, it turns the usb port on and serial monitor in Arduino and VS code can see the port.

It seems like it’s something VS code doesn’t turn the port on after upload. I am using C++ in VS to code rather than Arduino to program and would like to be able to monitor the output. Has anyone manged to get this to work. I have spent several days trying to figure this out.

Downloading in Arduino IDE with serial monitor

Opening VS code after Arduino upload it can read the USB serial port:

VS code after download disconnects and can’t see the USB port

By default, Daisy C++ builds don’t include USB code.
To enable USB serial:
hardware.StartLog(true); /**< wait for serial connection */

This assumes you’ve created a Daisy object called hardware.
For instance:
DaisySeed hardware;

The StartLog(true) function will wait forever for a serial connection. To NOT wait, use
hardware.StartLog(false); Waiting for connection allows you to get your terminal started and connected, allowing you to print stuff during initialization, before your main() loop runs.

Fantastic. I spent several days thinking it was the serial monitor not working.

I discovered you have to add this statement to the Makefile to print floats
LDFLAGS += -u _printf_float

The potentiometer value readout from CV_1 though is different to the whole number value I get from Arduino IDE. It gives a value of -0.02 to 0.99. Do I just multiply by 100?