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. Guz

    13 years ago

    Hi,

    GND of supply is connected to GND of Serial Port.

    In fact, I manage to get bytes @ 9600 bps but after few ms bytes are corrupted.

    I’ll try at lower baud rates.

    This device uses 3.3V and I connect its TX pin directly to Arduino2009 maybe commutation time is too important (need a 5V 3.3V level shifter)

    @19200 everything is corrupted.

    Will try at 4800 bps and tell you.

    Regards


  2. Guz

    13 years ago

    Hi,

    To give more info.

    Work wery well @4800bps

    So I need to test it with a level shifter.

    Another work is to modify NewSoftSerial to manage 2 active port at the same time.

    I need it because I want to get bytes from a GPS and this board without missing any byte.

    Will see if I achieve to do that.

    If you have info to help me….

    Regards.


  3. simon

    13 years ago

    I will waiting for NewSoftSerial to support Arduino Mega.
    I think that’s cool and useful.
    thank you very much for excellent lib.


  4. Xbee

    13 years ago

    Hi Michael,

    great work. I was looking for it since long. I have two serial devices connected to my Arduino Duemilanove. One to the Rx/Tx and the other to pin 2 and 3. I want to read/write using micro-controller on pin 2/pin 3 device and want to use PC to read and write rx/tx (pin 0/ pin 1) device. but problem is both devices will wait for the serial data to arrive, I want to make priority of device on Pin0/pin1 high.

    You said that we cannot use the code like:

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

    }
    if (device2.available() > 0)
    {
    int c = device2.read();

    }
    }

    then how can i wait for data on both serial ports as data is received my and analyzed by micro-controller in both cases?. I can also do the two tasks one after the other but how will then i wait for data without using device1.available() and device2.available()? Will i have to use device1.begin() and device1.end() before waiting for device 2.

    thanks!


  5. Mikal

    13 years ago

    XBee– If one of your two “serial” ports is the real “Serial” device, you should have no problem reading from both whenever you want. It’s only when both devices are “soft” serial that you have to be careful.

    Mikal


  6. JDC

    13 years ago

    Does anyone know of a problem using the NewSoftSerial and I2C (wire.h)? I recently rewrote a program to use the NewSoftSerial package, but when it starts transmitting the data via I2C, the Arduino freezes.


  7. Geo72

    13 years ago

    Hi,
    great lib!
    I have a (maybe noobish) question: Is it possible to use 9-Bit (9n1) with NewSoftSerial?
    I will need to get 9n1 from NewSoftSerial and send it (modified) over the Hardware UART to the PC.
    Maybe a hit which lines i would need to modifiy would help…

    Thanks!


  8. Mikal

    13 years ago

    Hi Geo72–

    NSS doesn’t support 9n1 (yet?), but it shouldn’t be too hard to modify the recv() function to do it.

    Mikal


  9. Geo72

    13 years ago

    For 9n1 i guess i would need to change the [uint8_t d] to uint16_t? Also the use of the bitmask could be a problem because it can only hold 8-bit?!
    Seem to me it might be a bit (:D) more complicated than i first thought….atlast for me.
    Maybe someone might have some fun to make 9n1 available for NSS? :)


  10. Rico

    13 years ago

    Hello Mikal,
    Great job here !
    Is there a target date for Arduino Mega support ?
    Thanks :)
    Rico


  11. Mikal

    13 years ago

    Rico,

    Not officially, but I would imagine that Mega support will arrive right about the time NewSoftSerial is folded into Arduino 1.0.

    Mikal


  12. Hant

    13 years ago

    It’s a great library. Thanks anyway.

    However, few bytes might be lost with a long bytes input at once.
    For baud rate: 9600, with updated values for parameter: rxcenter in the DELAY_TABLE
    , the problem is fixed.

    The values used in my sample are list as following:
    { 9600, 175, 236, 236, 233, },

    I use Duemilanove in my project.


  13. Dave

    13 years ago

    I seem to be having a problem with NewSoftSerial 10c. I’m using it with my LS20031 gps unit, a Duemilanove and your TinyGPS library. I’ve changed the nss baud to that of my gps, 57600, and tried several different rx pins but it just seems to hang. My monitor stops after printing ‘size of TinyGPS 103′. If I comment out the nss lines and use pin 0 I get data. Am I missing something?

    Dave


  14. Rico

    13 years ago

    Hi Mika,
    I’m currently facing issues with native soft serial and my Mega board.
    I really need to move on NewSoftSerial with my Mega board quickly.
    So, I can not wait for Arduino 1.0 :-(

    Is there a way (beta version or other hack) to get NewSoftSerial running with Megaboard ?

    Thanks !
    Rico


  15. Mikal

    13 years ago

    Dave, 57.6K baud is probably stretching it for Arduino software serial. You’re probably dropping characters. Can you try a reduced baud rate?

    Mikal


  16. Mikal

    13 years ago

    Rico, if you (or someone else) can extend this block to support the Arduino Mega processor, that should be enough to get NewSoftSerial running on it. Any takers? I don’t currently have a Mega or time to read the Mega data sheets.

    // Abstractions for maximum portability between processors
    // These are macros to associate pins to pin change interrupts
    #if !defined(digitalPinToPCICR) // Courtesy Paul Stoffregen
    #if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__)
    #define digitalPinToPCICR(p) (((p) >= 0 && (p) <= 21) ? (&PCICR) : ((uint8_t *)NULL))
    #define digitalPinToPCICRbit(p) (((p) <= 7) ? 2 : (((p) <= 13) ? 0 : 1))
    #define digitalPinToPCMSK(p) (((p) <= 7) ? (&PCMSK2) : (((p) <= 13) ? (&PCMSK0) : (((p) <= 21) ? (&PCMSK1) : ((uint8_t *)NULL))))
    #define digitalPinToPCMSKbit(p) (((p) <= 7) ? (p) : (((p) <= 13) ? ((p) – 8) : ((p) – 14)))
    #endif


  17. Dave

    13 years ago

    I dropped the baudrate again, this time to 9600. All seems well. Thanks,

    Dave


  18. Chris

    13 years ago

    Hi,

    Thanks for your nice NewSoftSerial library. I just wanted to ask what baud rate you had reliably achieved for receiving data? I wrote a quick program that counts up the number of bytes received and displays the count when you press SPACE over a serial link.

    For bursts of a few bytes, I’m fine at 19200 bps, but if I cut-and-paste 20+ bytes into my terminal at once, then I get about 5% drop rate. Is that normal?

    Also, how does your library cope with full duplex – what happens if data is received whilst other data is being sent out?

    Thanks,

    Chris.


  19. rolo

    13 years ago

    I’m trying to verify the correct retrieving of serial information with NewSoftSerial library .
    I wire the physical UART from Arduino (pins 0 and 1) to two other digital pins (2,3) that are setup as with Newsoftserial library as a new software Serial in the following way:

    0 RX — 3 TX
    1 TX — 2 RX

    Then , with the following code, I try to print what has been read by the created software Serial.

    The problem is that information read doesn’t correspond to the information sent. And I don’t know if there’s a problem with the printing or really in the communication.
    I send “2E” and in return I always receive (at least it’s what is displayed) “32″

    #include

    NewSoftSerial nsSerial(2,3);

    void setup()
    {
    Serial.begin(9600);
    nsSerial.begin(9600);
    //digitalWrite(2,HIGH);
    Serial.print(0xAA,HEX);
    delay(150);
    if (nsSerial.available()>0)
    {
    Serial.print(nsSerial.read(),HEX);
    }
    }

    void loop()
    {

    }

    Thanks in advance for any help to find what I’m doing wrong


  20. Mikal

    13 years ago

    Hello Chris,

    If you are dropping characters at 19.2K I would suspect that you are not processing them fast enough somehow. Can you check to see if nss.overflow is “true”? That’s how you tell for sure that you’re overflowing the RX buffer. I wouldn’t expect 19.2K to pose much problem otherwise.

    Full duplex can sometimes sort of work with NewSoftSerial, but you certainly shouldn’t count on it. The reason is that every time you TX a byte, interrupts are blocked for the entire duration of the transmittal, i.e. 10 bits / Baud-rate seconds. If a byte arrives from the partner during this time, its processing is deferred until the transmission is complete — by which time it’s too late. The byte is corrupted!

    In certain circumstances, like when the protocol is synchronized in question-and-answer fashion, it can work fine, but generally no.
    Thanks,

    Mikal


  21. Mikal

    13 years ago

    Hi Rolo

    I think you want Serial.print(0xAA, BYTE), which transmits a single byte. Serial.print(0xAA, HEX) transmits the string “AA”.

    Cheers,

    Mikal


  22. rolo

    13 years ago

    @Mikal . Thanks!. That was the point. I was sending more than one byte . Now is working fine . I wrote the following code for the testing and everything is ok now for any kind of data format (The code read all the bytes received). I saw it’s important to add a delay between the sending and the reading (50 ms) .

    #include

    const byte rxPin = 2;
    const byte txPin = 3;
    int countOffset =0;
    int bytesRead=0;

    NewSoftSerial nsSerial(2,3);

    void setup()
    {
    Serial.begin(19200);
    nsSerial.begin(19200);

    Serial.print(0x2A,BYTE); //
    delay(50); //
    countOffset = nsSerial.available();
    if ( countOffset > 0 )
    {
    while(bytesRead < countOffset)

    {
    Serial.print(nsSerial.read(),HEX);
    bytesRead ++;
    }
    }
    Serial.println();
    Serial.print(countOffset);Serial.println(" bytes read");
    }

    void loop()
    {
    }


  23. Frits

    13 years ago

    Hi Mikal

    I want to use this library to communicate with a distance sensor (SRF485). The problem is this sensor uses 2 stop bits for both RX and TX. Is it possible to modify the library for 2 stop bits instead of 1 for both printing and reading? If so, can you please advise?

    Thanks
    Frits


  24. Mikal

    13 years ago

    Rolo,

    It is important to wait for the byte to arrive, but rather than waiting an arbitrary number of milliseconds, why not just wait until NewSoftSerial tells you that the data arrived?

    while (nsSerial.available == 0)
    ;

    Mikal


  25. Mikal

    13 years ago

    Frits,

    Yes, that is possible. Someday when I get time I may modify the library to allow that. Meanwhile, if you’d like to take a shot at it, you can look at the section in recv() labeled “// skip the stop bit”. Similarly, in the “write” routine, look at the stop bit delay at the very end of the routine.

    Thanks for the note.

    Mikal


  26. Mike

    13 years ago

    Hi,

    Thanks for the library. I’m having a little trouble getting it to read data from a GPS. I’m using a very basic sketch (attached), but I just get strings of garbage on the screen

    I can read the GPS data using hyperterminal without problems, it auto-detects the connections settings as 4800 baud, 8 bit, no parity. The data displayed by hyperterminal is fine, so I know the GPS is working.

    Any suggestions appreciated.

    Regards

    Mike

    #include

    NewSoftSerial mySerial = NewSoftSerial(2, 3);

    #define BUFFSIZ 90 // plenty big
    char buffer[BUFFSIZ];
    char buffidx;

    void setup()
    {
    Serial.begin(4800);
    mySerial.begin(4800);
    Serial.println(“\n\rNewSoftSerial + GPS test”);
    }

    void loop()
    {
    Serial.print(“\n\rread: “);
    readline();
    }

    void readline(void) {
    char c;
    buffidx = 0; // start at begninning
    while (1) {
    c=mySerial.read();
    if (c == -1)
    continue;
    Serial.print(c);
    if (c == ‘\n’)
    continue;
    if ((buffidx == BUFFSIZ-1) || (c == ‘\r’)) {
    return;
    }
    buffidx++;
    }
    }


  27. Mikal

    13 years ago

    Mike, your code looks reasonable, but if I were you I’d try communicating with the console at a higher speed. Can you ratchet that up to, say, 115200?

    Mikal


  28. Mike

    13 years ago

    Any word on when NewSoftSerial will be available for the Mega? I can send ok but can’t receive, using my Mega with the TSS. Primarily, I wish to use NewSoftSerial between these two devices.


  29. Mikal

    13 years ago

    Do any readers have time to port NewSoftSerial to Mega for Mike and the others?

    Mikal


  30. g

    13 years ago

    Having a bit of a problem with what i think is down to a writing baud rate issue..

    I have the PC connected to the Duemilanove via USB, then pin 3 of the arduino (Tx) connected to the serial connection on a Milford Instruments LCD display screen. Data sheet – http://www.milinst.co.uk/shop/LCDs/pdf/6_201.pdf which accepts baud rates of 9600 or 2400 depending on the baud jumper, is 8bit, no parity and one stop bit.

    Basically the Duemilanove should be acting as a USB to serial converter. The sketch is as follows:

    #include

    NewSoftSerial lcd(2, 3);

    void setup()
    {
    pinMode(13, OUTPUT);
    digitalWrite(13, HIGH);
    Serial.begin(9600);
    lcd.begin(9600);
    }

    void loop()
    {
    if(Serial.available())
    {
    char c = Serial.read();
    lcd.print(c);
    Serial.print(c);
    Serial.print((bool) lcd.overflow());
    }
    }

    Should be reading from Serial (1 char at a time) then printing to the LCD display via pin 3 (additional Serial prints for debugging)..

    At the PC side I have a python script to send the commands (clear the LCD display, reset the cursor position and send some ‘test’ text).

    At 9600 baud either side of the Arduino, data is getting through to the display screen but about 50% of the time at least 1 of the 4 characters that make up the initial string is garbled. However the messages that come back through the USB serial port to the PC are always correct and there’s no overflow.

    Connecting the LCD display directly to the PC with a serial cable and with a USB to serial converter (PL2303) it works 100% of the time fine. I’m assuming it’s got to be related to the NSS write function..?


  31. Mikal

    13 years ago

    Hmm… Can you post some samples of the “garbled” text. Logically this seems ok. Are all devices grounded? All operating at the correct voltage? There isn’t any RS-232 anywhere, is there?

    Mikal


  32. miles

    13 years ago

    I’m trying to get data from a sensor that sends data at 1200 baud. My code looks a lot like g’s above. When the arduino is reset, I get the sensor data. All subsequent tries fail. The old softserial library is able to read repeatedly, so I’m pretty sure it isn’t a hardware problem.
    Is this a baud rate problem?

    Since I will have multiple RO devices, can they all share a TX pin?

    Code that doesn’t work:
    NewSoftSerial….h2o1(7,9)

    h2o1.flush(); // flush old stuff before powering on
    digitalWrite(powerpin1,HIGH); // excite sensor and wait for device to settle.
    delay(DECAGONDELAY); // at this point sensor should have sent everything

    while(h2o1.available()>0) {
    c=h2o1.read();
    if (c == -1) { continue; }
    if (c == ‘\n’) { continue;}
    if (c == 0 ) { continue;} // null sometimes sent at beginning?
    if ((buffidx == DECAGONBUFF-1) || (c == ‘\r’)) {
    buffer[buffidx] = 0;

    Serial.println(millis() -startreadline); // tune how long we delay
    digitalWrite(powerpin1,LOW); // reset sensor
    return(1);
    } else {
    buffer[buffidx]= c;
    buffidx++;
    }
    }

    Serial.println(“failed”);
    digitalWrite(powerpin1,LOW); // reset sensor
    return(0);


  33. miles

    13 years ago

    I tightened up my code, and now NewSoftSerial will read 1-3 sensor readings successfully. Then it will fail from then on. Using the goodnight moon code & manually exciting the sensor I get the same result: 1-3 good readings, then failure from then on.

    This is using OS X Arduino 18, and a Duemilanove 328.


  34. miles

    13 years ago

    Never mind, turns out I had a problem with the sensor. When I set up a 2nd arduino to act as a sensor simulator, NewSoftSerial worked without flaw.


  35. Matt Jarvis

    13 years ago

    Hi Mikal,

    I have a problem with using the NNS library and the hardware GPS on a FIO board which I posted here:
    http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1284169934/2#2

    Do you know if it’s possible to change the interrupt or library somehow to patch this issue? (ie get the 4800 BAUD while fooling the arduino somehow it’s running at 57600?).

    If not, do you know if it’s possible to get the em406a GPS serial running at 57600 BAUD?

    Many thanks for all your hard work!


  36. Mikal

    13 years ago

    Miles,
    It looks like your program prints “failed” whenever NSS runs out of data. That’s not a real failure, though, is it?

    Mikal


  37. Mikal

    13 years ago

    Matt, I’m pretty sure that the EM-406A can’t operate at higher speeds.

    As mentioned on the forum, processing a software serial data stream — especially at slow baud rates — requires a great deal of dedicated CPU. I’m not surprised you see overflow on the Hardware Serial link if you repeatedly blast data back and forth.

    That delay(1) is actually the problem. Even without the GPS or NewSoftSerial in the equation your program couldn’t keep up with a full tilt 57.6K data stream on the Hardware Serial connection. At full speed, each byte arrives in about 1/5 of a millisecond. If you delay 1 millisecond for each, you’ll eventually suffer an overflow.

    Mikal


  38. Michael

    13 years ago

    Hi Mikal,

    I am working on a project that requires IrDA interface. I don’t need particularly fast comms so I only want to consider 9600 baud or even 2400 baud (both rates are supported by the IrDA spec). The IrDA standard defines the bit length as 3/16 of the RS232 equivalent hence a normal RS232 hardware UART can’t “talk” IrDA. What would be involved in modifying NSS to enable it to talk (and recieve) IrDA?

    I know I can get a h/w “glue” IC that deal with RS232 to IrDA conversion but I am looking for a no hardware solution.


  39. Mikal

    13 years ago

    Michael,

    I couldn’t say for sure, but if I were involved in such a project the first thing I would do is make a modification of the “table” of delays in NewSoftSerial.cpp. It would be interesting to see if shrinking these values by a factor of 3/16 suddenly “made it work”. Of course, there could be other incompatibilities too. Let me know what you find out!

    Mikal


  40. Jackshowme

    13 years ago

    I am new here. May you show me how to install your NewSoftSerial?


  41. Mark Adams

    13 years ago

    That NewSoftSerial inherits from Print is too cool. What I need is this library to support the SPI in Master or Slave modes! That way, many atMegas can communicate reliably at high speeds. I am designing open source shields with atMega168s; some as SPI Masters, some as SPI Slaves. I know the Ethernet lib uses the SPI, I just want SPI as a serial port. Thanks so much for these tools.
    Mark Adams


  42. Mikal

    13 years ago

    I’ve had a couple of people suggest this Mark. Perhaps I need to learn a bit about SPI. :)

    Mikal


  43. Mark Adams

    13 years ago

    Mikal,

    Actually, both the SPI and the TWI hardware on the Mega168 could be used as general purpose 8 bit serial ports. Years ago, I did a bit-bang serial port emulation and know how hard it is to catch incoming data correctly. These two hardware peripherals free the real time to mostly interrupt driven software allowing higher baud rates and less problems. To develop this, I guess you need someone on the shield side using straight GCC. I am thinking to change my design to just use the native UART. So, I will not likely need these interfaces or your soft ones. Thanks and good luck, when I get something out here, I will drop you a line.

    Mark


  44. MarkH

    13 years ago

    Mikal,

    I’m just getting started with Arduino serial comms. I need to interface two serial devices and was planning to use your NSS library. I don’t have the necessary h/w yet,so I can’t test anything, but I’m struggling to understand how your library maintains two asynchronous input streams. My devices cannot be controlled so will send data when they feel like it. Looking at NewSoftSerial.cpp, it looks like bits sent by a device whilst another is being read will be lost – or an I missing something?


  45. Mikal

    13 years ago

    Hi Mark. Yes, you read correctly. NewSoftSerial can’t support two asynchronous input streams. Not simultaneously anyway. The best it or any software based serial device can do is listen to one for a while, then turn that one off and listen to the other one.
    Good luck!


  46. David

    13 years ago

    Mikal,
    A couple things I see looking through the NewSoftSerial code..
    1. Interupts are disabled on TX for the length of the char.
    This could…
    cause problems to others at low baud rates.
    TX will trash any RX data incoming
    A loop back connection can never work.

    Wouldn’t an interupt driven TX help?

    David


  47. Mikal

    13 years ago

    David, you’re quite right that software serial that disables interrupts is pretty dicey at low baud rates. It works ok, but other threads in the controller can get starved because interrupts are disabled for so long.

    Unfortunately, rewriting TX so that each bit was driven by an interrupt wouldn’t work unless there were no other components in the system using them. If there were — for instance in your “loopback” scenario — then you’d run the fatal risk of having the TX interrupt delayed. And even a tiny delay can corrupt a serial transmission.

    Mikal


  48. Brett

    13 years ago

    Hey Mikal,

    I wrote the “Mega” (Arduino Mega and Mega 2560) changes for NewSoftSerial.

    Beware, though: NewSoftSerial will only be able to *receive* on pins

    10, 11, 12, 13,
    50, 51, 52, 53,
    and 62, 63, 64, 65, 66, 67, 68, 69

    That’s it.

    So if you have a shield or something else that “normally” uses a NewSoftSerial pin in the 0-9 range, it WILL NOT WORK.

    (You can, however, *transmit* on pretty much any pin).

    As a bonus, I’ve already updated it to support Stream.h (you will need to have the latest Arduino IDE – V0021+).

    http://tinyurl.com/newsoftserial-bh-mod

    b


  49. Mikal

    13 years ago

    Brett,

    Your efforts, as usual, are much appreciated. Great work! With your permission I’ll include the Mega support into NewSoftSerial 11.

    Cheers,

    Mikal


  50. Brett

    13 years ago

    No problem, Mikal, go right ahead.

    Since I’m now maintaining the libraries for Wiring, NewSoftSerial will become the new SoftSerial library for Wiring (the father of Arduino – http://wiring.org.co/). Expect to see it in Version 0028.

    b

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