Inspiration

Robotics applications typically have some math-intensive algorithms for motion and processing. Since Mathematica can naturally process complex mathematical operations, it may be a method to reduce development time of such algorithms.

What it does

Mathematica can drive around a simple robot.

How I built it

Mathematica has several built-in libraries that allow it to connect to external devices, including an Arduino, and allow to user to control the IO of the device. The Arduino is connected to the computer running Mathematica by XBee radios that allow it to appear as if it were connected directly to the computer. Various controls and outputs in Mathematica then set the corresponding outputs of the PWM pins on the Arduino to control the motors through a motor driver chip.

Challenges I ran into

Originally I started out attempting to run Mathematica from a Raspberry Pi that I brought, but I had a lot of trouble configuring a static IP address on the Raspberry Pi so that I could run it without a display, and Mathematica could be running directly on the robot. Also, the version of Mathematica that was installed on the Pi was far outdated, and did not include the drivers for communicating with the Arduino. This set me back for many hours, and when I finally resolved the issues, there were only about 12 hours left. I also found a bug in the Mathematica libraries for Arduino that caused some strange issues with the PWM, but eventually found a way around it. There is also currently a bug where it is only able to write to pins over the XBee connection, but has full capabilities when connected directly to the robot with a USB cable.

Accomplishments that I'm proud of

Mathematica can drive a robot, and react to sensor data!

What I learned

How to configure a Raspberry Pi with a static IP address, run a Raspberry Pi headless and share an internet connection with my laptop, and how to communicate with external devices in Mathematica.

What's next for Mathematica Robotics

Finding more cool applications for Mathematica in robotics!

Built With

Share this project:

Updates