Transcript
Page 1: Growing Food With Open Source (Sarah Sharp)

Growing Foodwith Open Source

OSCON 2011Sarah Sharp@sarahsharp

Page 2: Growing Food With Open Source (Sarah Sharp)

Hello!

Page 3: Growing Food With Open Source (Sarah Sharp)

✔ Linux Kernel hacker

Page 4: Growing Food With Open Source (Sarah Sharp)

✔ Gardener

Page 5: Growing Food With Open Source (Sarah Sharp)

I'm still a lazy hacker

Page 6: Growing Food With Open Source (Sarah Sharp)

github.com/sarahsharp/GardenGeek

Page 7: Growing Food With Open Source (Sarah Sharp)

Problem #1: Scheduling

Page 8: Growing Food With Open Source (Sarah Sharp)
Page 9: Growing Food With Open Source (Sarah Sharp)
Page 10: Growing Food With Open Source (Sarah Sharp)
Page 11: Growing Food With Open Source (Sarah Sharp)
Page 12: Growing Food With Open Source (Sarah Sharp)
Page 13: Growing Food With Open Source (Sarah Sharp)
Page 14: Growing Food With Open Source (Sarah Sharp)
Page 15: Growing Food With Open Source (Sarah Sharp)
Page 16: Growing Food With Open Source (Sarah Sharp)

Garden Calendar tool

● 904 lines of C● Object oriented representation of plants● Takes a CSV file for input

● 11 magic fields● not all are required

oregon spring tomatoes,1,7,3,2010-04-13,0,75,.80,6,14,0

Page 17: Growing Food With Open Source (Sarah Sharp)

Garden Calendar tool: Phase I

● Started Feb 21, 2010● Plain text output on Mar 7, 2010

Page 18: Growing Food With Open Source (Sarah Sharp)

Issues with Phase I

● Worked pretty well● Seed germination

rates are optimistic!● Often forgotten● No integration with

other calendaring tools

Page 19: Growing Food With Open Source (Sarah Sharp)

Garden Calendar tool: Phase II

● Goal: output iCalendar and integrate with google calendar.

● Issues: RFC 2445

Page 20: Growing Food With Open Source (Sarah Sharp)
Page 21: Growing Food With Open Source (Sarah Sharp)

Issues with Phase II

● Google calendar update lag● Really should be a todo list

● Integration with Remember The Milk?● Need an easy way to defer tasks

● Web front end?● Storage for users

Page 22: Growing Food With Open Source (Sarah Sharp)

Problem #2: Frost

Page 23: Growing Food With Open Source (Sarah Sharp)

How Frost Works

Page 24: Growing Food With Open Source (Sarah Sharp)

How Gardeners deal with frost

Page 25: Growing Food With Open Source (Sarah Sharp)

Dealing with Spring Weather:“Cold Snaps”

Data Source: WunderGround.com,Portland, Oregon, USA,

April 2010

Page 26: Growing Food With Open Source (Sarah Sharp)

Lazy Hacker: Polling vs. Interrupts

Page 27: Growing Food With Open Source (Sarah Sharp)

Search for the Perfect Android App

● Need an alert for frosts● Alert must be timely● Nice: open source app

Weather Checker

● Need an alert for frosts● Alert must be timely● Nice: open source app

Weather Checker

Page 28: Growing Food With Open Source (Sarah Sharp)

Search for the Perfect Android App

● Need an alert for frosts● Alert must be timely● Nice: open source app

Weather Checker● Alerts too often● Alerts at the wrong time● “average” temperature?

● Need an alert for frosts● Alert must be timely● Nice: open source app

Weather Checker● Alerts too often● Alerts at the wrong time● “average” temperature?

Page 29: Growing Food With Open Source (Sarah Sharp)

DIY

Page 30: Growing Food With Open Source (Sarah Sharp)
Page 31: Growing Food With Open Source (Sarah Sharp)

“You may not use the Wunderground Data Feed for use in a mobile

application for mass distribution, even if there is no monetary cost for the mobile

application.”

Page 32: Growing Food With Open Source (Sarah Sharp)

Open Government Data

● NOAA weather data● No history, only future predictions● Only for the United States● SOAP interface that returns XML

Page 33: Growing Food With Open Source (Sarah Sharp)

Garden Weather Alert

Page 34: Growing Food With Open Source (Sarah Sharp)

Garden Weather Alert TODO

● Add a background task for alerts● Alert on hail, wind, extreme heat● Use GPS coordinates● Support international locations● Options for °F vs. °C

Page 35: Growing Food With Open Source (Sarah Sharp)

Automatic Wateringwith Arduinos

Page 36: Growing Food With Open Source (Sarah Sharp)

Garduino: Gardening + Arduino

● Automatically waters your plants based on soil moisture

● Good tutorial on instructables.com

http://www.instructables.com/id/Garduino-Gardening-Arduino/

Page 37: Growing Food With Open Source (Sarah Sharp)

Soil Moisture Sensor

http://www.cheapvegetablegardener.com/2009/11/how-to-make-cheap-soil-moisture-sensor-2.html

Page 38: Growing Food With Open Source (Sarah Sharp)

Soil Moisture Sensor Science

V=I*R

R = infinite ohms I = 0 ampsV = 0 volts

R is finite I > 0 amps V > 0 volts

Page 39: Growing Food With Open Source (Sarah Sharp)

Garduino Step 1:Build Soil Moisture Sensors

Page 40: Growing Food With Open Source (Sarah Sharp)

Garduino Step 2:Hello Blinky LEDs

Page 41: Growing Food With Open Source (Sarah Sharp)

Garduino Step 2:Hello Blinky LEDs

Page 42: Growing Food With Open Source (Sarah Sharp)

Garduino Step 2:Hello Blinky LEDs

Page 43: Growing Food With Open Source (Sarah Sharp)

Garduino Step 3:Hello digital output

Page 44: Growing Food With Open Source (Sarah Sharp)

Garduino Step 4:Set up watering system

Page 45: Growing Food With Open Source (Sarah Sharp)

Garduino Step 4:Set up watering system

http://powerswitchtail.com/

Page 46: Growing Food With Open Source (Sarah Sharp)

Garduino Step 5:Calibrate System

● Soil moisture sensor takes a while to react● Need Arduino code to:

● Limit how often the pump runs● Don't water more often than N seconds

● Issues:● No RTC on the Arduino● Use milliseconds from start

● ~80 lines of code (with detailed comments)

Page 47: Growing Food With Open Source (Sarah Sharp)

Final Garduino

powertail

switch

wallpower

Arduino

soilmoisturesensor

Page 48: Growing Food With Open Source (Sarah Sharp)

GarduinoDemo

Page 49: Growing Food With Open Source (Sarah Sharp)

What's next?

● Wireless communication● JeeNodes - $22 kit

● Finish irrigation system

Page 50: Growing Food With Open Source (Sarah Sharp)

Want get involved?

● http://www.gardengeek.org● http://github.org/sarahsharp/GardenGeek● Twitter/Identica: @gardengeekery

Page 51: Growing Food With Open Source (Sarah Sharp)

Thank you!


Top Related