Using the Boron as a USB/Serial RS232 convertor


So I have a K30 sensor by Senseair that I would like to have communicate to my computer. Essentially it has a RX/TX which is primarily what I need. So I hook everything up to the Boron/flash code and can get it reading CO2 values and working properly. However, I think I need to change the firmware so the boron is sending over bits without trying to execute any other stuff. The code below does not work so I know I am missing something. Any ideas? Please help! Thank you (:

void setup()
// put your setup code here, to run once:
Serial.begin(9600); //Opens the main serial port to communicate with thecomputer
Serial1.begin(9600); //Opens the virtual serial port with a baud of9600

void loop()


There are some things to consider

  • you must ensure the RX/TX signals of the sensor into the Boron must not exceed 3.3V
  • you need to cross the communication lines between controller and sensor (TX → RX and RX ← TX)
  • you need to use Serial1.write() or Serial1.print() to send data to the sensor
  • you need to use and its relatives to read from the sensor.

You may want to look for a library that provides some high level access to the sensor, rather than writing all the setup and communication stuff yourself.

However, you may also consider using I2C over serial and use a library like this

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.