Hi all,
As a new user, I found it relatively hard to get started with EPICS, so I gave myself the task of having an Arduino communicate with a Raspberry Pi using EPICS. This turned into something that I think could be interesting to the EPICS community, and useful
for people setting up laboratory experiments or automation projects, and I would like to share it with you for comments, criticisms, and with the hope that you will also find it useful & interesting.
I documented it in a series of posts on my blog -- note that I don't run any advertisements on my website, so none of this is for profit :-)
http://www.smolloy.com/2015/12/control-arduino-via-epics-ioc-on-a-raspberry-pi/
http://www.smolloy.com/2015/12/serial-control-of-an-arduino/
http://www.smolloy.com/2015/12/epics-ioc-on-a-raspberry-pi/
http://www.smolloy.com/2015/12/epics-serial-communication-with-arduino/
One of the more interesting parts of this was that I implemented the connection to the Arduino as serial over Bluetooth. This allowed me to build multiple devices, and install them in locations where a cable-run wasn't practical. I never got round to writing
up the Bluetooth part of the project, but I'd be happy to take the time to do that if there was interest.
After having done this a couple of times, and after receiving some feedback from a colleague, I started to think about how to automate the more error-prone parts of this process. After playing around with different options, I ended up building a web-application
to do most of the hard-work for the user.
http://active-valve-127312.appspot.com/
(I built it on Google's AppEngine platform, but I hope the need for a Google login doesn't put too many users off...)
This app provides a download that automates the installation of EPICS, StreamDevice, and Asyn Driver, on the Raspberry Pi. It also provides a script to install an empty IOC, as well as web-form to specify the various signals that you would like to read from
the Arduino from which it generates the proto and db files that are needed for the IOC. Last but not least, it gives you a skeleton Arduino sketch that will allow the Arduino to communicate with the IOC (after you fill it with the code that you need).
Of course, all of this is totally Open Source. Follow the GitHub link at the bottom of the web-app to read the source.
I'd very much like to hear your comments on all of this. Criticisms and tips for improvement will be gladly received!
Steve