lego

How to import from custom Python modules on new Lego Mindstorms Robot Inventor

不问归期 提交于 2021-01-21 10:46:28
问题 I have been using the new LEGO® MINDSTORMS® Robot Inventor. When creating a new "Project", the said project seems to contain a single file. However, at the start of every sample code file, one can see that the mindstorm modules are imported, like so: from mindstorms import MSHub, Motor, MotorPair, ColorSensor, DistanceSensor, App from mindstorms.control import wait_for_seconds, wait_until, Timer from mindstorms.operator import greater_than, greater_than_or_equal_to, less_than, less_than_or

How to import from custom Python modules on new Lego Mindstorms Robot Inventor

强颜欢笑 提交于 2021-01-21 10:46:12
问题 I have been using the new LEGO® MINDSTORMS® Robot Inventor. When creating a new "Project", the said project seems to contain a single file. However, at the start of every sample code file, one can see that the mindstorm modules are imported, like so: from mindstorms import MSHub, Motor, MotorPair, ColorSensor, DistanceSensor, App from mindstorms.control import wait_for_seconds, wait_until, Timer from mindstorms.operator import greater_than, greater_than_or_equal_to, less_than, less_than_or

How To Save Content of GTKTextBuffer to a File

南笙酒味 提交于 2020-01-02 04:54:11
问题 I'm writing on Ubuntu 12.04 in Anjuta with C and GTK a program. It's a graphical interface for the nbc (Lego NXT Compiler). I have a GTKTextView. Now I want to save the content of the textview to a file, which could be chosen by a GTKFileChooser. Now I don't know how to get the text from the TextView and write it to the file. How do i do this? 回答1: First, get the GtkTextBuffer from the GtkTextView using gtk_text_view_get_buffer() . Then get the start and end GtkTextIters from the buffer to

C# library for Lego Mindstorm NXT [closed]

穿精又带淫゛_ 提交于 2019-12-31 08:25:50
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . Is there C# (.NET) library for Lego Mindstorm NXT, which is up-to-date? NXT.NET for LEGO Mindstorms last update 18.04.2008 http://nxtnet.codeplex.com/ MindSqualls last update 05.06.2007 http://www.mindsqualls.net/ Lego .NET last update 07.04.2005 http://www.dcl.hpi.uni-potsdam.de/research/lego.NET/weblog/ I know

C# library for Lego Mindstorm NXT [closed]

微笑、不失礼 提交于 2019-12-31 08:25:29
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . Is there C# (.NET) library for Lego Mindstorm NXT, which is up-to-date? NXT.NET for LEGO Mindstorms last update 18.04.2008 http://nxtnet.codeplex.com/ MindSqualls last update 05.06.2007 http://www.mindsqualls.net/ Lego .NET last update 07.04.2005 http://www.dcl.hpi.uni-potsdam.de/research/lego.NET/weblog/ I know

Combine Gyroscope and Accelerometer Data

跟風遠走 提交于 2019-12-17 02:02:13
问题 I am building a balancing robot using the Lego Mindstorm's NXT system. I am using two sensors from HiTechnic, the first being an Accelerometer and the second being a Gyroscope. I've successfully filtered out noise from both sensors and derived angles for both in a range between -90 and 90 degrees, with 0 degrees being perfectly balanced. My next challenge is to combine both of the sensor values to correct for the Gyroscope's drift over time. Below is an example graph I created from actual

Lego Mindstorm NXT 2.0: “Error: NXT Bluetooth passkey confirmation failed”

不羁岁月 提交于 2019-12-07 18:48:23
问题 Running Windows 7 and the Lego Mindstorms NXT 2.0 IDE. The Windows bluetooth manager shows the NXT is connected and the NXT shows up in the Windows list of bluetooth devices. When I try to connect from the Lego IDE, however, I get a message that says "Error: NXT Bluetooth passkey confirmation failed". I entered the pairing key on the NXT and within Windows with no problems. The problem is when I am in the IDE trying to connect to the NXT. Any suggestions? Update - January 8, 2010 I have it

Lego Mindstorm NXT 2.0: “Error: NXT Bluetooth passkey confirmation failed”

只愿长相守 提交于 2019-12-06 13:20:23
Running Windows 7 and the Lego Mindstorms NXT 2.0 IDE. The Windows bluetooth manager shows the NXT is connected and the NXT shows up in the Windows list of bluetooth devices. When I try to connect from the Lego IDE, however, I get a message that says "Error: NXT Bluetooth passkey confirmation failed". I entered the pairing key on the NXT and within Windows with no problems. The problem is when I am in the IDE trying to connect to the NXT. Any suggestions? Update - January 8, 2010 I have it working on one computer. It's a desktop PC running Windows 7 Ultimate 32-bit. Same BT adapter, I just

C# library for Lego Mindstorm NXT [closed]

♀尐吖头ヾ 提交于 2019-12-02 16:19:24
Is there C# (.NET) library for Lego Mindstorm NXT, which is up-to-date? NXT.NET for LEGO Mindstorms last update 18.04.2008 http://nxtnet.codeplex.com/ MindSqualls last update 05.06.2007 http://www.mindsqualls.net/ Lego .NET last update 07.04.2005 http://www.dcl.hpi.uni-potsdam.de/research/lego.NET/weblog/ I know, there is MS Robotic studio, but my question is not about that. As far as I can tell, There is no source code available for NXT.NET for LEGO Mindstorms despite the project being hosted on codeplex. The library is not really complete yet - and it would seem that development has stalled.

Bluetooth-connection between Android and Lego Mindstorm NXT

无人久伴 提交于 2019-11-28 17:15:24
问题 Does anybody know, how to build a bluetooth connection between Android and LEGO-Mindstorm-NXT? The connection between two NXTs works fine. But the other Connection-type likes not so easy. I am working with the LeJOS Firmware 0.85 and the Android SDK Tools (2.2 Froyo). 回答1: So i've solved it and will show all how does it works, because i've seen that a lot of people have problems with that. The class includes 4 functions: Bluetooth enable if not enabled before -> enableBT() Connect to 2 NXTs -