[Newbies] NXTTalk problem

Michael Haupt mhaupt at gmail.com
Sun Nov 15 12:22:04 UTC 2009


Hi Andrey,

(sorry, I don't have cyrillic characters on my keyboard; I hope the
transliteration of your name is correct)

2009/11/14 Андрей <fromarmywithlove at list.ru>:
> When I try to read distance from NXTRadar sensor its everytime returns 0. Other sensors works fine. I cant find any documentation about NXTalk except webpage of the project. But where is no information about using of NXTRadar on that page. So I decided to use it as a regular sensor. I did something like this:
> radar := NXTRadar enable: 4.
> self display show: (radar distance).
> radar disable.
> Am I right? Or NXTRadar differs from other sensors and needs special processing?

NXTRadar does require some special handling inside the VM, as its data
are delivered via the I2C bus, which has certain timing constraints
... but that should not be your concern. :-)

It might be that you have a version of the VM and image that are not
up to date, and that would be my fault. I will check this tomorrow and
send you the latest version immediately (plus, have the web page
updated).

In the meantime, to make sure things are OK, could you please try the
NXTRadarTest application (it is in the NXTalk-ST-HardwareTests
category)? It expects the radar to be connected to port 3 and
continuously displays the measured distance. Move your hand in front
of the radar to check.

Looking at your code, it *might* be a problem that the radar is
disabled immediately after the distance is measured. This *might*
interfere with the aforementioned timing constraints, but I cannot say
that for sure.

Best,

Michael


More information about the Beginners mailing list