Blog Entries
Creating the controller software
Category: Member Blogs

              Related image

To write the software program, there were two primary selections: I can either write it in a language that would certainly run on the brick itself (such as NXC, which is a version of C, or Java, which required flashing custom firmware on the block), or I could compose it on the PC and make use of a collection that controlled the brick from it. The price is so budgets friendly as well which is fantastic for such a premium item.

Thankfully, Wikipedia has a great post on this process, which is called Trilateration (it's the equivalent of triangulation, but with distance rather than angles). Easily, the article contains formulas for transforming between the two systems both methods. You could quickly discover that this back scratcher is made of great product and it's developed is quite sturdy. It can do a respectable task in scraping your back.

Avoiding oscillations

The motor relocating functions constructed right into the NXT brick (the Mind storms computer that manages all the servos and sensors) are susceptible to oscillation, so the movements would be a bit jerky at the end, and next-python relied on reviewing the electric motors' states to understand when to quit them, which would suggest that it had not been as accurate as software application working on the brick itself. I discovered that next-python supported Motor Control, which is an extremely useful NXC program that runs directly on the brick to manage the motor with fantastic accuracy and generate very smooth activity.

Operating on the block

At this point, the robot was working extremely well, yet there was still some work to be done. The code had to have the ability to work on the block, both for transportability and since I intended to see just how very easy NXC was to program for. I knew really little C and definitely no NXC at the time, so the task seemed complicated. I frequently discover myself thinking back to that lazy summer season mid-day now, which seems like plain hrs ago due to the fact that it, was, and poke fun at my younger inexperience. I decided to opt for the latter first, as there's a very good Python library available for this objective, called next-python. This would certainly enable me to swiftly model something and probably reword it to operate on the brick at a later time.

RSS
Blog Categories

This website is powered by Spruz