Let's Make Robots! | RobotShop


Conquer the Divide - Faster Integer Division

Conquer the Divide - Faster Integer Division


How to implement C-style integer division on a microcontroller that doesn't provide appropriate instructions? In school we learn how to divide long nunmbers [1]. Wikipedia tells us that we can do better in certain cases [2]. However, these algorithm are only better for numbers longer than a certain limit. For C operations they don't give any advantage. This article presents an algorithm based on piecewise polynomial approximation to implement this operation.

Collect and crosspost my blog entries and discussions about programming topics.
Introduction I started blogging about various programming topics and the community has chimed in with some good information.  I plan on continuing to blog … Read more

Stupid / Beginning Questions

I'm somewhat new to arduino and finally found out about libraries.  Unfortunately I have looked for instructions on how to create one and how to upload an existing library.  So if someone could give me step-by-step instructions on how to get this library i have here sitting on my desktop to something i can use in code. (please dummy-down the instructions).

It would also be helpful if someone could provide me with a small sample code for a robot that uses Ping)))