thiagomarzagao / ev3py

This Python module lets you interact with LEGO Mindstorms EV3 bricks using intuitive, easy-to-understand methods.
MIT License
23 stars 6 forks source link

Where to get the values for the OpCodes? #3

Open nesbit opened 9 years ago

nesbit commented 9 years ago

Hey Thiago, I have been using this library for my own personal use for a while now (just to play around with), and I have started to create a GUI wrapper for it. This is probably the most user friendly EV3 "Coding Language" that I have found. The reason for the GUI is because I teach a lego class and would like to implement it into the curriculum.

As I am a novice programmer, self taught, I understand the basic declaration of comm_1, first message size, then message counter, then command type, the variables. I would like to know what the message size entails? Is it the whole message it bits or bytes? Does the Message Size not include the message bit itself?

Lastly, is there an easy file to find all of the numbers to create hex for both of the comm_1 and comm_2.

Sorry this is a lot, but I would really like to use this for kids. I would really like to know where the command "templets" are.

Thank you for very much for creating this, and if you answer thank you even more. Ethan

thiagomarzagao commented 9 years ago

Hi, nesbit! Cool idea, I think a GUI wrapper would be great. About the message size, it's in bytes. I think this file from the firmware's source code could be helpful. About the hexadecimals, I'm not sure I understand what you mean. Do you mean something like this? For the command templates, I learned a lot from the source files from QUT's Matlab EV3 kit.

Let me know if this helps.

nesbit commented 9 years ago

Thanks!!! Just from a quick look, it appears that all of those links will help me out greatly! Thank you very much!

thekitchenscientist commented 9 years ago

I also started by playing with this code. There is a fully developed python library by inductivekickback/ev3. As well as complete list of the bytecodes it includes error checking of the byte commands so you can't send nonsense to the brick which requires a restart. I think the library might lend itself to your GUI approach.

I have found in direct command mode the requirement to keep the motors in sync (for maze robots) causes the movement to be jerky.

On Mon, Apr 6, 2015 at 5:16 PM, nesbit notifications@github.com wrote:

Hey Thiago, I have been using this library for my own personal use for a while now (just to play around with), and I have started to create a GUI wrapper for it. This is probably the most user friendly EV3 "Coding Language" that I have found. The reason for the GUI is because I teach a lego class and would like to implement it into the curriculum.

As I am a novice programmer, self taught, I understand the basic declaration of comm_1, first message size, then message counter, then command type, the variables. I would like to know what the message size entails? Is it the whole message it bits or bytes? Does the Message Size not include the message bit itself?

Lastly, is there an easy file to find all of the numbers to create hex for both of the comm_1 and comm_2.

Sorry this is a lot, but I would really like to use this for kids. I would really like to know where the command "templets" are.

Thank you for very much for creating this, and if you answer thank you even more. Ethan

— Reply to this email directly or view it on GitHub https://github.com/thiagomarzagao/ev3py/issues/3.

nesbit commented 9 years ago

@thekitchenscientist I like that Library, but I feel like it would be much harder for kids to use it. The one thing that I am interested in adding to ev3py is a system to see if a command is done. Currently (at least for my testing), there is no way for a user to see if a motor has stopped moving so they can run the next command. In this there is a reply byte that is sent, I found something similar in inductivekickback's module. I will try to implement it soon.