NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Project Help and Ideas » Reading in Temperature data in python
March 10, 2010 by waspinator |
Hi, Just finished the nerdkits booklet, and now I'd like to be able to read in that serial stream we sent in the temperature sensor tutorial. I'm using ubuntu, and I can get the data using minicom, but I would like to get it using the serial module of python. It should be very simple, but I get gibberish when I try to read from the serial port in python. This is my python program
and this is the output:
Does anyone know why I'm getting �? Thanks, Waspinator |
---|---|
March 10, 2010 by mrobbins (NerdKits Staff) |
Hi Waspinator, The first clue is that the baud rate is incorrect -- we've set the microcontroller for 115200 by default, so you've got to set the PC-side for the same baud rate. Try replacing:
with
and see if that works. Mike |
March 10, 2010 by waspinator |
Thanks! I feel like an idiot. I thought I had tried that already, but I guess I didn't. works perfectly now. Thanks again, Waspinator |
Please log in to post a reply.
Did you know that NerdKits has been featured in the MIT Undergraduate Research Journal? Learn more...
|