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 » Tug this is for you (only)

October 13, 2009
by Farmerjoecoledge
Farmerjoecoledge's Avatar

Try this one, it still don't quite fit. After you copy and paste it, backspace WELL to get that in one line. Do the same for details. And what happened to the "" before the n.

Strange days indead, i didn't put the > on the end. Looks like we got a mouse.

I've just tried rusirius's method with no go. It's completely diffrent approch with the IDLE and putty. There's nothing indent wrong with that script it runs fine when it runs. I get a "syntax" error from IDLE and run modual, not a indent error. The same one i saw a thousand times when trying to compiling with python and netcat's localhost 6667 on windows.

Netstat it seems is a linux command, it don't work on my windows machine, also there's no Unindent option under format either so what's with that, there rusirius? You almost had me jumping for joy, no more linux headaches.

As for EEE that's windows xp os with a linux gui, which has got to be some kind of a joke. Windows invented the gui, in my books.

I'm beginning to wonder if it's all worth it, the feeds are okay but lots of crap, addresses and stuff with very little actual news, hardly spectacular enough to learn how to run it on linux.

There seems to be a problem with the forum, the added "&gt:" is back and the large print is not mine. Yes there's supposed to be a # in the front of that blob. Sorry about the code format again but it does work. If you can't get it i can post a pic that you can copy.

import serial
import sys

serial = serial.Serial("/dev/ttyUSB0", 115200)
while True:
mystring = "HELLO TUG,/\/\HOW'S IT GOING TODAY?/\/\/I HOPE YOU ARE WELL/\/\>>>:::   \n"
  for data in mystring:
if not data == '\n':
  response =
  if not response == 'n':
      print "Received: " + response
      #This is a debug line, since I'm a bit fuzzy on some
October 13, 2009
by Farmerjoecoledge
Farmerjoecoledge's Avatar

Correction: I got netstat to run, i had to cd right to windows system32 folder before it would run.

Tug, Here's a screen shot of the code, don't know what's going on above.


October 14, 2009
by Tug
Tug's Avatar

Thank you very much (it worked).

I realized I was doing something wrong, being impatient. It doesn't show it in the code, but the leds will light up and down before the message gets displayed. And I think I always shut it off when I saw the leds lighting up one by one, thinking it didn't do what I wanted.. SO I have do check out the old codes back.

But yeah, pretty cool that I can communicate from my pc to my mcu !

October 14, 2009
by mrobbins
(NerdKits Staff)

mrobbins's Avatar

Hi Farmerjoecoledge,

For future reference, to get code to show up properly on the forums, you need to put 4 spaces before each line. This is pretty easy to do in many text editors. Hope that helps!


October 14, 2009
by Farmerjoecoledge
Farmerjoecoledge's Avatar

Great It worked, That's a good little script, don't forget you can change it. I thinkin of putting a night before christmas on it and stickin it in the window, there's snow here already.

Mike, thanks for the tip, why didn't i know that?

Tug, read my post in your first thread and follow rusirios method to get the listener running. After if you need help with the "pipe" read from wayward's on.


Post a Reply

Please log in to post a reply.

Did you know that 20 LEDs can be controlled from 11 microcontroller pins, to make a twinkling heart outline? Learn more...