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.

Microcontroller Programming » Need help with PRINTF SCANF tutorial on MAC

July 10, 2011
by bhovik
bhovik's Avatar

I got the source code for micro controller from tutorial. Could you provide me example code from PC side to be able to communicate with controller. If possible on C and which can work on Mac. Thank you

July 10, 2011
by hevans
(NerdKits Staff)

hevans's Avatar

Hi bhovik,

Reading from the serial port can get tricky on different operating systems, but it should not be too difficult on a Mac depending on which operating system you use. I'm not very familiar with OSX development environments, but in Python you can get serial communications to work fairly easily. Get Python installed, as well as PySerial, and PyGame and you should be able to look at the Weigh Scale project for an example.

Humberto

July 10, 2011
by bhovik
bhovik's Avatar

I have tried it. I can read from USB, but I have problem writing to USB. I have tried starting from simple "echo" to your python program for car motion.

Post a Reply

Please log in to post a reply.

Did you know that a motor's no-load current at a given voltage is much less than it's resistance would suggest? Learn more...