Serial Comms on a Photon

I am trying to test simple serial communications with the Photon and PUTTY, and am not having any luck. I am using a 3.3V to RS232 level shifter that is working correctly, and here is the code I am using. Does anyone see anything that I am missing with the code? Also, any suggestions on how to troubleshoot? Is there a way I can do a loopback test of some kind on the Photon?

Here is the code I am trying:
int counter = 0;

void setup() {
Serial.begin(9600);
}

void loop() {
Serial.printlnf(“testing %d”, ++counter);
delay(1000);
}

@fifty60, the RX/TX pins on the Photon are referenced as Serial1 while the PC USB serial port is Serial.

2 Likes

And as it happens via USB you won’t even need the RS232-TTL converter :wink:

1 Like

Awesome, I changed the code to Read Serial1 for the Photon and everything worked. Thanks for the help!

1 Like