I just purchased a Usb mini to hook up to my lilypad and everything seems to work fine except the baud 9600 data. I can upload the sketch on the board but the incoming data from my light sensor behaves erratically.
I bought this usb mini to simplify the I usually have my lilypad working.
which is;
arduino diecimila(w. atmega 168 removed) / rx tx + - connected to lilypad w. aligator clips. ← this setup has always worked fine. The incoming data was always fine.
So it definitively has something to do w. the new usb mini itself. I was thinking maybe I need a driver. But after searching sparkfun links, I seem to have the right driver -FTDIUSBSerialDriver_v2_1_9.dmg
Also, I have tried selecting the two port options that represent my usb mini. The difference in the heading is - tty. usb… and the other starts w. cu.usb…
What exactly do you mean by “erratically”? Do characters get dropped in the middle of a transmission? Or just delayed? Do garbage characters get inserted?
The difference between the “tty” and “cu” versions of a serial port is a historical unixism; traditionally, the “tty” version is for accepting incoming connections (from a hardwired terminal - a tty - or a modem), and the “cu” version is for making outgoing connections (“call unix”, I think). The main difference is that if a program opens the “tty” version it’ll block until a connection is made (DSR goes high, or carrier detect, or etc). The “cu” version doesn’t do this, since the idea is to open the port in order to make an outgoing connection. Once they’re open they act the same.
How this applies to serial ports that are actually USB devices I can’t tell you for sure. It’s probably up to the individual device driver to decide exactly how they behave.
I mean random number are being output in the range of (0-1023). On my lilypad light sensor 3 connections possible/ +,- ,S. Even worst is, when I unplug the S , it’s still sensor random numbers. So I’m thinking that’s it’s not even reading the incoming data at all!
wiml:
The difference between the “tty” and “cu” versions of a serial port is a historical unixism; traditionally, the “tty” version is for accepting incoming connections (from a hardwired terminal - a tty - or a modem), and the “cu” version is for making outgoing connections (“call unix”, I think). The main difference is that if a program opens the “tty” version it’ll block until a connection is made (DSR goes high, or carrier detect, or etc). The “cu” version doesn’t do this, since the idea is to open the port in order to make an outgoing connection. Once they’re open they act the same.
so if they’re the same, which one do I choose? More precisely, why is there an option?