2. Beginning of Agriculture
• The beginning of agriculture starts around 20,000 BC and moves
forward
• After around 9,000 BC methods are largely the same
• Advancements have come from large machines and genetic
engineering
3. Basics of Plants
• Light
• Growing Medium
• Water
• Nutrients
• Air (CO2)
4. Natural Evolution – Grow Indoors
• Control Everything and Maximize!!!!
• Expensive at first
• Interesting Finds and Insights
5. Time Leads to Better Solutions
• Urban Farming (hydroponics and soil) becomes profitable
• Solutions become cheaper
• Startups disrupting traditional farming
• Cost of moving produce goes up
• Increase in population density
• Better dissemination of information
6. Features Ripe for IoT
• Light - Led strips controlled by micro controllers
• Growing Medium – soil and water ph monitoring
• Water – Automated feeding and drip systems
• Nutrients – Automatically measure and mix
• Air (CO2) – Automated fan systems
7. Programming in IoT 2017
• Variety of languages and platforms vs C
• Cheap microcontrollers and parts
• Rasberry Pi leading the way
8. My Setup
• Fill a bucket with water – (~2 minutes)
• Add nutrients to bucket – ( ~ 5 minutes)
• Put a seedling in the bucket (~ 15 seconds)
• Set up lights – (1 minute)
• Wait 4-6 weeks
9. Process isn’t scalable
• Takes forever to do multiple buckets
• Sucks when plants need different nutrient amounts
• Entire night wasted and huge mess to do it
• Less then happy girlfriend
10. Solution - Automate the Longest Process
• Let pumps do the measuring work for me
• Accurate to about 1ml
• Need at least 3 pumps working
• Needs an API to make it work
11. Parts
• 1 Raspberry Pi 3
• 2 Arduino Uno
• 2 Arduino Motor Shields
• 4 Pumps
• 2 Barrel Jack power supply 12v
• Extra Wire
• Soldering Iron
13. Algorithim
• Every motor has a natural speed (ml / ms)
• Async time isn’t guaranteed
• Take in the total volume for each motor
• Emit events every 100ms until total volume is pumped
14. Johnny Five
• Node.js allows Javascript to run on a desktop using C as a
programming bridge
• Node is perfect for async and meshes well with hardware given its
async mannerisms
• Allows for combining web tech with hardware
• Variety of target boards
• Website: http://johnny-five.io/
15. Arduino
• Micro controller with lots of code
• Stackable shields with prebuilt wires and chips
• Cheap ~ $10.00
• Comes with own C like programming language
• Small amount of system resources
16. Perfect Combo
• Arduino = cheap but no brains
• Arduino = plenty of prebuilt modules programmed already
• Pi = affordable and multipurpose
• Pi = plenty of power and memory
• Combine up to 4 Arduinos with Pi 3!
19. Get Coding
• Install Node.js
• Plug microcontrollers into computer
• Create a new project with Johnny-Five
• Golden rule – everything comes down to voltage
• Sensors / Buttons = Input from the world
• Motors / Servos / Lights = Output