Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View robertoloja's full-sized avatar

Roberto Loja robertoloja

View GitHub Profile

Keybase proof

I hereby claim:

  • I am robertoloja on github.
  • I am robertoloja (https://keybase.io/robertoloja) on keybase.
  • I have a public key ASABfCgFB94JI3DwDxGasVA2KKaJVcEJqnndO8JGyv5adQo

To claim this, I am signing this object:

@robertoloja
robertoloja / population.py
Last active December 23, 2017 18:27
Counts population. Runs in the background and constantly updates the local mongo instance.
#!/usr/bin/python
from pymongo import MongoClient
import RPi.GPIO as GPIO
import threading
import time
import sys
# Using a state machine to track bee ingress/egress.
states = {
'IDLE': 0,
@robertoloja
robertoloja / worker_runner.py
Last active December 23, 2017 18:36
Controls when temperature and weight are measured, and inputs measurements into local mongo instance.
#!/usr/bin/python
from pymongo import MongoClient
import Adafruit_MCP3008
import Adafruit_DHT
import time
'''
Weight
'''
CLK = 2