Skip to content

Instantly share code, notes, and snippets.

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
/*************************************************************
Motor Shield Stepper Demo
by Randy Sarafan
For more information see:
http://www.instructables.com/id/Arduino-Motor-Shield-Tutorial/
*************************************************************/
int delaylegnth = 30;
@benongithub
benongithub / gist:af58bbd0b46ccf6129c4
Created April 13, 2015 08:53
Steppermotor Arduino Motor Shield
#include <Stepper.h>
const int stepsPerRevolution = 48; // change this to fit the number of steps per revolution
// for your motor
// initialize the stepper library on the motor shield
Stepper myStepper(stepsPerRevolution, 12,13);
// give the motor control pins names:
/***********************************/
/* */
/* */
/* */
/* */
/***********************************/
/* Import der Bibliotheken
***********************************/
import time
import board
import neopixel
import math
import rotaryio
import board
import digitalio
import adafruit_rgbled
import busio
import adafruit_midi
#!/usr/bin/env python
from threading import Thread
import serial
import time
import collections
import matplotlib.pyplot as plt
import matplotlib.animation as animation
import struct
import copy
#include <ArduinoMotorCarrier.h>
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BNO055.h>
#include <utility/imumaths.h>
uint16_t BNO055_SAMPLERATE_DELAY_MS = 100;
Adafruit_BNO055 bno = Adafruit_BNO055(55, 0x28, &Wire);
#include <ArduinoMotorCarrier.h>
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BNO055.h>
#include <utility/imumaths.h>
uint16_t BNO055_SAMPLERATE_DELAY_MS = 50;
Adafruit_BNO055 bno = Adafruit_BNO055(55, 0x28, &Wire);
import os
from ximea import xiapi
import cv2
import argparse
import collections
from functools import partial
import re
import time