NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Support Forum » Reading from serial port on Mac

April 13, 2009
by mdmetzger
mdmetzger's Avatar

Hi - Finally got some time to spend with my nerdkit and having some trouble with the tempsensor example. I'd like to troubleshoot it myself first but I need to know what baud rate it writes back to the serial port with. I'm using a mac and have used screen in the past to access a given port - I've tried some of the usual ones (115.2k, 9600, etc) but only get random characters.

Thanks!

April 13, 2009
by Soybean
Soybean's Avatar

It's 115200 baud, 8N1.

When I tried this, I was also getting gibberish at first... it turned out that I had copied the code incorrectly. Instead of printf_P(PSTR("...")), I just had printf_P("..."). So you may want to check that, just in case you did the same thing.

April 13, 2009
by mdmetzger
mdmetzger's Avatar

Ok - getting a little frustrated here...

No matter what I try to print to the LCD (or serial port) using fprintf_P (printf_P) it won't print to either. Considering that I get the last_sample from the adc_read() function (it prints to the LCD fine) I'm not sure what's wrong exactly. This is true even if I use the tempsensor files unchanged (save for editing the Makefile for the right serial port.) I'm sure I'm doing something stupid here but I'm not sure what.

Thanks!

April 13, 2009
by mrobbins
(NerdKits Staff)

mrobbins's Avatar

Hi mdmetzger,

Did you remember to run "avr-gcc-select 4" from the command line? Other Mac customers mentioned having the problem you describe when they accidentally omitted that step. Please let me know if that helps.

Mike

April 13, 2009
by mdmetzger
mdmetzger's Avatar

mrobbins -

Thanks! That was it (and making sure to remove the old object code) - not sure how I missed the big bold statement on page 38...

May 09, 2009
by brian
brian's Avatar

See the bottom section of http://www.nerdkits.com/videos/servosquirter/ which explains how to do this.

Post a Reply

Please log in to post a reply.

Did you know that you can use printf and scanf functions to talk to your computer from your USB NerdKit? Learn more...