Thanks! @wsnook I’ll try it out with the v2 and see if I can get the Dockers on it. If not will use the v2 for a different and get the v3
More Docs: I wrote a PFC2 step-by-step software install guide (edit: these instructions are out of date now)
I’ve been playing with this more and wrote up a couple more gists.
Part 1: Doing a better job of flashing the latest firmware
In my instructions from the the original post above, I said to just load the default fixture and start ROS like this:
rosrun openag_brain load_fixture default rosrun openag_brain main
I’m not 100% sure, but I don’t think my original method loaded all the sensor firmware modules like I was hoping it would. Based on my experiments tonight, I think it’s more interesting to do this instead:
rosrun openag_brain load_fixture default rosrun openag_brain load_fixture personal_food_computer_v2 rosrun openag_brain flash rosrun openag_brain main
I’m not sure if it’s necessary to load the default fixture and personal_food_computer_v2, but when I did that, it pulled in firmware for a whole bunch of sensors, and that’s what I was aiming for.
Here’s a gist with a script I used to update my openag_brain and openag_python repos along with console logs from when I loaded and flashed both fixtures.
Part 2: Making ROS show sensor data
Tonight, I also figured out how to get ROS to show me something from the sensors. My output isn’t very interesting because I don’t actually have any sensors connected to the Arduino Mega.
Here’s the gist with console logs:
What do you think about using these to fill in the nonexistant http://wiki.openag.media.mit.edu/food_computer_2/getting_started section of the wiki?
@spaghet, If you want to put something on the getting started page, that’s fine by me. My inclination is to write mostly in github/gist form because they’re quick and easy, I’m familiar with them, and they’re reasonably secure. These http-only forum and wiki tools for OpenAg make me nervous–I’m not sure how they’re administered, but it seems like there’s an elevated risk here for hacking, vandalism, and perhaps data loss.
Hello @wsnook i followed your instructions (was very clear!) and everything went as you wrote (i had to reformat the memory card as looks like i missed a step on my first try and kept on getting errors:wink:) I’m at step #8 and (Load the OpenAg UI in your Mac’s browser by opening https://openaginitiative.github.io/openag_ui/. ) and when I input the IP address it tells me “uh oh, cannot reach the server” any idea what i might have missed?
If you(the computer accessing the UI) are on the same network as the Pi, whatever wlan0 is (192.168.1.x or 10.0.0.x or something similar) in IPv4 when you type the command
ifconfig inside the RPi should be what you put in. In my case, it’s 10.0.0.6
@Motty, Since you say you’re at step 8, I assume that means you can load the CouchDB admin page at http://your-ipaddress:5984/_utils/. If that’s true, then CouchDB is working but the UI is having trouble talking to it. You might try making a few more attempts at reloading the UI page and entering the IP address again. For me, connecting with the UI doesn’t always work on the first try. Beyond that, I don’t know what might be wrong. Gordon is the one who knows the most about the UI.
@wsnook thanks! I"ll try reloading and if i get no luck I"ll ask Gordan.
Thanks for the quick response!
i tried it, no luck…
What type of network are you on? I am running things on a home network that has a dynamic IP address. My internal IPs are unknown from the outside (ie the UI).
There is a simple, multi step fix for this stuff:
See this post
Now I can access my FoodComputer from anywhere on the web.
Thank you for the great instructions! I was stuck because I missed your step 5 “Load the default fixture”.
My startup has an issue with the serial port, do you know why this happens?
process[expand_diagnostics-11]: started with pid  [ERROR] [WallTime: 1487019278.700384] Error opening serial: could not open port /dev/ttyACM0: [Errno 13] Permission denied: '/dev/ttyACM0'
I used the USB cable to connect my Raspberry Pi 3 model B to an “OSOYOO MEGA2560 R3 Arduino board”. Have I missed a connection for the serial port?
I also tried the revised instructions you had in a comment:
rosrun openag_brain load_fixture default
rosrun openag_brain load_fixture personal_food_computer_v2
rosrun openag_brain flash
This still gives me a serial port error:
BeforeUpload(["upload"], [".pioenvs/megaatmega2560/firmware.hex"]) Looking for upload port/disk... Warning! Please install `99-platformio-udev.rules` and check that your board's PID and VID are listed in the rules. https://raw.githubusercontent.com/platformio/platformio/develop/scripts/99-platformio-udev.rules Auto-detected: /dev/ttyACM0 scons: *** [upload] could not open port /dev/ttyACM0: [Errno 13] Permission denied: '/dev/ttyACM0' ========================= [ ERROR ] Took 29.18 seconds ========================= Error: Compilation failed
raspberrypi ~ > ls -als /dev/ttyACM0
crw-rw---- 1 root dialout 166, 0 Feb 10 13:04 /dev/ttyACM0
Update: I found my problem:
I am using a new user I created on the raspberry pi (not the default ‘pi’ user) and I was having permission problems flashing the arduino board. I ran this command to give my user the same groups as the ‘pi’ user and now everything works. Thank you wsnook.
sudo usermod -a -G adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,input,netdev,gpio,i2c,spi <your user name>
Thanks for your work! Really help me!
@luooove You’re welcome–that’s great. Just so you know, Gordon has been working lately on changing and simplifying the installation process for openag_brain on GitHub. I haven’t been following the changes closely, but at some point, these instructions may become obsolete.
This guide doesn’t work any more. Gordon has been doing a lot of great work to simplify the ROS configuration and setup procedure. I’m not sure if there’s current documentation for the new way of doing it yet.
@gordonb, do you have a link or recommendation for where people should go now to get the latest install procedure?
Thank you @wsnook I am working to get a system up and running now and having issues. Are there any updates here? I’ve been sucessful with a docker install (got the success at the end of firmware install) but now am having issues connecting with the brain through the webui to verify it works. Is there any update here? The “how to run using docker” is a dead link, what do we do after a successful docker install to get it working with the ui? Thanks all!!
As far as I can tell from observing as an outsider, the OpenAg programming team at MIT is focusing most all of their current work on the food server 2.0 container farm at MIT’s Bates campus.
Considering that OpenAg is a university research initiative rather than a consumer product company, I’m guessing there won’t be any ongoing support for the PFC or openag_brain designs that have been released so far. If you look at the list of open issues or the list of commits for openag_brain, it seems like the activity stalled out around October of last year.
As I understand it, Caleb’s intention was to donate the designs to the community on an as-is basis in the hope that people would do something interesting with them. It seems like he doesn’t have the resources to provide ongoing support and development for the old designs.
As for me, I’m still watching the forum, but I’m not actively working on any hydroponics projects. Also, I’m not in a position to provide support for MIT’s designs because I don’t have any of the hardware and I’m not current on the PFC2 software changes that Caleb’s team made last summer and fall.
[update: Also, I just saw that Caleb has been talking on Instagram about a new desktop size food computer brain with lights that they just got working (see this post and this post). He implied they will be making an announcement soon about the new design. It looks like Caleb’s photos are probably a prototype of the designs that Jake and Dan have been working on lately at https://github.com/OpenAgInitiative/openag_eagle ]
[update 2: I’ve gone over the new designs (pfc-edu, nervous system, lighting controller, etc.) in a lot more detail since my earlier update, and they look really interesting.]
@wsnook thank you for your update! I’m in the situation where I’m trying to get a few more systems up and running and am finding it doesn’t work as it did last time I did so. @Webb.Peter Have you been able to get (or know of someone getting) a PFC2 brain up and running in the last 6 months or so? I’m trying to do so and running into issues. Thanks all!!
Getting the software up and running