Hello World? Cannot get it to work!

79 views
Skip to first unread message

Christopher McCafferty

unread,
Feb 27, 2014, 9:56:16 AM2/27/14
to nxt-p...@googlegroups.com
Hi guys,

I am pretty new to NXT-Python. I been programming for the Lego Mindstorm for a while now but as part of my research topic I am playing with different development tools for the NXT brick. 

I am having a issue getting Hello World printed to the screen, I have spent two days on this and I am completely lost. I originally had connection issues but creating a config file solved that. 

The code example I have used is the one found at this link: https://github.com/dgchurchill/nxt-python/blob/master/examples/mindsensors/HID.py

Not sure if I am doing something really silly but the error its producing during run time is:

Traceback (most recent call last):
  File "hello_world.py", line 8, in <module>
    s = MSHID(b, PORT_1)  
  File "/usr/local/lib/python2.7/dist-packages/nxt/sensor/mindsensors.py", line 732, in __init__
    super(HID, self).__init__(brick, port, check_compatible)
  File "/usr/local/lib/python2.7/dist-packages/nxt/sensor/digital.py", line 73, in __init__
    sensor = self.get_sensor_info()
  File "/usr/local/lib/python2.7/dist-packages/nxt/sensor/digital.py", line 155, in get_sensor_info
    version = self.read_value('version')[0].split('\0')[0]
  File "/usr/local/lib/python2.7/dist-packages/nxt/sensor/digital.py", line 142, in read_value
    raise I2CError, "read_value timeout"
nxt.error.I2CError: read_value timeout

Wondering if anyone had any suggestions? Not sure if anyone is still using this group. 

Thanks in advance, 
Chris 

tjgil...@googlemail.com

unread,
Mar 9, 2014, 8:33:25 PM3/9/14
to nxt-p...@googlegroups.com
I only joined today but, I think your issue is that this is sensor code for handling the following product:

http://www.mindsensors.com/index.php?module=documents&JAS_DocumentManager_op=viewDocument&JAS_Document_id=122

I assume you are trying to write to the LCD display on the Brick?

Christopher McCafferty

unread,
Mar 9, 2014, 8:39:17 PM3/9/14
to nxt-p...@googlegroups.com

Hiya,

Since this post I have realised that the code I mentioned was for a third party sensor (should of read some more).

Yeah, I was trying to print into the LCD screen but had zero luck. I have moved onto my main project but would love to know a solution of anyone has one!

--
You received this message because you are subscribed to the Google Groups "nxt-python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nxt-python+...@googlegroups.com.
To post to this group, send email to nxt-p...@googlegroups.com.
Visit this group at http://groups.google.com/group/nxt-python.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages