8 years, 10 months ago.

HELLO,I have utra problem

my board is NUCLEO-F411RE .and i connet psm3003PM2.5 sensor,i use utra but my computer cant recive sensor my code:

  1. include "mbed.h" Serial mysensor(D1,D0); Serial pc(USBTX,USBRX); float a=0;

int main() {

mysensor.baud(9600); pc.printf("hello world"); while(1){ if(pc.readable()) { pc.printf("hello world"); } if(mysensor.readable()) { pc.putc(mysensor.getc()); } wait(1); } }

Be the first to answer this question.