NewSoftSerial

A New Software Serial Library for Arduino

News: NewSoftSerial is in the core!  Starting with Arduino 1.0 (December, 2011), NewSoftSerial has replaced the old SoftwareSerial library as the officially supported software serial library.  This means that if you have 1.0 or later, you should not download this library.  To port your code to 1.0, simply change all NewSoftSerial references to SoftwareSerial.

NewSoftSerial is the latest of three Arduino libraries providing “soft” serial port support. It’s the direct descendant of ladyada’s AFSoftSerial, which introduced interrupt-driven receives – a dramatic improvement over the polling required by the native SoftwareSerial.

Without interrupts, your program’s design is considerably restricted, as it must continually poll the serial port at very short, regular intervals. This makes it nearly impossible, for example, to use SoftwareSerial to receive GPS data and parse it into a usable form. Your program is too busy trying to keep up with NMEA characters as they arrive to actually spend time assembling them into something meaningful. This is where AFSoftSerial’s (and NewSoftSerial‘s) interrupt architecture is a godsend. Using interrupt-driven RX, your program fills its buffer behind the scenes while processing previously received data.

Improvements

NewSoftSerial offers a number of improvements over SoftwareSerial:

  1. It inherits from built-in class Print, eliminating some 4-600 bytes of duplicate code
  2. It implements circular buffering scheme to make RX processing more efficient
  3. It extends support to all Arduino pins 0-19 (0-21 on Arduino Mini), not just 0-13
  4. It supports multiple simultaneous soft serial devices.*
  5. It supports a much wider range of baud rates.**
  6. It provides a boolean overflow() method to detect buffer overflow.
  7. Higher baud rates have been tuned for better accuracy.
  8. It supports the ATMega328 and 168.
  9. It supports 8MHz processors.
  10. It uses direct port I/O for faster and more precise operation.
  11. (New with version 10).  It supports software signal inversion.
  12. (New) It supports 20MHz processors.
  13. (New) It runs on the Teensy and Teensy++.
  14. (New) It supports an end() method as a complement to begin().

*But see below for an important caveat on multiple instances.
**Be circumspect about using 300 and 1200 baud though. The interrupt handler at these rate becomes so lengthy that timer tick interrupts can be starved, causing millis() to stop working during receives.

Using Multiple Instances

There has been considerable support for an library that would allow multiple soft serial devices. However, handling asynchronously received data from two, three, or four or more serial devices turns out to be an extremely difficult, if not intractable problem. Imagine four serial devices connected to an Arduino, each transmitting at 38,400 baud. As bits arrive, Arduino’s poor little processor must sample and process each of 4 incoming bits within 26 microseconds or else lose them forever. Yikes!

It occurred to me, though, that multiple instances could still be possible if the library user were willing to make a small concession. NewSoftSerial is written on the principle that you can have as many devices connected as resource constraints allow, as long as you only use one of them at a time. If you can organize your program code around this constraint, then NewSoftSerial may work for you.

What does this mean, exactly? Well, you have to use your serial devices serially, like this:

#include <NewSoftSerial.h>

// Here's a GPS device connect to pins 3 and 4
NewSoftSerial gps(4,3);

// A serial thermometer connected to 5 and 6
NewSoftSerial therm(6,5);

// An LCD connected to 7 and 8
NewSoftSerial LCD(8,7); // serial LCD

void loop()
{
  ...
  // collect data from the GPS unit for a few seconds
  gps.listen();
  read_gps_data();  // use gps as active device
  // collect temperature data from thermometer
  therm.listen();
  read_thermometer_data(); // now use therm
  // LCD becomes the active device here
  LCD.listen();
  LCD.print("Data gathered...");
  ...
}

In this example, we assume that read_gps_data() uses the gps object and read_thermometer_data() uses the therm object. Any time you call the listen() method, it becomes the “active” object, and the previously active object is deactivated and its RX buffer discarded. An important point here is that object.available() always returns 0 unless object is already active. This means that you can’t write code like this:

void loop()
{
  device1.listen();
  if (device1.available() > 0)
  {
    int c = device1.read();
    ...
  }
  device2.listen();
  if (device2.available() > 0)
  {
    int c = device2.read();
    ...
  }
}

This code will never do anything but activate one device after the other.

Signal Inversion

“Normal” TTL serial signaling defines a start bit as a transition from “high” to “low” logic.  Logical 1 is “high”, 0 is “low”.  But some serial devices turn this logic upside down, using what we call “inverted signaling”.  As of version 10, NewSoftSerial supports these devices natively with a third parameter in the constructor.

NewSoftSerial myInvertedConn(7, 5, true); // this device uses inverted signaling
NewSoftSerial myGPS(3, 2); // this one doesn't

Library Version

You can retrieve the version of the NewSoftSerial library by calling the static member library_version().

int ver = NewSoftSerial::library_version();

Resource Consumption

Linking the NewSoftSerial library to your application adds approximately 2000 bytes to its size.

Download

The latest version of NewSoftSerial is available here: NewSoftSerial12.zip.  Note: don’t download this if you have Arduino 1.0 or later.  As of 1.0, NewSoftSerial is included in the Arduino core (named SoftwareSerial).

Change Log

  1. initial version
  2. ported to Arduino 0013, included example sketch in package
  3. several important improvements: (a) support for 300, 1200, 14400, and 28800 baud (see caveats), (b) added bool overflow() method to test whether an RX buffer overflow has occurred, and (c) tuned RX and TX for greater accuracy at high baud rates 38.4K, 57.6K, and 115.2K.
  4. minor bug fixes — add .o file and objdump.txt to zip file for diagnostics.
  5. etracer’s inline assembler fix to OSX avr-gcc 4.3.0 interrupt handler bug added.
  6. ladyada’s new example sketch, fix to interrupt name, support for 328p.
  7. etracer’s workaround is now conditionally compiled only when avr-gcc’s version is less than 4.3.2.
  8. 8 MHz support and flush() and enable_timer0()  methods added
  9. digitalread/write scrapped in favor of direct port I/O.  Revised routines now get perfect RX up to 57.6K on 16MHz processors and 31.25K on 8MHz processors.
  10. inverted TTL signalling supported.  20MHz processors supported.  Teensy and Teensy++ supported.  New end() method and destructor added to clean up.
  11. added listen() method to explicitly activate ports.
  12. warn users about 1.0 conflict

Acknowledgements

Many thanks to David Mellis, who wrote the original SoftwareSerial, and to the multi-talented ladyada, whose work with AFSoftSerial is seminal.  Ladyada also provided the “Goodnight, moon” example sketch, fixed a problem with the interrupt naming (see v6) and tested NSS with the 328p.

Thanks also to rogermm and several other forum users who have tested NewSoftSerial and given useful feedback.

The diligent analysis of forum user etracer yielded the root cause of a tricky problem with NSS on OSX.  A bug in avr-gcc 4.3.0 causes the compiler to fail to generate the proper entry and exit sequences for certain interrupt handlers.  etracer identified the problem and provided an inline workaround.  etracer’s fix is in NSS 5.

User jin contributed a large body of work based on NSS and identified a potential problem that could result in data loss (fixed in NSS 5).  jin also made a variant of NSS that supports 4-pin serial, with the additional pins providing a very nice RTS/CTS flow control.  We may see this in NSS in the near future.

Thanks to Garret Mace, who contributed the delay tables for 20MHz processors and claims that he can send and receive at 115K baud.  Cool!

Thanks to Paul Stoffregen, both for his fine work with Teensy and Teensy++, and for contributing some useful suggestions that help NewSoftSerial run on them without modification.

I appreciate any and all input.

Mikal Hart

Page last updated on July 3, 2013 at 7:37 pm
646 Responses → “NewSoftSerial”

  1. silky

    11 years ago

    hello
    Iam facing serial overflow problem with my programme kindly help me getting out of this.


  2. Mikal

    11 years ago

    @Deborah O’Connor,

    You shouldn’t bother with the NewSoftSerial library at all if you are using Arduino >= 1.00. That library is now part of the Arduino core, renamed to SoftwareSerial.


  3. Mikal

    11 years ago

    @silky,

    The only thing I can tell you about overflow is that you are not reading your serial port often/fast enough. In between reads, make sure you don’t do any delay() calls, writes to Serial port, or especially not calls to slow libraries like SD card readers/writers.


  4. doug lyon

    11 years ago

    How do I get the bluetooth examples working?
    BluetoothShield Demo Code Slave.pde writes:
    #include //Software Serial Port

    and uses it…but now it is not supposed to use it, right?

    So, what do we do to get example code to work?


  5. Mikal

    11 years ago

    Older sketches that use newsoftserial can be easily ported simply by changing all references to “NewSoftSerial” to “SoftwareSerial”.


  6. yenni alejandra

    11 years ago

    ola tengo una pregunta es que en mi caso conectaria dos dispositivos el zigbee y un sensor de color se puede usar la libreria nombrarla 2 veces para diferentes pines


  7. william

    10 years ago

    I do not quite get the multiple port and listen() function. If I understand you have to listen for some time before the port is available. So with two ports, and only one able to listen at any given time, how would you stop data being missed on the second port? Would something like
    port1.listen();
    while(port1.IsAvailable() == false); //spin
    int val = port1.Read();

    make sense to try to optimize the time spent waiting for the port?


  8. Mikal

    10 years ago

    Hi william,

    There is indeed no reliable way to ensure that you don’t miss data on the “other” port. The multiple soft port paradigm is most useful when one of the devices is continually transmitting an updated status stream that is not critical to miss. Or a sensor that you can synchronously query for data. But it’s not very useful when both devices might unpredictably deliver asynchronous mission-critical data.

    Example: Port 1 is a Bluetooth modem that may at any time deliver a command from a remote controller. Port 2 is a GPS unit or a digital humidity sensor.

    You’d configure your program to always listen() to the Bluetooth modem, but when it received the command to report back GPS (or humidity) information, you’d shift to the second port and listen() just long enough to gather whatever data is pertinent.

    Does that make sense?


  9. Paulo Coutinho

    10 years ago

    Hi man,

    I dont understand one thing. I need connect 10 serial RFID to my arduino, and each RFID sensor can receive information at same time, because each sensor will be in one door here. I can use your library to manage this 10 serial sensor at same time? The link of RFID reader is this: http://www.ebay.com/itm/Arduino-UART-125Khz-EM4100-RFID-Card-Key-ID-Reader-Module-RDM6300-RDM630-/110987494834 — Thanks


  10. Mikal

    10 years ago

    @Paulo, I’m having a hard time understanding the utility of connecting 10 RFID modules to the same Arduino. Why not just connect one module and have it understand 10 different cards? In any case, no, I’m sorry to say that I can’t see how such a design would work with NewSoftSerial (now SoftwareSerial). SoftwareSerial can only listen to one RFID reader at a time.


  11. Michael Doerr

    10 years ago

    Hi Mikal,

    Very good library: the inverse logic code saved me a hardware inverter
    im my LED sign project. But I think I’ve found a small bug in function
    SoftwareSerial::setTX when inverse logic is being used. The very first
    start bit does not work right without the following patch applied:

    msd$ diff SoftwareSerial.cpp_orig SoftwareSerial.cpp
    358c358
    digitalWrite(tx, _inverse_logic ? LOW : HIGH); // pullup for normal logic!

    Thanks a lot.


  12. Mike

    10 years ago

    Is there any chance an Arduino Due compatible version could be promulgated?


  13. doug

    10 years ago

    Hello, does this have any ability to do hardware handshaking?

    I have an old HP pen plotter and the usb serial cable isn’t handshaking so it ends up overflowing the buffer of the plotter and it makes a mess. I was thinking about using the adruino as a print spooler. It could receive data on the usb and send it on the software serial port. I guess i could connect the rts and cts to unused digital pins and not send unless they are free, but was hoping it would be built in?

    If somebody has done this before, i would gladly learn from them rather than reinventing the wheel.

    doug


  14. Nossu

    10 years ago

    Hi,I wold like to use under settings at NewSoftSerial.
    115200bps,8bit,start1bit,stop1bit,no flow,parity EVEN


  15. shrawan

    10 years ago

    Sir, as i am new to arduino microcontroller. I use the latest version of Newsoftserial library but facing following error.Please help me out..

    C:\Program Files\Arduino\libraries\NewSoftSerial/NewSoftSerial.h:33:2: error: #error NewSoftSerial has been moved into the Arduino core as of version 1.0. Use SoftwareSerial instead.
    In file included from easyvr.ino:1:
    C:\Program Files\Arduino\libraries\NewSoftSerial/NewSoftSerial.h:99: error: conflicting return type specified for ‘virtual void NewSoftSerial::write(uint8_t)’
    C:\Program Files\Arduino\hardware\arduino\cores\arduino/Print.h:48: error: overriding ‘virtual size_t Print::write(uint8_t)’


  16. Mika

    10 years ago

    Hello,

    I’m afraid I have some timing issues when running with8MHz(atmega328 on breadboard) and 115200 datarate when sending data to bluetooth mate.

    I think that timing needs just some slight adjustment since about 20% of chars looks to be correct (and rest are garbage).

    Might be also useful to try to calibrate internal oscillator but I do not have experience on that…


  17. Mikal

    10 years ago

    @Nossu,

    Sorry, for AVR processors anyway 115.2K is just too fast to reliably operate.


  18. Mikal

    10 years ago

    Hi shrawan, and welcome. As the error message indicates, you’re not supposed to use NewSoftSerial anymore. It’s been moved into the Arduino software. Since Arduino version 1.0 it’s now called “SoftwareSerial”.


  19. Mikal

    10 years ago

    @Mika, I’m afraid 115.2K is too fast even for 16MHz processors. I don’t believe that that “slight adjustment” exists. Sorry.


  20. Petr Stehlík

    10 years ago

    Hi Mikal,

    I have a suspect that SoftwareSerial(3, 2) (i.e. using pins 2 and 3) somehow affects pins 10-13 (on Arduino Pro Mini). I had attached MAA7361 on pins 10-13 and when SoftwareSerial was sending data (on pin 2) it was totally messing up the MAA7361.

    Do you know about something like that? Is it documented somewhere? Thanks for letting me know.


  21. shilpam sharma

    10 years ago

    Dear Mikal,
    If it is possible to use pin (Analog input) A4 and A5 on Arduino UNO R3 to act as Rx and Tx


  22. Mikal

    10 years ago

    @Petr Stehlík,

    I haven’t used the MAA7361 before, but I suspect its communication channel requires interrupts to be enabled. Since SoftwareSerial disables interrupts, this sometimes affects communication.


  23. Mikal

    10 years ago

    @shilpam sharma,

    Yep! They don’t publicize it well, but on the Uno the pins labeled A0-A5 can also be used as digital pins 14-19. Use 18 and 19 in your sketch and then wire the serial device to A4 and A5.


  24. Mike

    10 years ago

    Mikal, I have most digital pins doing other functions and when I add softserial the other inputs and outputs get a disterbance when data comes in. beats up my motors and servos. any way to stop this or do I need to move up to a Mege board and use hardware serial for my gps unit?


  25. Mikal

    10 years ago

    Mike, yeah, I’m afraid both [New]SoftSerial and the current Servo motor library use interrupts in ways that are not mutually compatible. However, if your design has two or fewer servos and you can tolerate them being fixed to certain pins, the OLD servo library (posted on this site as PWMServo) might solve your problem…


  26. Dave

    10 years ago

    One problem I have been having is an interrupt conflict when trying to use Servos as well as SoftSerial

    Basically I am trying to use an Uno to read a GPS using SoftSerial but also control model Servos.


  27. Mikal

    10 years ago

    @Dave,

    Yeah, that’s a well-known and understood problem. One possible solution is to use the PWMServo variation on the Servo library (on this site). Another is to turn off the Servo when the soft serial device is needed and vice versa.


  28. Victor

    10 years ago

    Hi, How can I communicate with two shields, a GPS using softserial 4,5 and a GSM shield using softserial 2,3. The baud rate for the GPS is 38400 and for the GSM is 9600. Both shields work fine separately.


  29. mehul

    10 years ago

    i have made a program for sending a sms through a gsm module and i am using a SoftwareSerial , but how to include the SoftwareSerial library bcoz in my program when i write #include the SoftwareSerial is not turning orange


  30. Mikal

    10 years ago

    @mehul,

    I think in some versions of Arduino there is an error in the SoftwareSerial keywords.txt file which prevents the keyword from turning orange.


  31. Felix Group

    10 years ago

    I tried the library with a UART crystal at 11.0592MHz. In theory there should be no communication errors. I modified the delay table. My results:

    Serial.print:
    - perfect until 115200baud.

    Serial.read from Arduino terminal input:
    - perfect until 38400baud.
    - At 115200baud I can only read the first 4 characters correctly.

    Serial.read from other Serial port of Arduino:
    - perfect until 57600baud but with an other delay table (not compatible to Serial terminal read)

    Is this baud rate limitation based on the crystal speed, or is my delay matrix not good enough?

    The matrix:
    // baud rxcenter rxintra rxstop tx
    { 115200, 2, 9, 9, 7, }, //puhh
    { 57600, 15, 21, 21, 19, }, //okay
    { 38400, 28, 33, 33, 32, }, //perfect


  32. Mikal

    10 years ago

    @Felix,

    Yeah, unfortunately, it’s not just the precision of the crystal or the accuracy of the delay table that comes into play. It’s the unpredictable timer-tick interrupt–the one that drives millis()–that causes the problem. If that fires just before one of your bits arrives, it can sufficiently delay its apparent arrival so as to corrupt the incoming bit stream.


  33. Bruce Vernham

    10 years ago

    I am trying to use the 1284P with the Soft Serial library. I am using a “Bobdunio” which is using the mighty1284 core. When I compile the sketch wit the UNO I do not have any issue but when I try to compile it with the 1284 board I get:

    C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp: In member function ‘void SoftwareSerial::begin(long int)’:
    C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:401: error: operands to ?: have different types ‘int’ and ‘uint8_t*’
    C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:402: error: expected primary-expression before ‘]’ token
    C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:402: error: operands to ?: have different types ‘int’ and ‘uint8_t*’
    C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp: In member function ‘void SoftwareSerial::end()’:
    C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:417: error: expected primary-expression before ‘]’ token
    C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:418: error: expected primary-expression before ‘]’ token
    C:\Program Files (x86)\Arduino\libraries\SoftwareSerial\SoftwareSerial.cpp:418: error: operands to ?: have different types ‘int’ and ‘uint8_t*’

    Any ideas how to fix it.


  34. Sohel Malek

    10 years ago

    Hello everyone…
    I am using Arduino for my project. N i m going to transmit camera images through zigbee module. My problem is that i have already connected 0 and 1 pin (TX, Rx) pins of Arduino with zigbee module and my camera is also UART enabled…so i think i have to use Softwareserial library. So suggest me some idea if any and give me code so that i can get idea. Thank You.


  35. Mikal

    10 years ago

    @Bruce, if the processor is not supported by the official Arduino distribution, this is where you’d first find out. Look in the Arduino forum for guidance. For example: http://forum.arduino.cc/index.php?topic=157297.0.


  36. Mikal

    10 years ago

    There are tons of examples of SoftwareSerial use out there. Try first the example sketches that ship with Arduino (File/Examples/SoftwareSerial).


  37. tack

    10 years ago

    Mikel, I wonder if you could be so kind as to take a look at the following thread

    http://forum.arduino.cc/index.php?topic=157297.0

    A few people are having problems using Software Serial on AtMega1284P, which is becoming more popular.

    I’m sure everyone would be very greatful for any insight you could provide towards resolving.

    Many thanks

    Mick


  38. Pit

    10 years ago

    Hello, I simply want do his:

    while (SoftSerial.available())
    {
    SoftSerial.write(SoftSerial.read());
    }

    But it don’t work like required… OK, it’s a software serial…

    But what I miss is the sei(); in the .write fkt.

    - Pit


  39. Mikal

    10 years ago

    @tack,

    I don’t have experience with that processor, but I feel fairly sure that it could be made to work by making suitable additions to pins_arduino.h and making sure that the pins used support change interrupts. I have a port of SoftwareSerial to the Atmega644p, and the 1284p doesn’t seem that different.


  40. Mikal

    10 years ago

    @Pit,

    I’m afraid that’s not possible with a Software Serial, unless you can guarantee that no characters will arrive during the time you are transmitting a response.


  41. Mike

    10 years ago

    Hi,

    Please could you suggest the best way to add a timeout function to SoftwareSerial ports, in order to avoid lock-up in the event of a missing serial input?

    Thanks, Mike.


  42. Mikal

    10 years ago

    @Mike,

    I don’t think there is any way to “lock up” the library. You shouldn’t ever need to call ss.read() if ss.available() returns 0, but if you do, it instantly returns -1. It doesn’t wait for a character to appear in the stream or anything. I’m afraid that if you’re experiencing a lockup you might need to look elsewhere. Hope that helps.


  43. Mostafa

    10 years ago

    hello , i need your help when i compile the example have error
    (
    In file included from NewSoftSerialExample.pde:1:
    C:\Program Files (x86)\Arduino\libraries\GSM_Shield/NewSoftSerial.h:71: error: conflicting return type specified for ‘virtual void NewSoftSerial::write(uint8_t)’
    C:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino/Print.h:48: error: overriding ‘virtual size_t Print::write(uint8_t)’
    )


  44. Mikal

    10 years ago

    @Mostafa,

    You should not use NewSoftSerial in modern Arduino installations, as it has been replaced in the core with SoftwareSerial.


  45. Ron Hackett

    10 years ago

    Hi Mikal,
    Thanks for the great library, especially the inversion feature!

    I’m using the library with an ATtiny84, and I have two questions:
    1. I’m only using Tx, and I would like to not have to dedicate a second pin to Rx. Is there any way to do that?
    2. Also, in order to save space in the ATtiny, is there any way to just install the TX function without the Rx function?

    Thanks… Ron


  46. Mikal

    10 years ago

    @Ron Hackett,

    If you’re only using TX, you can get the RX pin to -1:

    NewSoftSerial port(-1, 12); // for example
    

    To minimize the footprint, you could redefine the size of the RX buffer _NSS_MAX_RX_BUFF to, say, 1. That would save you 63 bytes.


  47. Mike

    10 years ago

    Hello,

    Do you have any plans to add a timeout function to the SoftSerial library? If not, please could you suggest how best to implement this in a sketch?

    Thanks, Mike.


  48. Artur

    10 years ago

    Mikal,
    Have one problem – how to use SoftSerial at 14.7456MHz? Library allow only 8/16/20MHz. I have this quartz for 0% transmissin error (Atmega32 datasheet, page 165).
    So:
    1) how to get DELAY_TABLE PROGMEM table for 14.7456MHz?
    2) does 14.7456MHz is out of mind and should simple use 16MHz?

    Best regards!
    A.


  49. SebastianUF

    10 years ago

    Hello, I am trying to connect a TTL camera to a UdooQuad board. I initially got the code using the NewSoftSerial library but then i switched to the SoftwareSerial lib. I am getting multiple errors one saying “this SoftwareSerial supports only 20 16 and 8Mhz processors.” and a few others that state “error: SREG was not declared.” and “error:cli was not declared”.
    I changed all the newSoftSerial parameters to SoftwareSerial but about 30 of these errors repeat themselves. Any idea on what these errrors mean?


  50. Mikal

    10 years ago

    Artur, it’s possible to modify NewSoftSerial to support non-standard baud rates, but you have to create your own DELAY_TABLE. To start off, take the 16MHz table and multiply each value by 14.7456/16. These values will not be exactly correct, but close enough for low baud rate devices.

93 Trackbacks For This Post
  1. NewSoftSerial 5 « Arduino

    [...] NewSoftSerial version 5 is available. A lot of people have been using this library — thanks! — but I really need to recognize the exceptional work of two contributors. [...]

  2. NewSoftSerial 6 « Arduiniana

    [...] I posted the new library. [...]

  3. เริ่มต้นสร้าง GPS จอสีกับอาดูอี้โน่ | Ayarafun Factory

    [...] ในรอบนี้ผมได้ใช้ newSoftwareSerial3 จะได้ลองด้วยว่า มีปัญหาไหม

  4. Unlogic » USB Storage and Arduino

    [...] of the first things to do is download NewSoftSerial

  5. The Hired Gun » GPS project: the Bluetooth saga

    [...] to the task at hand, which happened to be adding 3 lines of code: declaration of an instance of NewSoftSerial, calling the instance constructor with a baud rate, and a single call to pass the char from the [...]

  6. layer8 » Controlling A Roomba with an Arduino

    [...] and the XBee module has a serial interface.  So how does this really solve my problem?  Enter NewSoftSerial, an updated version of the Arduino software serial library, which basically lets you drive a serial [...]

  7. This and That » Blog Archive » Arduiniana - What else would it be?

    [...] is probably the coolest gift idea I’ve seen.  Mikal, you rock.  And also, thank you for NewSoftSerial.  [...]

  8. Interfacing the Arduino with the DS1616

    [...] way.  Let’s move onto the software.  Communication with the DS1616 is established using the NewSoftSerial library.  Getting data is essentially a case of lots of bit banging.  The DS1616 library [...]

  9. Serial Multiplexing « Interactive Environments Minor 2009-2010

    [...] So we started looking for a solution to overcome this tiny inconvenience. First we looked into a software serial but this didn’t work out, it was a bit too much for the arduino’s little processor to [...]

  10. Atmega/Arduino (Soft-) Serial Ports | Jochen Toppe's Blog

    [...] software serial port. I briefly thought about writing one, but then I found this great libary, the New SoftSerial. It is as simple to use as the original library, but unfortunately once I connect the RF receiver, [...]

  11. The Frustromantic Box, Part 4: Software « New Bright Idea

    [...] developers for the great libraries, and to Mikal Hart in particular for his work on the TinyGPS and NewSoftSerial [...]

  12. side2 » Bimeji Client for Arduino

    [...] このソースでは、PS2ライブラリとNewSoftSerialライブラリを利用しています。 コンパイルするには、これらのライブラリを有効にしておく必要があります。 [...]

  13. Live Twitter Table using New Bluetooth Shield | Club45

    [...] as a well. The shield can be wired to any of the pins on the Arduino. Right now we’re using NewSoftSerial on pins 4 and 5. It can be attached to the hardware RX and TX pins, but interferes with [...]

  14. tokyo->kobe->osaka << Motoi Ishibashi

    [...] 急遽、Arduinoでシリアル通信をふたつやる必要が発生してホテルで開発。といっても手元にハードがないので、ほとんど勘でプログラムしているようなもの。 次の日現場で試すも、予想通り動かない。そりゃそうだ。 NewSoftwareSerialなんていう便利なものがあるのを後で知った。 [...]

  15. VDIP1 USB Host Controller « Arduino Fun

    [...] chose the NewSoftSerial library to give access to the VDIP1.  The first attempt was to use the AFSoftLibrary and it just [...]

  16. Project Lab

    [...] software running on the Arduino ATMEGA328 chip utilizes the wonderfully robust NewSoftSerial library for communicating with the EM-406a GPS module and the very convenient TinyGPS library for [...]

  17. Box Round 2 « Stromberg Labs

    [...] is available here. I borrowed from a couple of people’s Arduino libraries to get this done, notably NewSoftSerial from Arduiniana and the GPS Parsing code from the Arduino website for parsing the NMEA strings. [...]

  18. Grok Think » Blog Archive » I got Arduino sending temp to the computer using xbee wireless.

    [...] I had to use this library to communicate with the xbee from the arduino:  http://arduiniana.org/libraries/newsoftserial/ [...]

  19. GPS – Welcher Chip? | Ranzow im Umbau

    [...] wird über die Serielle Schnittstelle angesteuert. Die werde ich wahrscheinlich über die NewSoftSerial Library [...]

  20. GPS – Welcher Chip? | Ranzow im Umbau

    [...] GPS Modul wird über die Serielle Schnittstelle angesteuert. Die werde ich wahrscheinlich über die NewSoftSerial Library [...]

  21. Cititor RFID 125KHz « Tehnorama

    [...] metoda de a afla codul cartelei este de a utiliza biblioteca NewSoftSerial, disponibila gratuit aici. Fisierul zip se dezarhiveaza si se copiaza in folderul libraries al distributiei [...]

  22. Lightweight software UART -> custom serial « Robotics / Electronics / Physical Computing

    [...] updated the NewSoftSerial library from Arduiniana (thanks Mikal !) so that it takes 2 extra [...]

  23. Control Camera with Arduino | SenSorApp

    [...] http://arduiniana.org/libraries/newsoftserial/ [...]

  24. GPS testing with LCD Character Display

    [...] the TinyGPS library from Arduiniana downloaded and installed for it to work. They suggest using NewSoftSerial, but I couldn’t get that to work, so I scrapped that portion. Here’s my [...]

  25. #Rallylog Fusebits

    [...] it as a fail and moved on, however last night when I set about writing the RFID read function using NewSoftSerial on the RFID I was getting nothing reported back back on the AVR, not a thing coming back from the [...]

  26. 433 MHz receiver and NewSoftSerial at mitat.tuu.fi

    [...] http://arduiniana.org/libraries/newsoftserial/ http://www.sparkfun.com/commerce/product_info.php?products_id=8950 [...]

  27. Moving Forward with Arduino – Chapter 17 – GPS « t r o n i x s t u f f

    [...] devices. At this point you will need to install two libraries into the Arduino software – NewSoftSerial and TinyGPS. Extract the folders into the libraries folder within your arduino-001x [...]

  28. Moving Forward with Arduino – Chapter 17 – GPS « Hey it’s my blog…

    [...] this point you will need to install two libraries into the Arduino software – NewSoftSerial and TinyGPS. Extract the folders into the librariesfolder within [...]

  29. Sonar | Starter Kit

    [...] there is one more library – “NewSoftSerial”, which is free of these defects and, in addidion, handles inverted serial [...]

  30. Advanced RFID with Arduino and Python! | App Delegate Inc

    [...] NewSoftSerial [...]

  31. RFID Door Opener – Update 3 – LCD Woes - Sommineer

    [...] one on some other pins.  Per the suggestion of some people on the Arduino forums, I decided to use NewSoftSerial to do the communication.  Being interrupt driven, it was much more efficient than the older [...]

  32. keyHelper final project

    [...] the code you will need a very useful NewSoftSerial library, that, among other things, allows you to assign TX and RX on other pins then 0 and 1 and that way [...]

  33. Step-by-Step Guide on using the Bluetooth Bee, Bees Shield & Arduino to communicate via bluetooth | Michael Chuah

    [...] up would be to try and use the awesome NewSoftSerial library by Mikal Hart to communicate with the Bluetooth Bee by emulating the UART [...]

  34. Tutorial: Arduino and GSM Cellular – Part One « t r o n i x s t u f f

    [...] a software perspective we will need the NewSoftSerial Arduino library, so please download and install that before moving [...]

  35. Interfacing Arduino to GSM shield | Embedded projects from around the web

    [...] goes step by step how to connect Cellular shield to Arduino mega and communicate to it by using newsoftserial Arduino library. Whole process steps are monitored in terminal window, so it is easy to follow [...]

  36. Fully functional Arduino GPS logger « Liudr's Blog

    [...] NewSoftSerial library [...]

  37. LCD117 Controller Library - Jack Kern

    [...] also need the NewSoftSerial library installed in your Arduino sketchbook’s library [...]

  38. Touch game for the offspring | NinjaTool inc.

    [...] GLCD that I bought (without knowing ANYTHING about it beforehand I might add). The code uses the NewSoftSerial library which apparently does wonders, but as of yet has not been validated as the code assumes a 9V [...]

  39. Arduino GSM and GPRS shield | Open Electronics

    [...] the pin 4 and 5 there aren’t problems to upload the sketch but the maximum baudrate for NewSoftSerial (the serial library) is 57600. We performed a GSM library to controll easly the module. The GSM [...]

  40. Moving Forward with Arduino – Chapter 19 – GPS part II « t r o n i x s t u f f

    [...] forget the 10k ohm pull-down resistor). You will need to install the SdFAT library, NewSoftSerial library, TinyGPS library and the SdFat library if not already [...]

  41. Blog What I Made » YAHMS: Base Station

    [...] of just the standard Serial interface, see the links below for that too. You’ll also need NewSoftSerial of course and the Flash library which I’ve used to decrease memory usage. Follow the [...]

  42. Infovore » Nikon D-Series Intervalometer

    [...] a single wire, which again, keeps the number of wires from the Arduino down. I’m using the NewSoftSerial library to talk to it, which makes life [...]

  43. Arduino Experiments

    [...] you can use multiple serial “ports”, that are actually digital I/O lines, by using the NewSoftSerial library. This works exactly like the Serial library, but you can read from multiple pins, as long as you [...]

  44. EasyTransfer Arduino Library « The Mind of Bill Porter

    [...] it’s easier to pick which Serial port to use; Serial, Serial1, etc. AND support for the NewSoftSerial library for creating software serial ports on any pin. Inside the download zip file are two versions of the [...]

  45. Research: RFID, XBee and Arduino « Beyond the keyboard

    [...] neat thing is the NewSoftSerial library for Adruino, allowing you to turn any set of pins into additional RX/TX pins with free to set baud [...]

  46. jomuoru weblog » Blog Archive » Esto es Camus Party

    [...] de instalar la librería NewSoftSerial pude compilar e instalar el Arduino Firmware en mi placa. A continuación necesitaba descargarme [...]

  47. Update: Design review « Appiphania

    [...] a bit of this code at the end of this journal entry. The “NewSoftSerial” library http://arduiniana.org/libraries/newsoftserial/ was extremely easy to get working (code example [...]

  48. Anonymous

    [...] Modul per Software-UART? Bitte einen Link oder Hinweis wo ich nachlesen kann. danke Schaust du hier __________________ FHZ1300 | 2x JeeLink | AVR-NETIO | FS20 | 1-Wire | 2x XBEE Pro | 4x XBEE 2.5 [...]

  49. Using A Second (Software) Serial USB To Debug Your Arduino | Utopia Mechanicus

    [...] actually really easy, using some code called NewSoftSerial (available from this site, at the ‘Download’ subheading). This software is much like your Serial device you use on the Arduino, but it’s in software [...]

  50. Kemper LED / Arduino Interface » Powerhouse Electronics

    [...] provided by the software library “NewSoftSerial”. The library can be downloaded from:: http://arduiniana.org/libraries/NewSoftSerial/. Since the communications port is created using software any of the Arduino port pins can be used. [...]

  51. Android talks to Arduino | ★ Elmindo Blog ★

    [...] NewSoftSerial library from Mikal Hart: http://arduiniana.org/libraries/newsoftserial/ [...]

  52. Utilizando a Bees Shield em uma Arduino Mega « A arte do hardware

    [...] via jumper na própria shield. Para comunicação com essa Bee, é necessário o uso da biblioteca NewSoftwareSerial, permitindo fazer que dois pinos digitais se tornem mais uma [...]

  53. Arduino camera and geotagger | jarv.org

    [...] NewSoftSerial lib was used for communicating over serial using an IO [...]

  54. Bluetooth + Arduino + Android – 1 : Transmettre des données d’un capteur branché sur une carte Arduino vers un Smartphone Android via bluetooth

    [...] 1– télécharger la bib­lio­thèque New­Soft­Se­r­ial pour Arduino NewSoftSerial10c.zip. Des expli­ca­tions et exem­ples plus détail­lés con­cer­nant cette bib­lio­thèque sur cette page (http://arduiniana.org/libraries/newsoftserial/). [...]

  55. Arduino + fon + OpenWRT + ser2net + NewSoftSerial « sea side she side

    [...] そのためソフトウェアシリアルを再現させたライブラリがありますのでそれを利用します。とはいっても標準ライブラリのSoftwareSerialは利用しません。高機能で速度もでるようになったNewSoftSerialを利用します。 [...]

  56. David C. Dean Arduino GPS – On the Cheap

    [...] NewSoftSerial Library - http://arduiniana.org/libraries/NewSoftSerial/ [...]

  57. Telemetry Using Xbee Modules | Anacortes RC Sailors

    [...] arduino remotely can be found here. For communication over XBee the Arduino appears to need the NewSoftSerial library. LD_AddCustomAttr("AdOpt", "1"); LD_AddCustomAttr("Origin", "other"); [...]

  58. NewSoftSerial, Attachinterupt() and Pins 2,3 | Anacortes RC Sailors

    [...] for attacheinterupt() are 2 and 3. The GPS shield uses digital 2 and 3 for GPS communication using NewSoftSerial. So I tried moving the GPS to other pins, 8 and 9 worked. Now pins 2 and 3 are free for my [...]

  59. Telemetry Using Xbee Modules | Anacortes RC Sailors

    [...] arduino remotely can be found here. For communication over XBee the Arduino appears to need the NewSoftSerial library. [...]

  60. [Arduino] Lecteur RFID à écran lcd, avec stockage du tag “valide” en EEPROM externe I2C « Skyduino – Le DIY à la française

    [...] Dans ce projet vous pouvez remarquer que je suis obligé d’utiliser deux port série, un à 9600 bauds pour l’écran lcd, et un autre à 2400 bauds pour le lectuer RFID. Normalement il me faudrait une mega (qui possède 3 port série) pour faire ce projet en hardware, mais il existe aussi des librairies Serial software ! C’est pourquoi je vais utiliser la librairie NewSoftSerial disponible ici : http://arduiniana.org/libraries/newsoftserial/ [...]

  61. An Idiot and an Arduino: Pretty WiFly for a White Guy « ~jmoskie

    [...] went through each error, and tried to resolve it myself. Some were easy. The "NewSoftSerial" libraries were incorporated into the core libraries, and they replaced the default SoftwareSerial [...]

  62. Arduino vs Arduino Mega – Which To Use? | Utopia Mechanicus

    [...] speed if you need a second or third (or fourth) port. On the Uno, you can do similarly using the NewSoftSerial library; however, software is slower, and if your program is pushing the limits, you may find a hardware [...]

  63. I can solder! 7-Segment Serial Display & Nunchucky operational « I Am Chris Nolan.ca

    [...] already.  I found this wall of text which I managed to digest down into this gist (and updated it thanks to these notes) which you can see running in the above [...]

  64. S2 » Android + Bluetooth + Arduino

    [...] そして、シリアル通信のテストに利用したArduinoのソースです。 NewSoftSerial(Arduinoライブラリ)を利用しています。 [...]

  65. Getting started with DroneCell and Arduino.

    [...] DroneCell and the GPS simultaneously. I stumbled upon this interesting behavior in NewSoftSerial. NewSoftSerial*|*Arduiniana. I seem to at least have something to go on… Using Multiple Instances There has been [...]

  66. Emular pines Serial de Arduino con la librería NewSoftSerial » Blog Archive » el blog de giltesa

    [...] eso es lo que es capaz de hacer la librería NewSoftSerial (más documentación aquí). Usándola podremos emplear el resto de pines como puertos serial, ya [...]

  67. Time - He's waiting in the wings - Cuyahoga

    [...] in the download is TimeGPS.pde, but it’s a touch outdated now that Mikal Hart’s NewSoftSerial library has been rolled up into the core (since 1.0) and renamed SoftwareSerial. The problem I had [...]

  68. Arduino的通讯扩展板介绍 | 爱板网

    [...] GPS模块与Arduino的通讯程序 [...]

  69. Giving Arduino a second UART over I2C by stacking another Arduino on top « CyclicRedundancy

    [...] tried using the SoftSerial (or the NewSoftSerial) library but ran into data corruptions even at the low speeds, so I decided to look for ways to get another [...]

  70. RFID Reader #1 « Tesla UIs

    [...] the example code. There some issues on the Arduino library SoftwareSerial, which changed to the NewSoftSerial once in a while. Share this:TwitterFacebookLike this:LikeBe the first to like this. Categories [...]

  71. Resources for the VCNL4000 IR Proximity Sensor | Sciencearium

    [...] - http://arduiniana.org/libraries/NewSoftSerial/ Share this: This entry was posted in AT Physics Class and tagged arduino, IR, proximity [...]

  72. Serial LCD do-it-yourself(DIY) kit | BUILD CIRCUIT

    [...] NewSoftSerial Library - Required for the example sketches. Sets up a second (third, fourth,…) serial port on the Arduino. [...]

  73. How to assemble serial LCD kit | BUILD CIRCUIT

    [...] NewSoftSerial Library - Required for the example sketches. Sets up a second (third, fourth,…) serial port on the Arduino. [...]

  74. Android talks to Arduino board - Arduino for ProjectsArduino for Projects

    [...] from this project (bluetooth_chat_LCD.pde attached below) – NewSoftSerial library from Mikal Hart: http://arduiniana.org/libraries/newsoftserial/ – Eclipse – Android Development Kit (explicitly follow all of Google’s installation [...]

  75. Burn Arduino Bootloader on an ATtiny45 for SoftwareSerial | No bread? Make it!

    [...] http://arduiniana.org/libraries/newsoftserial/ いいね:いいね 読み込み中… カテゴリー Arduino, [...]

  76. Burn Arduino Bootloader on an ATtiny for SoftwareSerial | No bread? Make it!

    [...] http://arduiniana.org/libraries/newsoftserial/ いいね:いいね 読み込み中… カテゴリー Arduino, [...]

  77. Please wait your turn! Stratoballoon GPS Sensor Sketch « Mark Gilbert's Blog

    [...] to the GPS receiver, I’d be writing to the data logger serially.  I found information here about running multiple devices serially – the short answer is that you have to access the serial [...]

  78. Going to Arduino from C#, Java, … string trouble | Hydroinformatix the Gaul

    [...] kB). I used this method and solved my intermitting (and making me crazy…) problems 2) Using PString library, added by NewSoftSerial and put in official version of Arduino. It is very handy: it hands you a [...]

  79. The Frustromantic Box, Part 4: Software | New Bright Idea

    [...] developers for the great libraries, and to Mikal Hart in particular for his work on the TinyGPS and NewSoftSerial [...]

  80. Le Dan-TECH » 2ème Partie : Reconnaissance vocale avec Arduino

    [...] , les ports 12 & 13 de l’arduino sont utilisés (liaison arduino-module via la classe newSoftSerial) et ne permettent pas l’emploi du shield Ethernet sur une platine « arduino [...]

  81. on the trail of the elusive Power Cost Monitor signal | We Saw a Chicken …

    [...] I rewrote the logger to use the Arduino’s internal UART, since — lovely though NewSoftSerial may be — it causes millis() to report wildly inaccurate times at low bit rates. I recorded a [...]

  82. 86duino

    [...] require that protocol. The version of SoftwareSerial included in 1.0 and later is based on the NewSoftSerial library by Mikal [...]

  83. 86duino

    [...] This requires the TinyGPS and NewSoftSerial libraries from Mikal Hart: http://arduiniana.org/libraries/TinyGPS and http://arduiniana.org/libraries/newsoftserial/ [...]

  84. Kerry D. Wong » Blog Archive » RF Data Link Using Si4021 And Si4311

    [...] BT1 pin settings (which are done in hardware), the receiver is totally configuration free. I used NewSoftSerial library in the code below. The main loop simply print out the incoming bit stream. You may also use [...]

  85. how to set up arduino + pololu mini maestro (for an 18 servo hexapod) | orange narwhals

    [...] newsoftserial should be downloaded from the internet and the folder inside the zip put in (path to where you [...]

  86. Starter Kit Sonar » Starter Kit

    [...] szczęście jest jeszcze jedna biblioteka „NewSoftSerial”, która jest pozbawiona tych wad i na dodatek obsługuje zanegowany sygnał [...]

  87. Twitter Poem Box -Use Arduino for Projects

    [...] Download the TrueRandom http://code.google.com/p/tinkerit/wiki/TrueRandom, NewSoftSerial http://arduiniana.org/libraries/newsoftserial/, and Twitter [...]

  88. Подключение GPS L30 модуля используя GPS Шилд от SparkFun » Arduino Market

    [...] NewSoftSerial [...]

  89. Tema 5 – Proyectos Arduino | Aprendiendo Arduino

    [...] NewSoftwareSerial: http://arduiniana.org/libraries/newsoftserial/ [...]

  90. Twitter Poem Box -Arduino for Projects

    [...] Download the TrueRandom http://code.google.com/p/tinkerit/wiki/TrueRandom, NewSoftSerial http://arduiniana.org/libraries/newsoftserial/, and Twitter [...]

  91. 아두이노의 통신 방법, 핀 정리 (Serial, UART, Software Serial, SPI, I2C) | Hard Copy Arduino

    [...] NewSoftSerial (Arduino IDE 1.0 이후 버전만 지원) – Serial 모듈별로 인스턴스를 생성해서 여러개를 사용할 수 있지만 한번에 하나의 인스턴스만 전송/수신 할 수 있습니다. 다른 라이브러리와의 충돌 가능성도 약간 있는 듯 합니다. http://arduiniana.org/libraries/newsoftserial/ [...]

  92. Please wait your turn! Stratoballoon GPS Sensor Sketch « Mark Gilbert's Blog

    [...] to the GPS receiver, I’d be writing to the data logger serially.  I found information here about running multiple devices serially – the short answer is that you have to access the serial [...]

  93. RFID cat door using Arduino -Use Arduino for Projects

    [...] This project consists of several ‘modules’ that you need to hook up to the Arduino and test in advance. First hook-up the RF reader. You can use the 5v output of the Arduino to power it, and a digital port (I used 2) to get the signal. The RDM630 that I used also has pins for a led that I don’t use. It also has an RX pin to send info back to the RF reader, but I don’t use that either. Hook-up your antenna, get a tag and use the serial monitor of the Arduino to see if it’s detected. Now you can also start working on improving the antenna by trying adding or removing turns, trying different shapes et cetera. Power the Adruino with the 9v power supply, not just USB because at least in my case that didn’t work. You can download the file named ‘rfid3.pde’ to test. The code requires NewSoftSerial.h which can be obtained here [...]

Leave a Reply