Skip to content

Instantly share code, notes, and snippets.

View Robotonics's full-sized avatar
🏠
Working from home

David Cotterill-Drew Robotonics

🏠
Working from home
View GitHub Profile
@Robotonics
Robotonics / MakeBlock_BT3.ino
Last active April 19, 2017 22:21
MakeBlock Bluetooth v3.0
/*************************************************************************
* File Name : MakeBlock_BT3.ino
* Author : David Cotterill-Drew
* Updated : 19/04/2017
* Version : V3.0
* Date : 19/04/2017
* Description : Program to be used with Orion controller/Uno
* License : Open Source
* Copyright (C) 2017 RoboTonics.
* https://r0b0t.wordpress.com/
@Robotonics
Robotonics / MakeBlock_BT2.py
Created April 18, 2017 21:58
MakeBlock python forklift
#--------------------------------------------------
# Python program to interact with and
# control a MakeBlock Robot Forklift.
# Author: David Cotterill-Drew 2017
# Email: [email protected]
#--------------------------------------------------
# Imports
#--------------------------------------------------
from bluepy.btle import *
from Tkinter import *
@Robotonics
Robotonics / MakeBlock_BT2.ino
Last active April 18, 2017 21:56
MakeBlock Bluetooth Arduino robot forklift
/*************************************************************************
* File Name : MakeBlock_BT2.ino
* Author : David Cotterill-Drew
* Updated : 18/04/2017
* Version : V2.0
* Date : 18/04/2017
* Description : Program to be used with Mbot
BT.py to control robot via bluetooth.
* License : Open Source
* Copyright (C) 2016 RoboTonics.
@Robotonics
Robotonics / MakeBlock_ForkLift.ino
Created April 2, 2017 12:47
Program to operate DIY MakeBlock Forklift with Infra red control
#include "MeOrion.h"
#include <SoftwareSerial.h>
MeInfraredReceiver infraredReceiverDecode(PORT_6);
MeDCMotor MotorL(M1);
MeDCMotor MotorR(M2);
MeDCMotor Holder(PORT_1);
MeDCMotor Hand(PORT_2);
int distance=0;
@Robotonics
Robotonics / BBC_MOTOR1.py
Created March 19, 2017 18:34
BBC Micro:Bit Motor Control x 2 Motors
from microbit import *
m1 = pin13
m2 = pin14
m3 = pin15
m4 = pin16
def right():
m1.write_digital(1)
m2.write_digital(0)
@Robotonics
Robotonics / BBC_LCD2.py
Created March 18, 2017 00:38
BBC Micro:Bit LCD 2
from microbit import *
# pin connections
rs = pin0
enable = pin1
datapins = [pin8, pin12, pin2, pin13]
# commands
LCD_CLEARDISPLAY = 0x01
LCD_RETURNHOME = 0x02
@Robotonics
Robotonics / BBC_LCD.py
Created March 17, 2017 00:27
BBC Micro:Bit 16x2 Character LCD
from microbit import *
# pin connections
rs = pin0
enable = pin1
datapins = [pin8, pin12, pin2, pin13]
button1 = pin5
# commands
LCD_CLEARDISPLAY = 0x01
LCD_RETURNHOME = 0x02
#--------------------------------------------------
# Python program to interact with and
# control a MakeBlock Robot.
# Author: David Cotterill-Drew 2016
# Email: [email protected]
#--------------------------------------------------
# Imports
#--------------------------------------------------
from bluepy.btle import *
@Robotonics
Robotonics / makeblock_bluetooth.ino
Created December 6, 2016 18:17
Arduino program to communicate with makeblockbluetooth.py
#include <MeOrion.h>
#include <Arduino.h>
#include <SoftwareSerial.h>
#include <Wire.h>
#include "MatrixGraphics.h"
MeBluetooth bluetooth(PORT_5);
MeDCMotor MotorL(M1);
MeDCMotor MotorR(M2);
@Robotonics
Robotonics / makeblock_bluetooth.py
Created December 6, 2016 18:13
Python program to communicate through Bluetooth to Orion controller with sunfounder BLE. controls direction and robot arm/grip.
from Tkinter import *
import Tkinter as tk
from PIL import Image, ImageTk
import os
root = tk.Tk()
frame = Frame(root,width=300,height=800)
frame.grid(row=0, column=0, padx=5, pady=5)
framespeed = Frame(root,width=300,height=800)
framespeed.grid(row=2, column=0, padx=5, pady=5)
framearm = Frame(root,width=300,height=800)