the new Raspberry Pi’s come with Wolfram Mathematica loaded. (I got a B+ with my GoPiGo). Is there a convenient way to access the GoPiGo from the Wolfram language? wolfram can access the pins on the Raspeberry. I suppose I could read the Dexter python and reproduce that code in Wolfram. Is ther an easier way?
Came across this thread when trying to do the same thing as op. Turns out it is not too tricky. I’ve included an example to control the GoPiGo with some basic buttons for anyone else who happens to find their way here.
If you are running Raspbian for Robots and don’t have Mathematica or the Wolfram Language on your GoPiGo you can get it using
sudo apt-get install wolfram-engine
After connecting to your GoPiGo via VNC (wolfram can be run via command line too, just doesn’t have nice graphical interface for buttons etc), open a new Mathematica notebook and paste the following:
Evaluate the cells and control the GoPiGo with some basic buttons. In its simplest form all you need to do is use SocketConnect and WriteString. I presume more functionality can be added by modifying the serv.py file using Python.
Hey Hans_S,
That’s actually a pretty clever use of the socket examples. Do let us know if you have documented this on a blog or have a video for this. It would be great if we could add this as a tutorial so that others can try this too.
No video or blog yet, maybe as the project progresses I’ll put something together. By editing the serv.py file I’ve got more functionality too, motor speed change, LED flash etc.
… doesn’t run as it should and I have had to run the “python /home/pi/Desktop/GoPiGo/Software/Client_Server/serv.py” command in a terminal window directly before evaluating the SocketConnect command in Mathematica.