Skip to content

Instantly share code, notes, and snippets.

#ifndef __DCMOTOR_H
#define __DCMOTOR_H
#include <Adafruit_MotorShield.h>
#include "utility/Adafruit_MS_PWMServoDriver.h"
//Create the motor shield object with the default I2C address
Adafruit_MotorShield AFMS = Adafruit_MotorShield();
// Select which 'port' M1, M2, M3 or M4. In this case, M1
Adafruit_DCMotor *myMotor = AFMS.getMotor(4);
@robotiko
robotiko / docker-compose.yml
Created April 19, 2019 15:28 — forked from thomas15v/docker-compose.yml
Install odoo with docker-compose
version: '2'
services:
db:
image: postgres:9.4
restart: always
environment:
- POSTGRES_USER=odoo
- POSTGRES_PASSWORD=odoo
odoo:
image: odoo:11
[options]
#
# WARNING:
# If you use the Odoo Database utility to change the master password be aware
# that the formatting of this file WILL be LOST! A copy of this file named
# /etc/odoo/openerp-server.conf.template has been made in case this happens
# Note that the copy does not have any first boot changes
#-----------------------------------------------------------------------------
# Odoo Server Config File - TurnKey Linux
@robotiko
robotiko / yyr.rst
Created April 15, 2019 15:24 — forked from jeffbass/yyr.rst
DRAFT for Testing yyr.rst

yin-yang-ranch: Software & Raspberry Pis that Manage a Farm

Introduction

yin-yang-ranch is a collection of Python programs and Rasperry Pi hardware to help manage a small urban permaculture farm. The 2 acre farm is an ongoing science project to build living soil, capture rain in barrels, and grow a

@robotiko
robotiko / imagezmq.rst
Created April 15, 2019 15:23 — forked from jeffbass/imagezmq.rst
DRAFT for Testing how GitHubGist displays .rst file

imagezmq: Transporting OpenCV images

Introduction

imagezmq is a set of Python classes that transport OpenCV images from one computer to another using PyZMQ messaging. For example, here is a screen on a Mac computer showing simultaneous video streams from 8 Raspberry Pi cameras:

@robotiko
robotiko / zmqimage.py
Created April 15, 2019 15:21 — forked from jeffbass/zmqimage.py
zmqimage.py -- classes to send, receive and display OpenCV images from a headless computer to a display computer using cv2.imshow()
# zmqimage.py -- classes to send, receive and display cv2 images via zmq
# based on serialization in pyzmq docs and pyzmq/examples/serialization
'''
PURPOSE:
These classes allow a headless (no display) computer running OpenCV code
to display OpenCV images on another computer with a display.
For example, a headless Raspberry Pi with no display can run OpenCV code
and can display OpenCV images on a Mac with a display.
USAGE:
@robotiko
robotiko / stepper2.ino
Created August 3, 2016 09:47 — forked from sbright33/stepper2.ino
Stepper library for 28BYJ-48
// This Arduino example demonstrates bidirectional operation of a
// 28BYJ-48, which is readily available on eBay for $4.25 inc shipping,
// using a ULN2003 interface board to drive the stepper. The 28BYJ-48
// motor is a 4-phase, 8-beat motor, geared down by a factor of 64. One
// bipolar winding is on motor pins 1,3 and the other on motor pins 2,4.
// Refer to the manufacturer's documentation of Changzhou Fulling
// Motor Co., Ltd., among others. The step angle is 5.625/64 and the
// operating Frequency is 100pps. Current draw is 92mA.
// Vin w USB power is 4.5v too slow for testing use 5v pin.
//#include <Narcoleptic.h>
@robotiko
robotiko / Makefile
Last active August 29, 2015 14:13 — forked from Lekensteyn/Makefile
#
# Makefile for the USB serial device drivers.
#
# Object file lists.
obj-$(CONFIG_USB_SERIAL) += usbserial.o
usbserial-y := usb-serial.o generic.o bus.o

Intro

Just some FYI, to get started:

  • I'm using a 16 GB Sandisk SD card.
  • I have a model B Pi, 512 MB RAM (not really relevant, thought I'd mention it).
  • Monitor and keyboard connected to the Pi itself, for now.
  • Network working, internet access.
/*
* Copyright (C) 2014 Chris Banes
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software