-
Notifications
You must be signed in to change notification settings - Fork 0
Sous vide cooker controller that runs on a Raspberry Pi
License
KerryL/RPiSousVide
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Raspbery Pi Sous Vide Controller Date: 11/21/2013 Author: K. Loux Copyright: Copyright 2013 Kerry Loux and Matt Jarvis License: GPLv2 (see LICENSE file) This application includes an interface to gnuplot (using pipes) that is roughly based on gnuplot_i module written by N. Devillard <nDevil@eso.org>. More information can be obtained from http://ndevilla.free.fr/gnuplot/. This application uses cJSON, which is licesned under the MIT license. Read more here: sourceforge.net/project/cjson. To make compiling easier, cJSON.c was renamed to cJSON.cpp. The JSON test renames the file back to .c I was curious as to exactly how much kludge it would take to get it working - the comparative difficulty and ugliness makes the renaming solution so much more attractive. Note that this project uses three submodules, avaiable from here (and covered in the instructions below): utilities -> https://github.com/KerryL/utilities.git rpi -> https://github.com/KerryL/rpi.git logging -> https://github.com/KerryL/logging.git All three submodules are licensed under the MIT license. Starting with a brand new Raspberry Pi, follow these instructions to get started. 1. Follow these instructions to prepare Raspberry Pi: http://elinux.org/RPi_Easy_SD_Card_Setup After setup, you can log into the RPi via ssh - no monitor required. After logging in for the first time, if you read the messages, you'll see that they recommend running 'sudo raspi-config', which allows you to easily change things like password and hostname. 2. Follow these instructions in order to set up cross compiling for the RPi: http://www.bootc.net/archives/2012/05/26/how-to-build-a-cross-compiler-for-your-raspberry-pi/ I had to download a half dozen missing packages in order to get configure to complete, then I had to install subversion to get build to complete. You may or may not run into the same situation. When configuring for the build (his instructions #s 3-14 under "To actually create your toolchain...", look for and select the option to build a c++ compiler, too. After going through all of this, I'm not sure it wouldn't be easier to just install gcc on the RPi. I haven't done that yet, but getting the cross-compiling stuff working took a lot longer than I would have guessed (allow a couple hours). But I was also juggling a baby... 3. Follow these instructions to set up an apache web server on the RPi: http://www.jeremymorgan.com/tutorials/raspberry-pi/how-to-raspberry-pi-web-server/ I skipped the installation of MySQL, and left all of the apache defaults as-is. If you use vi as your text editor, you'll probably want to create a .vimrc file and add "set nocp" (by default, arrow keys don't navigate in insert mode, instead they insert A, B, etc.) 4. Install wiringPi library by following the instructions here: http://wiringpi.com/download-and-install/. I was originally planning on writing the minimal amount of low-level stuff myself, but two things changed my mind: Lack of documentation on GPIO functions (you'll find documentation that tells you it is possible to set a pull-up or pull-down for each input pin, but good luck figuring out how to do it - the easiest way I could figure out was by looking at the source code for wiringPi, which implements this feature - and then after I got looking at Wiring Pi, I found that it's not a very big library, implementing only a few more things than we were going to need for this project. Again, cross-compiling makes stuff more difficult. The instructions above are fine if you're compiling on the RPi. If you want to cross-compile, you'll need to make the following changes: - change the makefile (wiringPi/wiringPi/Makefile), line 36 to use the cross-compiler built in step 2 above. If you follow exactly as the instructions are written, the compiler would be arm-unknown-linux-gnueabi-g++. Also, the makefile doesn't define macros for the archiver and ranlib. You'll need to define those yourself and use those found in the x-tools binary directory you built, then use them in place of ar and ranlib below. - the INSTALL file has instructions for building a statically-linked library. If we cross-compile, our options are either link it statically, or install it on the Pi, too, in order to use the dynamic library (which is what builds by default). I used static linking, and it seems to be working just fine. 5. Install gnuplot on the Raspberry Pi. Execute the following command: $ sudo apt-get install gnuplot-x11 6. Get the source. Do the following (some additional steps due to git submodules make this slightly more difficult than just cloning): $ git clone https://github.com/KerryL/RPiSousVide.git $ cd RPiSousVide $ git submodule init $ git submodule update --recursive 7. Build RPiSousVide using the included makefile (make changes as appropriate if you didn't exactly follow the instructions above), and copy to your Raspberry Pi. Note that re-building can be carried out by using '$make clean' followed by '$make' if using the included makefile. 8. Configure Raspberry Pi to use application as a service... TODO - let's get the thing built first 9. Describe required connections, hardware plans, anything else? TODO https://projects.drogon.net/raspberry-pi/wiringpi/pins/ TESTING In the test directory is a makefile that will build a series of test applications for verifying the functionality of selected classes upon which the main application is built. All test binaries are written to test/bin. All binaries are cross-compiled by default, although it would not be difficult to change a makefile to use g++, if you wanted to test the sockets on something other than a Raspberry Pi, for example.
About
Sous vide cooker controller that runs on a Raspberry Pi
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published