chipKIT® Development Platform

Inspired by Arduino™

Software Serial example

Created Sat, 14 Sep 2013 21:15:30 +0000 by guymc


Sat, 14 Sep 2013 21:15:30 +0000

I picked up a cool 4 digit serial display from SparkFun recently:

It was remarkably easy to set up and use. Here's some code to drive the display from any chipKIT pin:

#include <SoftwareSerial.h>

// assign pins for RX, TX
#define SERIAL_IN 14
#define SERIAL_OUT 0

// define a soft serial port (RX, TX)
SoftwareSerial mySerial =  SoftwareSerial(SERIAL_IN, SERIAL_OUT);

// ...and so on

// Put this statement in setup()
  mySerial.begin(9600);  // set the data rate

// Print a 4 digit number
  char tempString[10];
  unsigned int frequency;
  sprintf(tempString, "%4d", frequency); 
  mySerial.print('v');  // clear the display

Jacob Christ

Sat, 26 Oct 2013 10:14:15 +0000

Which display?



Wed, 30 Oct 2013 22:14:51 +0000

I just edited the original post to include a link to the display (and to clarify the code slightly.)

Thanks, Jacob!