Skip to content

SoftwareSerial Library

Lubomir Jagos edited this page Jun 27, 2016 · 4 revisions

I own GSM module and I wanted to interface it with arduino to be able send/receive messages. Because this module communicate through UART which isn't connected to pins 0 and 1 but different ones I needed implement SoftwareSerial library. I done this task by creating 3 global instances of SoftwareSerial class and implement commands three times for each instance. Maybe you are asking if there is some smarter solution, at that time I was looking for some and finish with this. softwareserial pallete

There are three pointers to SoftwareSerial class in global definitions. When user use create VI, new SoftwareSerial is created and pointer is store. Maybe it's not the most optimal solution (I bet so) but it's running for now :)

To demonstrate that this is running I put together small demo with mentioned GSM module. gsm demo

Demo is running simple program which create corresponding softwareserial to GSM module and using AT commands send SMS to chosen number. gsm demo code